2014.10.02 12:04 "[Tiff] Vulnerability CVE-2010-2596", by Petr Hracek

2014.10.07 22:30 "Re: [Tiff] build a static tiff2pdf", by Joel Costigliola

I finally managed to build a static version of tiff2pdf.

I ran first:
 ./configure --prefix=/home/joelco/prog/tiff2pdf/ --enable-shared=no LIBS='/usr/local/lib/libjpeg.a' --enable-static

But it was not enough to have a static version, the static option was not present in the final libtool command:

/bin/bash ../libtool  --tag=CC   --mode=link gcc -static  -g -O2 -Wall -W  -static -o tiff2pdf tiff2pdf.o ../libtiff/libtiff.la ../port/libport.la -ljpeg -lm /usr/local/lib/libjpeg.a

libtool: link: gcc -g -O2 -Wall -W -o tiff2pdf tiff2pdf.o ../libtiff/.libs/libtiff.a ../port/.libs/libport.a -ljpeg -lm /usr/local/lib/libjpeg.a

So I just ran the link command manually adding the static option:

gcc -g -O2 -Wall -W -static -o tiff2pdf tiff2pdf.o ../libtiff/.libs/libtiff.a ../port/.libs/libport.a -ljpeg -lm /usr/local/lib/libjpeg.a

It's not the cleanest way of building a static binary but at least it worked.

Cheers,

Joel

________________________________________
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Sent: Wednesday, 8 October 2014 03:38 a.m.
To: Joel Costigliola
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] build a static tiff2pdf

On Tue, 7 Oct 2014, Joel Costigliola wrote:

>
> Hey,
>
> I'm trying to build a static binaries, to embedd tiff2pdf in my java application.
>
> I'm running Ubuntu 14.04, I have been able to build a tiff2pdf binary using shared libraries but I failed to build a
> static one.

You don't really want to build a static libtiff. Modern systems
depend on shared libraries so that binaries can run on multiple
systems. The only library which looks like a problem in your linkage
is libjpeg.so.7.

Perhaps using

   ./configure LIBS='/usr/lib/x86_64-linux-gnu/libjpeg.a'

(adapted for your system) might help with the JPEG linkage problem.

Otherwise you will need to learn about exotic linker options.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/