CMake error with Boost 1.71

Hello,

when using Boost 1.71 to build Orthanc I get the following errors

[   70s] Switching to C++11 standard in gcc/clang, as version of JsonCpp is >= 1.0.0
[   70s] -- Looking for uuid/uuid.h
[   70s] -- Looking for uuid/uuid.h - found
[   70s] -- Looking for uuid_generate_random in /usr/lib64/libuuid.so
[   71s] -- Looking for uuid_generate_random in /usr/lib64/libuuid.so - found
[   71s] -- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  
[   71s] CMake Error at /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component):
[   71s]   boost_find_component Macro invoked with incorrect arguments for macro

followed by a bunch of other Boost error messages and finally

[   71s] -- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")  missing components:  locale filesystem thread system date_time regex
[   71s] -- Trying to find DCMTK expecting DCMTKConfig.cmake
[   71s] -- Trying to find DCMTK expecting DCMTKConfig.cmake - ok

With Boost 1.69 I did not see the error.
Can you check if this is on Orthanc-side?
Thanks
Axel

Hello Axel,

Could you please tell us the exact cmake command line that you are using?

(Whether you are using the system version of boost or passing a package search path).

Also, what version of cmake are you using ?

(I found a mention of some people fixing their cmake build that go broken by Boost 1.70 update though -DBoost_NO_BOOST_CMAKE=ON ). Maybe you could give it a try?

Thanks!

Hello Benjamin,

Hello Axel,

Could you please tell us the exact cmake command line that you are using?

(Whether you are using the system version of boost or passing a package search path).

That should be:

/usr/bin/cmake /home/abuild/rpmbuild/BUILD/Orthanc-1.5.7/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=4 -DNDEBUG' '-DCMAKE_CXX_FLAGS=-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=4 -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=4 -DNDEBUG' '-DCMAKE_EXE_LINKER_FLAGS=-flto=4 -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-flto=4 -Wl,--as-needed' '-DCMAKE_SHARED_LINKER_FLAGS=-flto=4 -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules .. -DSTANDALONE_BUILD:BOOL=ON -DSTATIC_BUILD:BOOL=OFF -DENABLE_CIVETWEB=ON -DUSE_SYSTEM_MONGOOSE=OFF -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF -DUNIT_TESTS_WITH_HTTP_CONNEXIONS=OFF 

Also, what version of cmake are you using ?

cmake-3.15.3-1.1

(I found a mention of some people fixing their cmake build that go broken by Boost 1.70 update though -DBoost_NO_BOOST_CMAKE=ON ). Maybe you could give it a try?

Yes, that fixed it!

Thank you!
Axel

(I found a mention of some people fixing their cmake build that go broken by Boost 1.70 update though -DBoost_NO_BOOST_CMAKE=ON ). Maybe you could give it a try?

Yes, that fixed it!

Wow, great information. This is now added to the “LinuxCompilation.txt” file:
https://bitbucket.org/sjodogne/orthanc/commits/625625ed098f67e1b6af816d49e2e9f37fb1fd29

Sébastien-