Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

third-party lib order #119

Closed
gcode-importer opened this issue Feb 11, 2012 · 2 comments
Closed

third-party lib order #119

gcode-importer opened this issue Feb 11, 2012 · 2 comments
Assignees
Milestone

Comments

@gcode-importer
Copy link

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

@gcode-importer
Copy link
Author

Reported by detonin on 2012-02-20 16:18:20

  • Labels added: Milestone-Release2.0

@gcode-importer
Copy link
Author

Cannot reproduce today using:


URL: https://openjpeg.googlecode.com/svn/trunk
Revision: 1690

and

$ cmake --version
cmake version 2.8.7

It shows as:


cd /home/mathieu/Projects/OpenJPEG/svn/trunk/bin-static/applications/codec && /usr/bin/cmake
-E cmake_link_script CMakeFiles/j2k_dump.dir/link.txt --verbose=1
/usr/bin/gcc     -Wl,--no-as-needed 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/libpng.a
../../thirdparty/lib/libtiff.a ../../thirdparty/lib/liblcms2.a ../../thirdparty/lib/libz.a
-lm -Wl,-rpath,/home/mathieu/Projects/OpenJPEG/svn/trunk/bin-static/bin: 

Reported by malaterre on 2012-05-29 13:10:02

  • Status changed: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants