I am a maintainer of an open-source feature extraction library for biomedical images that uses dcmtk to read dicom images. Till now, we have been using version 3.6.7 and were successfully able to integrate it to Windows, Linux and Apple Amd64 Python wheels. Now we are looking into creating Apple arm64 Python wheels and ran into an issue with building dcmtk. We tried the latest version (3.6.8 ) also and experienced the same issue. Below is how we are building it and the error we are seeing.
Code: Select all
curl -L https://github.com/DCMTK/dcmtk/archive/refs/tags/DCMTK-3.6.7.zip -o DCMTK-3.6.7.zip
unzip DCMTK-3.6.7.zip
cd dcmtk-DCMTK-3.6.7
mkdir build_man
cd build_man
cmake -DDCMTK_WITH_ICONV=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_APPS=OFF ..
make install -j4
cd ../../
Code: Select all
2024-01-29T20:30:34.8552320Z [ 58%] Building CXX object dcmrt/libsrc/CMakeFiles/dcmrt.dir/drtbldts.cc.o
2024-01-29T20:30:34.8592310Z Undefined symbols for architecture arm64:
2024-01-29T20:30:34.8653990Z "_TIFFCleanup", referenced from:
2024-01-29T20:30:34.8722770Z DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in dipitiff.cc.o
2024-01-29T20:30:34.8776820Z "_TIFFFdOpen", referenced from:
2024-01-29T20:30:34.8821670Z DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in dipitiff.cc.o
2024-01-29T20:30:34.8891240Z "_TIFFFlushData", referenced from:
2024-01-29T20:30:34.8905070Z DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in dipitiff.cc.o
2024-01-29T20:30:34.8942490Z "_TIFFGetVersion", referenced from:
2024-01-29T20:30:34.8963840Z DiTIFFPlugin::getLibraryVersionString() in dipitiff.cc.o
2024-01-29T20:30:34.8965480Z "_TIFFSetField", referenced from:
2024-01-29T20:30:34.8966970Z DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in dipitiff.cc.o
2024-01-29T20:30:34.8968510Z "_TIFFWriteScanline", referenced from:
2024-01-29T20:30:34.8969880Z DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in dipitiff.cc.o
2024-01-29T20:30:34.8971350Z ld: symbol(s) not found for architecture arm64
2024-01-29T20:30:34.8973270Z clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
2024-01-29T20:30:34.8974920Z make[2]: *** [lib/libdcmimage.17.3.6.7.dylib] Error 1
2024-01-29T20:30:34.8976290Z make[1]: *** [dcmimage/libsrc/CMakeFiles/dcmimage.dir/all] Error 2
Code: Select all
2024-01-29T20:28:39.4241250Z -- The C compiler identification is Clang 16.0.6
2024-01-29T20:28:39.5387130Z -- The CXX compiler identification is Clang 16.0.6
2024-01-29T20:28:39.5866740Z -- Detecting C compiler ABI info
2024-01-29T20:28:39.7707870Z -- Detecting C compiler ABI info - done
2024-01-29T20:28:39.7755040Z -- Check for working C compiler: /opt/homebrew/opt/llvm@16/bin/clang - skipped
2024-01-29T20:28:39.7757340Z -- Detecting C compile features
2024-01-29T20:28:39.7759560Z -- Detecting C compile features - done
2024-01-29T20:28:39.8054970Z -- Detecting CXX compiler ABI info
2024-01-29T20:28:39.9468090Z -- Detecting CXX compiler ABI info - done
2024-01-29T20:28:39.9510650Z -- Check for working CXX compiler: /opt/homebrew/opt/llvm@16/bin/clang++ - skipped
2024-01-29T20:28:39.9512590Z -- Detecting CXX compile features
2024-01-29T20:28:39.9516040Z -- Detecting CXX compile features - done
2024-01-29T20:28:39.9528770Z -- Setting build type to 'Release' as none was specified.
2024-01-29T20:28:39.9555020Z -- Performing Test GXX_SUPPORTS_VISIBILITY
2024-01-29T20:28:40.0586960Z -- Performing Test GXX_SUPPORTS_VISIBILITY - Success
2024-01-29T20:28:40.1193790Z -- Info: DCMTK TIFF support will be enabled
2024-01-29T20:28:40.2960780Z -- Info: DCMTK PNG support will be enabled
2024-01-29T20:28:40.4601580Z -- Performing Test OPENSSL_VERSION_CHECK
2024-01-29T20:28:40.6547340Z -- Performing Test OPENSSL_VERSION_CHECK - Success
2024-01-29T20:28:40.6549340Z -- Info: DCMTK OPENSSL support will be enabled
2024-01-29T20:28:40.6549680Z -- Looking for dlopen in dl
2024-01-29T20:28:40.7584250Z -- Looking for dlopen in dl - found
2024-01-29T20:28:40.9645010Z -- Info: DCMTK XML support will be enabled
2024-01-29T20:28:40.9664680Z -- Info: DCMTK ZLIB support will be enabled
Thanks,
Samee