Building libtiff from source fails with v4.0.6

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Building libtiff from source fails with v4.0.6

Guillaume Rossolini
Hi,

I am having trouble building version 4.0.6.

Here are the commands used and their output:
make clean
./configure --with-zlib-include-dir=/usr/local/include --with-zlib-lib-dir=/usr/local/lib --with-jpeg-include-dir=/usr/local/include --with-jpeg-lib-dir=/usr/local/lib --with-lzma-include-dir=/usr/local/include --with-lzma-lib-dir=/usr/local/lib --enable-jpeg12 --with-jpeg12-include-dir=/usr/local/include --with-jpeg12-lib=/usr/local/lib
make && make install
[...]
libtool: link: ( cd ".libs" && rm -f "libtiffxx.la" && ln -s "../libtiffxx.la" "libtiffxx.la" )
gcc -DHAVE_CONFIG_H -I.   -I/usr/local/include -I/usr/local/include -I/usr/local/include   -g -O2 -Wall -W -MT mkg3states.o -MD -MP -MF .deps/mkg3states.Tpo -c -o mkg3states.o mkg3states.c
mv -f .deps/mkg3states.Tpo .deps/mkg3states.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -W  -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib  -o mkg3states mkg3states.o ../port/libport.la /usr/local/lib -llzma -ljbig -ljpeg -lz -lm
libtool: link: gcc -g -O2 -Wall -W -o mkg3states mkg3states.o /usr/local/lib  -L/usr/local/lib ../port/.libs/libport.a /usr/local/lib/liblzma.so -lrt -ljbig /usr/local/lib/libjpeg.so -lz -lm -pthread
/usr/bin/ld: cannot find /usr/local/lib: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:602: recipe for target 'mkg3states' failed
make[2]: *** [mkg3states] Error 1
make[2]: Leaving directory '/usr/local/src/tiff-4.0.6/libtiff'
Makefile:494: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/local/src/tiff-4.0.6/libtiff'
Makefile:545: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


Could you please help me fix this issue on my boxes? One uses gcc v6.10 and the other, gcc v4.9.2, both with the same error.

Thanks,

_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: Building libtiff from source fails with v4.0.6

Bob Friesenhahn
On Wed, 2 Nov 2016, Guillaume Rossolini wrote:

> Hi,
>
> I am having trouble building version 4.0.6.
>
> Here are the commands used and their output:
> make clean
> ./configure --with-zlib-include-dir=/usr/local/include
> --with-zlib-lib-dir=/usr/local/lib
> --with-jpeg-include-dir=/usr/local/include
> --with-jpeg-lib-dir=/usr/local/lib
> --with-lzma-include-dir=/usr/local/include
> --with-lzma-lib-dir=/usr/local/lib --enable-jpeg12
> --with-jpeg12-include-dir=/usr/local/include
> --with-jpeg12-lib=/usr/local/lib

Since you are using --enable-jpeg12, how did you prepare the two
different libjpeg builds (one built as 8-bit and the other as 12,
and patched)?

I have not tried that particular build configuration for myself since
it requires some dedication to prepare the JPEG libraries.

The problem is due to the bare "/usr/local/lib" occuring in this
part of the command:

   "../port/libport.la /usr/local/lib -llzma"

I am not sure what happend to the -L.

While these many options are a convenience, there are actually no
special powers to assure that the headers and libraries all occuring
in the same directories will be discretely used by the
compiler/linker since they all go into the same compound options.

It is just as well to use

./configure \
     'CPPFLAGS=-I/usr/local/include' \
     'LDFLAGS=-L/usr/local/lib' \
      --enable-jpeg12

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: Building libtiff from source fails with v4.0.6

Guillaume Rossolini

On 3 November 2016 at 02:46, Bob Friesenhahn <[hidden email]> wrote:
On Wed, 2 Nov 2016, Guillaume Rossolini wrote:

Hi,

I am having trouble building version 4.0.6.

Here are the commands used and their output:
make clean
./configure --with-zlib-include-dir=/usr/local/include
--with-zlib-lib-dir=/usr/local/lib
--with-jpeg-include-dir=/usr/local/include
--with-jpeg-lib-dir=/usr/local/lib
--with-lzma-include-dir=/usr/local/include
--with-lzma-lib-dir=/usr/local/lib --enable-jpeg12
--with-jpeg12-include-dir=/usr/local/include
--with-jpeg12-lib=/usr/local/lib

Since you are using --enable-jpeg12, how did you prepare the two different libjpeg builds (one built as 8-bit and the other as 12, and patched)?

I have not tried that particular build configuration for myself since it requires some dedication to prepare the JPEG libraries.

The problem is due to the bare "/usr/local/lib" occuring in this part of the command:

  "../port/libport.la /usr/local/lib -llzma"

I am not sure what happend to the -L.

While these many options are a convenience, there are actually no special powers to assure that the headers and libraries all occuring in the same directories will be discretely used by the compiler/linker since they all go into the same compound options.

It is just as well to use

./configure \
    'CPPFLAGS=-I/usr/local/include' \
    'LDFLAGS=-L/usr/local/lib' \
     --enable-jpeg12

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


Hi Bob,

Thanks, that was what I was looking for. I just removed the dependency on libjpeg12, which I don't need and I hadn't applied the patch.
./configure 'CPPFLAGS=-I/usr/local/include' 'LDFLAGS=-L/usr/local/lib'

This configure line worked just fine.

Thanks,


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/