Re: Compiling libtiff support in Kakadu - not finding header file?
On 2012-09-10 18:26 +0200, francis picabia wrote:
> Strangely, we're not getting many answers on this from the support
> (creator) of Kakadu, but maybe anyone with some code porting savvy can help.
>
> This is Linux x86_64, building in the Kakadu apps part of the build tree.
> It builds fine with default Makefile.
>
> When libtiff4-dev is installed and we attempt to build
> its support by including this in the Makefile:
>
> DEFINES = -DKDU_INCLUDE_TIFF
>
> the compile does not succeed. The end of the make looks like this:
>
>
> g++ -I../../coresys/common -I../args -I../image -I../compressed_io
> -I../support -I../client_server -O2 -DNDEBUG -Wall -Wno-uninitialized
> -Wno-deprecated -m64 -mssse3 -DKDU_X86_INTRINSICS -D
> KDU_INCLUDE_TIFF -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> ../kdu_compress/kdu_compress.cpp \
> args.o image_in.o kdu_tiff.o palette.o jp2.o jpx.o \
> roi_sources.o libkdu_v70R.so \
> -o ../../bin/Linux-x86-64-gcc/kdu_compress -lm -lpthread
> image_in.o: In function `tif_in::tif_in(char const*, kdu_image_dims&,
> int&, kdu_rgb8_palette*, long long, bool)':
> image_in.cpp:(.text+0x4a3e): undefined reference to `TIFFOpen'
> image_in.cpp:(.text+0x4b28): undefined reference to `TIFFScanlineSize'
> image_in.o: In function `tif_in::tif_in(char const*, kdu_image_dims&,
> int&, kdu_rgb8_palette*, long long, bool)':
> image_in.cpp:(.text+0x6efe): undefined reference to `TIFFOpen'
> image_in.cpp:(.text+0x6fe8): undefined reference to `TIFFScanlineSize'
> image_in.o: In function `tif_in::get(int, kdu_line_buf&, int)':
> image_in.cpp:(.text+0x9795): undefined reference to `TIFFReadScanline'
> image_in.cpp:(.text+0x9a50): undefined reference to `TIFFReadTile'
> image_in.cpp:(.text+0x9a6c): undefined reference to `TIFFReadScanline'
> image_in.o: In function `tif_in::~tif_in()':
> image_in.cpp:(.text+0x9e26): undefined reference to `TIFFClose'
> image_in.o: In function `tif_in::~tif_in()':
> image_in.cpp:(.text+0xa026): undefined reference to `TIFFClose'
> image_in.o: In function `tif_in::~tif_in()':
> image_in.cpp:(.text+0xa224): undefined reference to `TIFFClose'
> collect2: ld returned 1 exit status
> make: *** [kdu_compress] Error 1
>
>
> The Kakadu programmer says "it looks like it is not including the
> Libtiff header.
He seems to be wrong. Those "undefined reference" errors mean that the
linker cannot find the library which contains the symbols.
> How to troubleshoot the source of the problem?
I don't know anything about Kakadu, but you'll likely have to add -ltiff
to the compiler commandline above somehow.
Cheers,
Sven
Reply to: