I'm not a programmer however I'm a firm believer in giving back to worthwhile projects like DCMTK and so I'm seriously considering setting up a public PPA for DCMTK for Ubuntu users. I'm not sure how many users out there use Ubuntu as there certainly seems to be a lot of Windows users, but I guess we'll wait and see.
So, that all being said, I'm obviously missing a few things as I've tried compiling the latest version a number of times and consistently get errors.
I download the support libraries (those found in the FTP Support folder) and compile them in the following order:
- zlib
- tiff
- libpng
- libxml
- libiconv
- openssl
- extract the file
- enter the folder
- run ./configure (./config for openssl)
- run make
- run make test (openssl only)
- run make install
Then I attempt to compile DCMTK as follows
- extract the file
- obtain my gcc version (7)
- create a folder according to my gcc version and enter that folder
- run cmake ../dcmtk-3.6.4 -DBUILD_SHARED_LIB=ON
- make -j8
- make DESTDIR=../final install
Inspecting CMakeOutput.log, nothing really looks amiss, whereas CMakeError.log contains a number of "failed recipes"used as include directory in directory /home/dave/dcmtkTemp/dcmtk-3.6.4/dcmpmap/include
JPEG_LIBRARY (ADVANCED)
linked by target "dcmimage" in directory /home/dave/dcmtkTemp/dcmtk-3.6.4/dcmimage/libsrc
-- Configuring incomplete, errors occurred!
See also "/home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeOutput.log".
See also "/home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeError.log".
Now as stated, I'm not a programmer but it appears that (at least in this instance) the libiconv libraries weren't installed correctly. Am I not compiling libiconv correctly? When I run make install (for all libraries), I pipe the output to files and in reading the file from libiconv's "make install" command, I read that in order to link the libraries for use later on (which I presume I need to do) I have to use the libtool. I've triedPerforming C++ SOURCE FILE Test WITH_STDLIBC_ICONV failed with the following output:
Change Dir: /home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_6462e/fast"
/usr/bin/make -f CMakeFiles/cmTC_6462e.dir/build.make CMakeFiles/cmTC_6462e.dir/build
make[1]: Entering directory '/home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_6462e.dir/src.cxx.o
/usr/bin/c++ -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 -DWITH_STDLIBC_ICONV -o CMakeFiles/cmTC_6462e.dir/src.cxx.o -c /home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_6462e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6462e.dir/link.txt --verbose=1
/usr/bin/c++ -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=1
99506L -DWITH_STDLIBC_ICONV -rdynamic CMakeFiles/cmTC_6462e.dir/src.cxx.o -o cmTC_6462e
CMakeFiles/cmTC_6462e.dir/src.cxx.o: In function `main':
src.cxx:(.text+0x17): undefined reference to `libiconv_open'
src.cxx:(.text+0x3c): undefined reference to `libiconv'
src.cxx:(.text+0x48): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_6462e.dir/build.make:97: recipe for target 'cmTC_6462e' failed
make[1]: *** [cmTC_6462e] Error 1
make[1]: Leaving directory '/home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_6462e/fast' failed
make: *** [cmTC_6462e/fast] Error 2
Source file was:
#include <iconv.h>
int main(){iconv_t cd = iconv_open("","");iconv(cd,0,0,0,0);iconv_close(cd);return 0;}
Performing C++ SOURCE FILE Test LIBICONV_SECOND_ARGUMENT_CONST failed with the following output:
Change Dir: /home/dave/dcmtkTemp/dcmtk-gcc-7/CMakeFiles/CMakeTmp
Code: Select all
libtool link /usr/local/lib/libiconv.so
I appreciate that once this works, I need to package it up which I'm pretty sure I can handle, but failing at this first hurdle is so de-moralizing...
Can anyone please give me some guidance?