On Mon, Jul 08, 2024 at 08:23:57AM +0200, Mathieu Malaterre wrote:
> Control: reassign -1 liborthancframework-dev
> 
> On Sun, Jul 7, 2024 at 9:48 PM Adrian Bunk <b...@debian.org> wrote:
> >
> > Package: libdcmtk-dev
> > Version: 3.6.8-5
> > Severity: serious
> > Tags: ftbfs
> > Control: affects -1 src:orthanc-neuro
> >
> > https://buildd.debian.org/status/logs.php?pkg=orthanc-neuro&ver=1.1%2Bdfsg-1%2Bb1
> >
> > ...
> > [ 90%] Linking CXX shared library libOrthancNeuro.so
> > /usr/bin/cmake -E cmake_link_script CMakeFiles/OrthancNeuro.dir/link.txt 
> > --verbose=1
> > /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
> > -fstack-protector-strong -fstack-clash-protection -Wformat 
> > -Werror=format-security -fcf-protection -DNDEBUG -Wdate-time 
> > -D_FORTIFY_SOURCE=2 -Wall -Wno-long-long -Wno-variadic-macros -Wl,-z,relro 
> > -Wl,-z,now -Wl,--no-undefined -Wl,--as-needed 
> > -Wl,--version-script=/<<PKGBUILDDIR>>/Resources/Orthanc/Plugins/VersionScriptPlugins.map
> >  -shared -Wl,-soname,libOrthancNeuro.so.1.1 -o libOrthancNeuro.so.1.1 
> > CMakeFiles/OrthancNeuro.dir/Sources/Plugin/Plugin.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Plugin/PluginFrameDecoder.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/BufferReader.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/CSAHeader.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/CSATag.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/DicomInstancesCollection.cpp.o
> >  CMakeFiles/OrthancNeuro.dir/Sources/Framework/IDicomFrameDecoder.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/InputDicomInstance.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/NeuroToolbox.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/NiftiWriter.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Sources/Framework/Slice.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/AUTOGENERATED/EmbeddedResources.cpp.o 
> > CMakeFiles/OrthancNeuro.dir/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp.o
> >   -lpthread -lrt -ldl -Wl,-Bstatic -lOrthancFramework -Wl,-Bdynamic 
> > -ldcmdata -ldcmjpls -ldcmimage -ldcmjpeg -lofstd -lboost_filesystem 
> > -lboost_iostreams -lboost_locale -lboost_regex -lboost_thread -lpugixml 
> > -luuid -ljsoncpp -lpng -ljpeg -lz -lniftiio -lznz -lrt -ldl -Wl,-Bstatic 
> > -lOrthancFramework -Wl,-Bdynamic -ldcmdata -ldcmjpls -ldcmimage -ldcmjpeg 
> > -lofstd -lboost_filesystem -lboost_iostreams -lboost_locale -lboost_regex 
> > -lboost_thread -lpugixml -luuid -ljsoncpp -lpng -ljpeg -lz -lniftiio -lznz
> > /usr/bin/ld: cannot find -lpng: No such file or directory
> > /usr/bin/ld: cannot find -ljpeg: No such file or directory
> > /usr/bin/ld: cannot find -lpng: No such file or directory
> > /usr/bin/ld: cannot find -ljpeg: No such file or directory
> > collect2: error: ld returned 1 exit status
> > make[3]: *** [CMakeFiles/OrthancNeuro.dir/build.make:300: 
> > libOrthancNeuro.so.1.1] Error 1
> >
> >
> >
> > dcmtk (3.6.8-4) experimental; urgency=medium
> > ...
> >   * d/control: Reduce number of dependencies for -dev package
> >
> >
> > That's problematic when the CMake files require them for some target:
> >   /usr/lib/x86_64-linux-gnu/cmake/dcmtk/DCMTKTargets.cmake:  
> > INTERFACE_LINK_LIBRARIES 
> > "DCMTK::oflog;DCMTK::dcmdata;DCMTK::dcmimgle;/usr/lib/x86_64-linux-gnu/libtiff.so;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so"
> >
> 
> Here is what I have no my side:
> 
> % grep tiff  /usr/lib/x86_64-linux-gnu/cmake/dcmtk/DCMTKTargets.cmake
> -> nothing
> 
> since I manually simplified it to:
> 
> [...]
>   INTERFACE_LINK_LIBRARIES "DCMTK::oflog;DCMTK::dcmdata;DCMTK::dcmimgle"
> [...]

I see your point that orthanc-neuro is the bigger problem here,
I am less sure how many of the 3 packages involved are considered buggy.

> Rebuilding orthanc-neuro with this new cmake file *still* triggers the
> exact same symptoms. I suspect it is dues to orthanc-neuro d/rules:
> 
> [...]
> "-DORTHANC_FRAMEWORK_ADDITIONAL_LIBRARIES=dcmdata [...] png jpeg
> [...]
> 
> Fundamentally I believe the real linking error should occur with the
> static libs:
> 
> % nm  /usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib/libOrthancFramework.a
>...

Dependencies for static linking are a mess, we do not usually have them 
in place since static linking is not recommended in most cases.

orthanc-neuro builds and links with the shared library when I remove the 
-DORTHANC_FRAMEWORK_USE_SHARED:BOOL=OFF, is there any reason why this 
would not work?

> Thanks,

cu
Adrian

Reply via email to