Bug 669425 - gdcm: FTBFS against openjpeg-1.4
Summary: gdcm: FTBFS against openjpeg-1.4
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdcm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Mario Ceresa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 16:41 UTC by Rex Dieter
Modified: 2011-02-02 17:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-02 17:42:06 UTC
Type: ---


Attachments (Terms of Use)

Description Rex Dieter 2011-01-13 16:41:48 UTC
Dropped openjpeg-1.4 into rawhide yesterday, and seems gdcm fails to build.
http://koji.fedoraproject.org/koji/taskinfo?taskID=2719241

I see these in build.log as a hint.

/usr/bin/c++   -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -O3 -DNDEBUG   CMakeFiles/ClinicalTrialAnnotate.dir/ClinicalTrialAnnotate.o  -o ../../bin/ClinicalTrialAnnotate -rdynamic ../../bin/libgdcmMSFF.so.2.0.16 ../../bin/libgdcmDICT.so.2.0.16 ../../bin/libgdcmIOD.so.2.0.16 ../../bin/libgdcmDSED.so.2.0.16 ../../bin/libgdcmCommon.so.2.0.16 -Wl,-rpath-link,/builddir/build/BUILD/gdcm-2.0.16/bin 
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `cio_tell'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_destroy_compress'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_set_event_mgr'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_encode'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_cio_open'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_image_destroy'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_set_default_encoder_parameters'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_create_compress'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_cio_close'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_set_default_decoder_parameters'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_setup_encoder'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_destroy_decompress'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_image_create'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_create_decompress'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_decode'
../../bin/libgdcmMSFF.so.2.0.16: undefined reference to `opj_setup_decoder'

I seem to vaguely recall that gdcm does some sort of openjpeg symbol mangingly.

Anyway, I'll try to give this some attention over the coming days, but any assistance you could provide to resolve this would be greatly appreciated.

Comment 1 Mario Ceresa 2011-01-13 17:04:11 UTC
Hello Rex!
sure I'll try to help understanding what is going on. Only that I'm a bit busy right now at work and cannot be of much help until saturday.

Best regards,

Mario

Comment 3 Mario Ceresa 2011-01-27 12:41:20 UTC
Hello Rex!
after a bit of investigation I believe that the problem is libgdcmMSFF is not correctly linked to libopenjpeg. 

As far as I got, this happens because the openjpeg-devel package now ships its own OpenJPEGConfig*.cmake files, which take precedence upon the FindOpenJPEG.cmake file that gdcm ships. However, the entry SET(OPENJPEG_LIBRARIES "") is missing information so the linker fails.

Manually adding SET(OPENJPEG_LIBRARIES "/usr/lib64/libopenjpeg.so") to /usr/lib64/openjpeg-1.4/OpenJPEGConfig.cmake did the trick for me.

Now I'll check why cmake does not generate correct linking information on openjpeg

BTW, thanks to kevin for providing a test machine with rawhide installed: it really helped!

With best regards,

Mario

Comment 4 Mario Ceresa 2011-01-27 14:52:51 UTC
Hello again,
Setting the OPENJPEG_LIBRARIES option in openjpeg CMakeLists.txt before configuring the export file solves the problem on the test machine.

This is the patch:

PATCH-START-------------------------------------------
diff --git a/openjpeg_v1_4_sources_r697/CMakeLists.txt b/openjpeg_v1_4_sources_r697/CMakeLists.txt
index 52150f5..eaf5e87 100644
--- a/openjpeg_v1_4_sources_r697/CMakeLists.txt
+++ b/openjpeg_v1_4_sources_r697/CMakeLists.txt
@@ -46,6 +46,8 @@ SET(OPENJPEG_LIBRARY_PROPERTIES
 # OPENJPEG_INSTALL_DATA_DIR         - share dir (say, examples, data, etc)
 # OPENJPEG_INSTALL_INCLUDE_DIR      - include dir (headers)
 
+SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY_NAME})
+
 
 # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
 # warnings
END-PATCH---------------------------------------------

Hope this helps!

With best regards,

Mario

Comment 5 Mario Ceresa 2011-01-31 13:19:43 UTC
Hello Rex! 
did you have the time to test/apply the patch in openjpeg? 

This way gdcm will work again in rawhide...

Thanks and regards,

Mario

Comment 6 Rex Dieter 2011-01-31 14:56:52 UTC
Thanks, I'm @ fudcon , but I'll definitely try to look into this over the next day or 2.

Comment 7 Mario Ceresa 2011-01-31 16:56:30 UTC
Ok, thanks for your prompt reply and enjoy the fudcon!

Comment 8 Rex Dieter 2011-01-31 22:03:59 UTC
OK, fix applied to openjpeg-1.4-3,
http://koji.fedoraproject.org/koji/taskinfo?taskID=2753747

Comment 9 Mario Ceresa 2011-02-01 09:58:54 UTC
Great! but, do you apply the patch after including? I don't see any %patch55 macro in the specfile...

Comment 10 Rex Dieter 2011-02-01 13:03:44 UTC
Silly me, let's try 1.4-4 then

Comment 11 Mario Ceresa 2011-02-02 17:42:06 UTC
Hello Rex,
now I can link correctly, thanks!

I submitted a new build:
http://koji.fedoraproject.org/koji/buildinfo?buildID=216697


With best regards,

Mario


Note You need to log in before you can comment on or make changes to this bug.