Package: orthanc-webviewer
Version: 2.2-1
Severity: normal
Tags: patch

Dear Maintainer,

Currently the file debian/patches/cmake is removing cmake's automatic
library linking resolution and adding "missing" libraries manually.

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-webviewer-2.2/debian/patches/cmake orthanc-webviewer-2.2/debian/patches/cmake
--- orthanc-webviewer-2.2/debian/patches/cmake	2016-06-29 05:31:50.000000000 -0300
+++ orthanc-webviewer-2.2/debian/patches/cmake	2017-03-10 03:21:43.000000000 -0300
@@ -15,13 +15,7 @@
  
  
  # Check that the Orthanc SDK headers are available or download them
-@@ -177,15 +177,14 @@ if (STATIC_BUILD OR NOT USE_SYSTEM_GDCM)
-   add_dependencies(OrthancWebViewer GDCM)
- endif()
- 
--target_link_libraries(OrthancWebViewer ${GDCM_LIBRARIES})
--
- message("Setting the version of the library to ${ORTHANC_WEBVIEWER_VERSION}")
+@@ -183,9 +183,10 @@ message("Setting the version of the libr
  
  add_definitions(-DORTHANC_WEBVIEWER_VERSION="${ORTHANC_WEBVIEWER_VERSION}")
  
@@ -30,7 +24,7 @@
 -  SOVERSION ${ORTHANC_WEBVIEWER_VERSION})
 +set_target_properties(OrthancWebViewer PROPERTIES
 +  NO_SONAME ON
-+  LINK_FLAGS "-lgdcmMSFF -luuid -Wl,-soname,libOrthancWebViewer.so.${ORTHANC_WEBVIEWER_VERSION}"
++  LINK_FLAGS "-Wl,-soname,libOrthancWebViewer.so.${ORTHANC_WEBVIEWER_VERSION}"
 +  )
  
  install(

Reply via email to