I am trying to build orthanc stone webviewer and associated samples (e.g. RtViewer) using the instructions described at. Everything going smooth until line #38. Looks like there is an issue in CMake config file or the command line options, when I run “ninja install” I get a bunch of compilation errors, all of them related to Boost.
I can understand somehow there is a mismatch to the boost configuration. Any help is appreciated. I am posting a few compilation errors below. Similar errors are generated for multiple modules during compilation.
FAILED: CMakeFiles/StoneWebViewer.dir/orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp.o
/home/user/apps/emsdk/upstream/emscripten/em++ -DBOOST_ALL_NOLIB -DBOOST_ALL_NO_LIB -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_HAS_POSIX_AT_APIS -DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF -DBOOST_HAS_FILESYSTEM_V3=1 -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE -DBOOST_LOCALE_NO_LIB -DBOOST_LOCALE_NO_STD_BACKEND=1 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 -DBOOST_LOCALE_WITH_ICONV=1 -DBOOST_NO_AUTO_PTR -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_BUILD_LIB -DDCMTK_HAVE_POLL=1 -DDCMTK_INSIDE_LOG4CPLUS=1 -DDCMTK_USE_EMBEDDED_DICTIONARIES=1 -DDCMTK_VERSION_NUMBER=367 -DDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 -DDISABLE_NAGLE_ALGORITHM=1 -DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_NO_ASSEMBLER -DHAS_ORTHANC_EXCEPTION=1 -DJSONCPP_DEPRECATED_STACK_LIMIT=5000 -DLOG4CPLUS_DISABLE_FATAL=1 -DORTHANC_API_VERSION=18 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 -DORTHANC_BUILDING_STONE_LIBRARY=1 -DORTHANC_DATABASE_VERSION=6 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1 -DORTHANC_ENABLE_BASE64=1 -DORTHANC_ENABLE_CIVETWEB=0 -DORTHANC_ENABLE_CURL=0 -DORTHANC_ENABLE_DCMTK=1 -DORTHANC_ENABLE_DCMTK_JPEG=1 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=1 -DORTHANC_ENABLE_DCMTK_NETWORKING=0 -DORTHANC_ENABLE_DCMTK_TRANSCODING=0 -DORTHANC_ENABLE_GLEW=0 -DORTHANC_ENABLE_JPEG=1 -DORTHANC_ENABLE_LOCALE=1 -DORTHANC_ENABLE_LOGGING=1 -DORTHANC_ENABLE_LOGGING_STDIO=1 -DORTHANC_ENABLE_LUA=0 -DORTHANC_ENABLE_MD5=1 -DORTHANC_ENABLE_MONGOOSE=0 -DORTHANC_ENABLE_OPENGL=1 -DORTHANC_ENABLE_PKCS11=0 -DORTHANC_ENABLE_PNG=1 -DORTHANC_ENABLE_PUGIXML=1 -DORTHANC_ENABLE_SDL=0 -DORTHANC_ENABLE_SQLITE=0 -DORTHANC_ENABLE_SSL=0 -DORTHANC_ENABLE_THREADS=0 -DORTHANC_ENABLE_WASM=1 -DORTHANC_ENABLE_ZLIB=1 -DORTHANC_LEGACY_JSONCPP=0 -DORTHANC_MAXIMUM_TAG_LENGTH=256 -DORTHANC_SANDBOXED=1 -DORTHANC_STONE_MAX_TAG_LENGTH=256 -DORTHANC_VERSION="mainline" -DORTHANC_VERSION_MAJOR=999 -DORTHANC_VERSION_MINOR=999 -DORTHANC_VERSION_REVISION=999 -DPNG_ARM_NEON_OPT=0 -DPNG_IMPEXP=“” -DPNG_NO_CONFIG_H=1 -DPNG_NO_CONSOLE_IO=1 -DPNG_NO_STDIO=1 -DSTONE_WEB_VIEWER_VERSION="mainline" -Ifreetype-2.9.1/include -Iboost_1_80_0/libs/locale/src -Iboost_1_80_0/libs/atomic/src -Iboost_1_80_0 -Ie2fsprogs-1.44.5/lib -IAUTOGENERATED -Ijpeg-9c -Izlib-1.2.11 -Ilibpng-1.6.36 -Ipugixml-1.9/src -Ijsoncpp-1.9.4/include -Idcmtk-3.6.7/dcmiod/include -Idcmtk-3.6.7/dcmjpeg/include -Idcmtk-3.6.7/dcmjpeg/libijg8 -Idcmtk-3.6.7/dcmjpeg/libijg12 -Idcmtk-3.6.7/dcmjpeg/libijg16 -Idcmtk-3.6.7/dcmimgle/include -Idcmtk-3.6.7/dcmjpls/include -Idcmtk-3.6.7/dcmjpls/libcharls -Idcmtk-3.6.7/config/include -Idcmtk-3.6.7/ofstd/include -Idcmtk-3.6.7/oflog/include -Idcmtk-3.6.7/dcmdata/include -Iorthanc/OrthancFramework/Sources -Icairo-1.14.12/src -Ipixman-0.34.0/pixman -s WASM=1 -s FETCH=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-command-line-argument -s WASM=1 -O2 -DNDEBUG -s WASM=1 -s FETCH=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-command-line-argument -s WASM=1 -MD -MT CMakeFiles/StoneWebViewer.dir/orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp.o -MF CMakeFiles/StoneWebViewer.dir/orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp.o.d -o CMakeFiles/StoneWebViewer.dir/orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp.o -c orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:25:
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.h:26:
In file included from orthanc/OrthancFramework/Sources/FileStorage/IStorageArea.h:26:
In file included from orthanc/OrthancFramework/Sources/FileStorage/…/IMemoryBuffer.h:27:
In file included from boost_1_80_0/boost/noncopyable.hpp:15:
In file included from boost_1_80_0/boost/core/noncopyable.hpp:12:
In file included from boost_1_80_0/boost/config.hpp:48:
boost_1_80_0/boost/config/stdlib/libcpp.hpp:98:11: warning: ‘BOOST_NO_AUTO_PTR’ macro redefined [-Wmacro-redefined]
define BOOST_NO_AUTO_PTR
^
:13:9: note: previous definition is here
#define BOOST_NO_AUTO_PTR 1
^
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:25:
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.h:30:
In file included from boost_1_80_0/boost/thread/mutex.hpp:12:
In file included from boost_1_80_0/boost/thread/detail/platform.hpp:17:
boost_1_80_0/boost/config/requires_threads.hpp:47:5: error: “Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)”
error “Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)”
^
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:25:
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.h:30:
In file included from boost_1_80_0/boost/thread/mutex.hpp:12:
boost_1_80_0/boost/thread/detail/platform.hpp:71:9: error: “Sorry, no boost threads are available for this platform.”
error “Sorry, no boost threads are available for this platform.”
^
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:25:
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.h:30:
boost_1_80_0/boost/thread/mutex.hpp:18:2: error: “Boost threads unavailable on this platform”
#error “Boost threads unavailable on this platform”
^
In file included from orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:25:
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.h:40:12: error: no type named ‘mutex’ in namespace ‘boost’
boost::mutex mutex_;
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:52:5: error: no member named 'mutex' in namespace 'boost'; did you mean 'std::mutex'?
boost::mutex::scoped_lock lock(mutex_);
^~~~~~~~~~~~
std::mutex
/home/user/apps/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__mutex_base:35:78: note: 'std::mutex' declared here
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:52:30: error: expected ';' after expression
boost::mutex::scoped_lock lock(mutex_);
^
;
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:52:19: error: no member named 'scoped_lock' in 'std::mutex'
boost::mutex::scoped_lock lock(mutex_);
~~~~~~~^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:76:5: error: no member named 'mutex' in namespace 'boost'; did you mean 'std::mutex'?
boost::mutex::scoped_lock lock(mutex_);
^~~~~~~~~~~~
std::mutex
/home/user/apps/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__mutex_base:35:78: note: 'std::mutex' declared here
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:76:30: error: expected ';' after expression
boost::mutex::scoped_lock lock(mutex_);
^
;
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:76:19: error: no member named 'scoped_lock' in 'std::mutex'
boost::mutex::scoped_lock lock(mutex_);
~~~~~~~^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:114:7: error: no member named 'mutex' in namespace 'boost'; did you mean 'std::mutex'?
boost::mutex::scoped_lock lock(mutex_);
^~~~~~~~~~~~
std::mutex
/home/user/apps/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__mutex_base:35:78: note: 'std::mutex' declared here
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:114:32: error: expected ';' after expression
boost::mutex::scoped_lock lock(mutex_);
^
;
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:114:21: error: no member named 'scoped_lock' in 'std::mutex'
boost::mutex::scoped_lock lock(mutex_);
~~~~~~~^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:155:5: error: no member named 'mutex' in namespace 'boost'; did you mean 'std::mutex'?
boost::mutex::scoped_lock lock(mutex_);
^~~~~~~~~~~~
std::mutex
/home/user/apps/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__mutex_base:35:78: note: 'std::mutex' declared here
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
^
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:155:30: error: expected ';' after expression
boost::mutex::scoped_lock lock(mutex_);
^
;
orthanc/OrthancFramework/Sources/FileStorage/MemoryStorageArea.cpp:155:19: error: no member named 'scoped_lock' in 'std::mutex'
boost::mutex::scoped_lock lock(mutex_);
~~~~~~~^
1 warning and 16 errors generated.