Originally reported on Google Code with ID 119
http://groups.google.com/group/openjpeg/browse_thread/thread/b162c64ddfefe2f8
I've just checkout the trunk.
Then i've run "cmake -DBUILD_THIRDPARTY:BOOL=on ."
But i had a problem at linking time. Indeed in codec/CMakeFiles/j2k_dump.dir/link.txt
libz is included before libpng. It should be placed after because libpng depends on
libz.
error message :
Linking C executable ../../bin/image_to_j2k
../../thirdparty/lib/libpng.a(png.c.o): In function `png_reset_crc':
png.c:(.text+0x1c2): undefined reference to `crc32'
../../thirdparty/lib/libpng.a(png.c.o): In function `png_calculate_crc':
png.c:(.text+0x24a): undefined reference to `crc32'
../../thirdparty/lib/libpng.a(png.c.o): In function `png_reset_zstream':
png.c:(.text+0xe0a): undefined reference to `inflateReset'
../../thirdparty/lib/libpng.a(pngread.c.o): In function `png_create_read_struct_2':
pngread.c:(.text+0x36e): undefined reference to `inflateInit_'
../../thirdparty/lib/libpng.a(pngread.c.o): In function `png_read_row':
pngread.c:(.text+0x1523): undefined reference to `inflate'
../../thirdparty/lib/libpng.a(pngread.c.o): In function `png_read_destroy':
pngread.c:(.text+0x27ba): undefined reference to `inflateEnd'
../../thirdparty/lib/libpng.a(pngrutil.c.o): In function `png_inflate':
pngrutil.c:(.text+0x3ed): undefined reference to `inflate'
pngrutil.c:(.text+0x499): undefined reference to `inflateReset'
../../thirdparty/lib/libpng.a(pngrutil.c.o): In function `png_read_finish_row':
pngrutil.c:(.text+0x5ea1): undefined reference to `inflate'
pngrutil.c:(.text+0x602c): undefined reference to `inflateReset'
../../thirdparty/lib/libpng.a(pngwrite.c.o): In function `png_write_flush':
pngwrite.c:(.text+0x175e): undefined reference to `deflate'
../../thirdparty/lib/libpng.a(pngwrite.c.o): In function `png_write_destroy':
pngwrite.c:(.text+0x19e0): undefined reference to `deflateEnd'
../../thirdparty/lib/libpng.a(pngwutil.c.o): In function `png_text_compress':
pngwutil.c:(.text+0x41a): undefined reference to `deflate'
pngwutil.c:(.text+0x5df): undefined reference to `deflate'
../../thirdparty/lib/libpng.a(pngwutil.c.o): In function `png_write_compressed_data_out':
pngwutil.c:(.text+0x8fd): undefined reference to `deflateReset'
../../thirdparty/lib/libpng.a(pngwutil.c.o): In function `png_write_IHDR':
pngwutil.c:(.text+0xde1): undefined reference to `deflateInit2_'
../../thirdparty/lib/libpng.a(pngwutil.c.o): In function `png_write_finish_row':
pngwutil.c:(.text+0x391a): undefined reference to `deflate'
pngwutil.c:(.text+0x3a1f): undefined reference to `deflateReset'
../../thirdparty/lib/libpng.a(pngwutil.c.o): In function `png_write_filtered_row':
pngwutil.c:(.text+0x5497): undefined reference to `deflate'
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [bin/image_to_j2k] Erreur 1
make[1]: *** [applications/codec/CMakeFiles/image_to_j2k.dir/all] Erreur 2
make: *** [all] Erreur 2
and codec/CMakeFiles/j2k_dump.dir/link.txt
/usr/bin/gcc CMakeFiles/j2k_dump.dir/j2k_dump.c.o CMakeFiles/j2k_dump.dir/convert.c.o
CMakeFiles/j2k_dump.dir/index.c.o CMakeFiles/j2k_dump.dir/__/common/color.c.o CMakeFiles/j2k_dump.dir/__/common/opj_getopt.c.o
-o ../../bin/j2k_dump -rdynamic ../../bin/libopenjpeg.so.1.99.0 ../../thirdparty/lib/libz.a
../../thirdparty/lib/libpng.a ../../thirdparty/lib/libtiff.a ../../thirdparty/lib/liblcms2.a
-lm -Wl,-rpath,/home/maximilien/Projects/OpenJPEG/bin:
Reported by detonin on 2012-02-11 21:40:26
Originally reported on Google Code with ID 119
Reported by detonin on 2012-02-11 21:40:26