compiling DCMTK-3.6.1_20140617 with Libiconv on GNU/Linux

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
DamienL
Posts: 2
Joined: Wed, 2013-03-20, 08:48

compiling DCMTK-3.6.1_20140617 with Libiconv on GNU/Linux

#1 Post by DamienL »

Hi,
I'm compiling the latest snapshot (DCMTK-3.6.1_20140617) on Debian GNU/Linux Stable and everything works perfectly fine except that I can't enable the support to libiconv.

===
configure:14207: checking whether to include libiconv support
configure:14240: c++ -o conftest -I/usr/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall conftest.cpp -lrt -lpthread -lnsl -liconv -lcharset >&5
conftest.cpp: In function 'int main()':
conftest.cpp:259:44: error: 'NULL' was not declared in this scope
configure:14240: $? = 1
configure: failed program was:
| /* confdefs.h */
==========

I have figured out that configure fails to check libiconv because there's no libiconv. In fact the libiconv package does not exist anymore, because on Linux, libiconv is now part of libc (since at least 2006)

My question is: what is the trick to enable libiconv on GNU/Linux ?

I guess there are 2 options:
1/ Force dcmtk to use the glibc's version of iconv but I have not figured how yet.
2/ Compile and install libiconv manually, and finally compile dcmtk. However, I suspect there will be conflict between the two versions of libiconv (the one from libc and the one from libiconv)

How do you guys have successfully enable iconv on GNU/Linux ?

Regards,
Damien

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

Re: compiling DCMTK-3.6.1_20140617 with Libiconv on GNU/Linu

#2 Post by J. Riesmeier »

The latter works, i.e. "2/". Using the glibc version of the iconv functions is still on our to-do list...

DamienL
Posts: 2
Joined: Wed, 2013-03-20, 08:48

Re: compiling DCMTK-3.6.1_20140617 with Libiconv on GNU/Linu

#3 Post by DamienL »

Hi,
here is a quick update for those interested in using the latest snapshot with iconv enabled:
* I have not been able to successfully use iconv with the libc.
* there is a bug opened by the dcmtk packager so you can have an update
Debian Bug report
DCMTK package page

Best regards,
Damien

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest