Package: orthanc-dicomweb
Version: 0.3+dfsg-1
Severity: normal
Tags: patch
Dear Maintainer,
Similar issue as reported for orthanc-webviewer 2.2-1 in bug #857355.
Currently the file debian/patches/cmake is removing cmake's automatic
library linking resolution and adding "missing" libraries manually,
while also unecessarily modifying a link_libraries call on
Orthanc/Resources/CMake/Compiler.cmake.
The uuid library ends up being added twice while linking
libOrthancWebViewer.so. I verified that this is no longer required.
The libraries are being added through LINK_FLAGS, which is not a good
practice. On make this would be the similar to adding libraries to
LD_FLAGS instead of LD_LIBS, which causes 'undefined reference' errors
when stric order is enabled (like in Ubuntu, where the package FTBFS).
I verified that cmake is able to successfully determine the required
gdcm libraries and that the library arguments in LINK_FLAGS can be
safely removed.
Please see the attached patch for the fix.
Regards,
Tiago Daitx
-- System Information:
Debian Release: stretch/sid
APT prefers xenial-updates
APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500,
'xenial'), (400, 'xenial-proposed'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-34-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru orthanc-dicomweb-0.3+dfsg/debian/patches/cmake orthanc-dicomweb-0.3+dfsg/debian/patches/cmake
--- orthanc-dicomweb-0.3+dfsg/debian/patches/cmake 2016-06-29 05:58:36.000000000 -0300
+++ orthanc-dicomweb-0.3+dfsg/debian/patches/cmake 2017-03-10 15:07:31.000000000 -0300
@@ -15,13 +15,7 @@
include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake)
-@@ -136,15 +136,13 @@ add_library(OrthancDicomWeb SHARED ${COR
- ${AUTOGENERATED_SOURCES}
- )
-
--target_link_libraries(OrthancDicomWeb ${GDCM_LIBRARIES})
--
- message("Setting the version of the library to ${ORTHANC_DICOM_WEB_VERSION}")
+@@ -142,9 +142,9 @@ add_library(OrthancDicomWeb SHARED ${COR
add_definitions(-DORTHANC_DICOM_WEB_VERSION="${ORTHANC_DICOM_WEB_VERSION}")
@@ -30,20 +24,7 @@
- SOVERSION ${ORTHANC_DICOM_WEB_VERSION}
+set_target_properties(OrthancDicomWeb PROPERTIES
+ NO_SONAME ON
-+ LINK_FLAGS "-lgdcmDICT -lgdcmDSED -lgdcmMSFF -lgdcmCommon -luuid -Wl,-soname,libOrthancDicomWeb.so.${ORTHANC_DICOM_WEB_VERSION}"
++ LINK_FLAGS "-Wl,-soname,libOrthancDicomWeb.so.${ORTHANC_DICOM_WEB_VERSION}"
)
install(
-Index: OrthancDicomWeb-0.3/Orthanc/Resources/CMake/Compiler.cmake
-===================================================================
---- OrthancDicomWeb-0.3.orig/Orthanc/Resources/CMake/Compiler.cmake
-+++ OrthancDicomWeb-0.3/Orthanc/Resources/CMake/Compiler.cmake
-@@ -60,7 +60,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux
- # Remove the "-rdynamic" option
- # http://www.mail-archive.com/[email protected]/msg08837.html
- set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
-- link_libraries(uuid pthread rt)
-+ link_libraries(pthread rt)
-
- if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")