[Debian-med-packaging] Bug#1075916: libdcmtk-dev: Removed dependencies are required for a CMake target
Mathieu Malaterre
malat at debian.org
Mon Jul 8 07:23:57 BST 2024
Control: reassign -1 liborthancframework-dev
On Sun, Jul 7, 2024 at 9:48 PM Adrian Bunk <bunk at 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"
[...]
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
| grep png | head
0000000000000000 T
_ZN7Orthanc9PngReader7PngRabi14MemoryCallbackEP14png_struct_defPhm
U png_create_info_struct
% apt-cache show liborthancframework-dev | grep Depends
Depends: liborthancframework1 (= 1.12.4+dfsg-2), libboost-all-dev,
libcivetweb-dev (>= 1.14), libdcmtk-dev, libjsoncpp-dev,
liblua5.3-dev, libpugixml-dev, libsqlite3-dev
Thanks,
More information about the Debian-med-packaging
mailing list