Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
sfzhang
Posts: 10
Joined: Thu, 2014-08-28, 08:30
Location: Shanghai, China

Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0

#1 Post by sfzhang » Tue, 2019-08-13, 04:27

Configure:

Code: Select all

./configure --ignore-deprecation --enable-debug --enable-cxx11 --enable-stl --prefix=/usr/local/dcmtk-3.6.4 --with-libtiffinc=/usr/local/tiff-4.0.10 --with-libpnginc=/usr/local/libpng-1.6.35 --with-libiconvinc=/usr/local/libiconv-1.15 | tee configure.log.`date +%Y%m%d`
Modify config/Makefile.def to support shared library

Code: Select all

-66 CFLAGS = -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall
+66 CFLAGS = -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -fPIC

-68 CXXFLAGS = -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall
+68 CXXFLAGS = -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -fPIC

-71 RANLIB = ranlib
+71 RANLIB = :

-72 AR = ar
+72 AR = gcc

-73 ARFLAGS = cruv
+73 ARFLAGS = -shared -o

-84 LIBEXT = a
+84 LIBEXT = so
Build:

Code: Select all

make
Get the error message:

Code: Select all

make[2]: Entering directory '/home/fus/Downloads/dcmtk-3.6.4/dcmdata/libsrc'
c++	-DHAVE_CONFIG_H -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS  -DDEBUG  -c -I. -I. -I../include -I../../config/include -I../../ofstd/include -I../../oflog/include   \
-I/usr/local/libiconv-1.15/include -I/usr/local/libpng-1.6.35/include -I/usr/local/tiff-4.0.10/include  -g -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall -fPIC dcencdoc.cc
In file included from dcencdoc.cc:28:
../include/dcmtk/dcmdata/dcencdoc.h:29:10: fatal error: dcmtk/dcmiod/iodcommn.h: No such file or directory
 #include "dcmtk/dcmiod/iodcommn.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
I found in dcmdata/libsrc/dcencdoc.cc at line 31:

Code: Select all

#include "dcmtk/dcmiod/modequipment.h"
and dcmdata/include/dcmtk/dcmdata/dcencdoc.h at line 29:

Code: Select all

#include "dcmtk/dcmiod/modequipment.h"
Comment the two lines works fine.

Michael Onken
DCMTK Developer
Posts: 1758
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0

#2 Post by Michael Onken » Tue, 2019-08-13, 08:49

Hi,

thank you for the report; the includes have been fixed meanwhile in commit 2d2f2 in December 2018.

Best regards,
Michael

sfzhang
Posts: 10
Joined: Thu, 2014-08-28, 08:30
Location: Shanghai, China

Re: Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0

#3 Post by sfzhang » Tue, 2019-08-13, 09:14

OK. I will apply the patch. Thanks very much!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest