build error on ubuntu

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Ryan Dou
Posts: 6
Joined: Thu, 2011-06-09, 16:40
Location: Tianjin, China

build error on ubuntu

#1 Post by Ryan Dou »

hi, everyone. I am a newbie. when I build the dcmtk3.6.3 on ubuntu 18.04 with cmake and make, it has an error. the content is:

[ 17%] Building CXX object dcmdata/apps/CMakeFiles/xml2dcm.dir/xml2dcm.cc.o
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
from /home/ray/dcmtk-3.6.3/dcmdata/apps/xml2dcm.cc:55:
/usr/include/libxml2/libxml/encoding.h:31:10: fatal error: unicode/ucnv.h: No such file or directory
#include <unicode/ucnv.h>
^~~~~~~~~~~~~~~~
compilation terminated.
dcmdata/apps/CMakeFiles/xml2dcm.dir/build.make:62: recipe for target 'dcmdata/apps/CMakeFiles/xml2dcm.dir/xml2dcm.cc.o' failed
make[2]: *** [dcmdata/apps/CMakeFiles/xml2dcm.dir/xml2dcm.cc.o] Error 1
CMakeFiles/Makefile2:1242: recipe for target 'dcmdata/apps/CMakeFiles/xml2dcm.dir/all' failed
make[1]: *** [dcmdata/apps/CMakeFiles/xml2dcm.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

what can I do next? thanks very much!

Ryan Dou
Posts: 6
Joined: Thu, 2011-06-09, 16:40
Location: Tianjin, China

Re: build error on ubuntu

#2 Post by Ryan Dou »

can anyone help me? is this unicode error? but why it present "No such file or directory"? Is it because there is no library file? thanks.

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: build error on ubuntu

#3 Post by J. Riesmeier »

I guess that your system's libxml2 library has been compiled with LIBXML_ICU_ENABLED defined. The following excerpt is from the listed libxml2 header file "/usr/include/libxml2/libxml/encoding.h":

Code: Select all

#ifdef LIBXML_ICU_ENABLED
#include <unicode/ucnv.h>
#endif
Does the DCMTK compile if you disable the use of libxml2 (see INSTALL file)?

Ryan Dou
Posts: 6
Joined: Thu, 2011-06-09, 16:40
Location: Tianjin, China

Re: build error on ubuntu

#4 Post by Ryan Dou »

J. Riesmeier wrote:I guess that your system's libxml2 library has been compiled with LIBXML_ICU_ENABLED defined. The following excerpt is from the listed libxml2 header file "/usr/include/libxml2/libxml/encoding.h":

Code: Select all

#ifdef LIBXML_ICU_ENABLED
#include <unicode/ucnv.h>
#endif
Does the DCMTK compile if you disable the use of libxml2 (see INSTALL file)?
I got it! Thanks so much!

Post Reply

Who is online

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