Building on mac - OpenSSL issue

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
michalp
Posts: 6
Joined: Mon, 2018-07-09, 14:11

Building on mac - OpenSSL issue

#1 Post by michalp » Mon, 2018-08-13, 10:26

Hello there,

I'm having a problem when building DCMT on MacOS (building static library). The error looks as follows:
[ 46%] Building CXX object dcmtls/libsrc/CMakeFiles/dcmtls_obj.dir/tlslayer.cc.o
cd /Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/cmake-build-debug/dcmtls/libsrc && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DDCMTK_BUILD_IN_PROGRESS -DUSE_NULL_SAFE_OFSTRING -D_BSD_COMPAT -D_BSD_SOURCE -D_OSF_SOURCE -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -Ddcmtls_EXPORTS -I/Users/rafalc/Workspace/DCMTKdeps/install/libtiff/include -I/usr/local/include -I/Users/rafalc/Workspace/DCMTKdeps/install/libpng/include -I/Users/rafalc/Workspace/DCMTKdeps/install/zlib/include -I/Users/rafalc/Workspace/DCMTKdeps/install/openssl/include -I/Users/rafalc/Workspace/DCMTKdeps/install/libxml2/include/libxml2 -I/Users/rafalc/Workspace/DCMTKdeps/install/libiconv/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/cmake-build-debug/config/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/ofstd/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/oflog/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmdata/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmimgle/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmimage/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmjpeg/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmjpls/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmtls/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmnet/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmsr/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmsign/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmwlm/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmqrdb/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmpstat/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmrt/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmiod/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmfg/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmseg/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmtract/include -I/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmpmap/include -fvisibility=hidden -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -std=c++11 -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/dcmtls_obj.dir/tlslayer.cc.o -c /Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmtls/libsrc/tlslayer.cc
/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmtls/libsrc/tlslayer.cc:404:40: error: member access into incomplete type 'SSL_CTX' (aka 'ssl_ctx_st')
X509_VERIFY_PARAM* const parameter = DCMTK_SSL_CTX_get0_param(transportLayerContext);
^
/Users/rafalc/Workspace/CVS/DCMTK/3.6.3/Source/dcmtls/libsrc/tlslayer.cc:49:38: note: expanded from macro 'DCMTK_SSL_CTX_get0_param'
#define DCMTK_SSL_CTX_get0_param(A) A->param;
^
/Users/rafalc/Workspace/DCMTKdeps/install/openssl/include/openssl/ossl_typ.h:145:16: note: forward declaration of 'ssl_ctx_st'
typedef struct ssl_ctx_st SSL_CTX;
^
1 error generated.
make[2]: *** [dcmtls/libsrc/CMakeFiles/dcmtls_obj.dir/tlslayer.cc.o] Error 1
make[1]: *** [dcmtls/libsrc/CMakeFiles/dcmtls_obj.dir/all] Error 2

I've been searching for solution, but didn't found one.
Could you please point me in the right directions?

Thanks,
MP

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Building on mac - OpenSSL issue

#2 Post by Jan Schlamelcher » Mon, 2018-09-03, 08:42

I think I can remember some issues with OpenSSL on MacOS that a colleague fixed this year, perhaps after releasing 3.6.3. Can you perhaps try the most recent Git version on DCMTK and see whether that fixes it?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest