Package: odin
Version: 2.0.3-0.1
Severity: serious
Tags: patch
Justification: FTBFS
User: [email protected]
Usertags: origin-ubuntu artful ubuntu-patch

The odin package FTBFS in unstable with the new dcmtk:

/usr/bin/make  check-TESTS
make[4]: Entering directory '/tmp/odin-2.0.3'
make[5]: Entering directory '/tmp/odin-2.0.3'
FAIL: cmdline-utils/odintestsuite
============================================================================
Testsuite summary for odin 2.0.3
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
============================================================================
Makefile:711: recipe for target 'test-suite.log' failed
make[5]: *** [test-suite.log] Error 1

And test-suite.log shows:

E: DcmDataDictionary: Cannot open file: /usr/share/libdcmtk8/dicom.dic
FileIO    |ERROR: DicomFormat.DicomFormat::write : No data dictionary loaded, 
check environment variable DCMDICTPATH
UnitTest  |ERROR: FileIO dcm.check : simple autowrite failed
UnitTest  |ERROR: check_all : Test of FileIO dcm failed

Unfortunately, the path to the dictionary changes for each upstream ABI
change; where it was previously in /usr/share/libdcmtk8, it's now in
/usr/share/libdcmtk11.  

I've applied the attached patch to odin in Ubuntu, which, provided dcmtk
continues to follow the same convention for its dictionary paths, should be
future proof against further changes.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -Nru odin-2.0.3/debian/rules odin-2.0.3/debian/rules
--- odin-2.0.3/debian/rules     2016-07-04 09:40:03.000000000 -0700
+++ odin-2.0.3/debian/rules     2017-06-25 19:27:02.000000000 -0700
@@ -3,6 +3,8 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+DCMMAJOR := $(shell readlink -f /usr/lib/libdcmimgle.so | cut -f3 -d.)
+
 # one ring to rule them all ...
 %:
        dh $@ --with autoreconf
@@ -28,7 +30,7 @@
 
 # there is also a 'test' target that doesn't do the right thing
 override_dh_auto_test:
-       DCMDICTPATH=/usr/share/libdcmtk8/dicom.dic $(MAKE) check
+       DCMDICTPATH=/usr/share/libdcmtk$(DCMMAJOR)/dicom.dic $(MAKE) check
 
 # shared libs in odin package a only for private use
 override_dh_makeshlibs:

Reply via email to