You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to port an old build-system to CMake (I am not too experienced with CMake).
I just tried boost-cmake and hats-off to its developers.. great package!
My project depends on Boost::locale and I am having some trouble with static linking against ICU libs. I know there are dozens of forums talking about it and suggesting changing link-order, etc. but nothing has worked for me so far. FYI, I end-up with something like this:
/usr/bin/c++ -static CMakeFiles/test_boost.dir/main.cpp.o -o test_boost boost-cmake/libboost_locale.a boost-cmake/libboost_thread.a boost-cmake/libboost_chrono.a /usr/lib/x86_64-linux-gnu/librt.a -lpthread /usr/local/lib/libicudata.a /usr/local/lib/libicui18n.a /usr/local/lib/libicuuc.a -ldl
/usr/bin/ld: /usr/local/lib/libicuuc.a(putil.ao): in function `uprv_dl_open_70':
putil.cpp:(.text.uprv_dl_open_70+0x16): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/local/lib/libicuuc.a(udata.ao): in function `doLoadFromCommonData(signed char, char const*, char const*, char const*, char const*, char const*, char const*, char const*, signed char (*)(void*, char const*, char const*, UDataInfo const*), void*, UErrorCode*, UErrorCode*) [clone .constprop.0]':
udata.cpp:(.text._ZL20doLoadFromCommonDataaPKcS0_S0_S0_S0_S0_S0_PFaPvS0_S0_PK9UDataInfoES1_P10UErrorCodeS8_.constprop.0+0x3ca): undefined reference to `icudt70_dat'
/usr/bin/ld: udata.cpp:(.text._ZL20doLoadFromCommonDataaPKcS0_S0_S0_S0_S0_S0_PFaPvS0_S0_PK9UDataInfoES1_P10UErrorCodeS8_.constprop.0+0x4af): undefined reference to `icudt70_dat'
ICU lib has given me other troubles too, so I decided to disable it (and use the iconv lib instead) by doing:
I know this is not the recommended way to override options in sub-projects. And of course it fails at configure:
-- Boost locale unsupported on platform: need either iconv or ICU.
-- Configuring done
CMake Error at CMakeLists.txt:11 (add_executable):
Target "test_boost" links to target "Boost::locale" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
I thought the option BOOST_LOCALE_ENABLE_ICONV_BACKEND in boost-cmake\libs\locale.cmake will take effect. But it doesn't. I have no idea of how to configure it right.
My questions is: what is the foreseen way to configure Boost with Orphis/boost-cmake? Can you please provide an example?
Here is my CMake script for a hello-world C++ program using Boost::locale:
Hi Orphis/boost-cmake experts,
I am trying to port an old build-system to CMake (I am not too experienced with CMake).
I just tried boost-cmake and hats-off to its developers.. great package!
My project depends on
Boost::locale
and I am having some trouble with static linking against ICU libs. I know there are dozens of forums talking about it and suggesting changing link-order, etc. but nothing has worked for me so far. FYI, I end-up with something like this:ICU lib has given me other troubles too, so I decided to disable it (and use the iconv lib instead) by doing:
I know this is not the recommended way to override options in sub-projects. And of course it fails at configure:
I thought the option
BOOST_LOCALE_ENABLE_ICONV_BACKEND
inboost-cmake\libs\locale.cmake
will take effect. But it doesn't. I have no idea of how to configure it right.My questions is: what is the foreseen way to configure Boost with Orphis/boost-cmake? Can you please provide an example?
Here is my CMake script for a hello-world C++ program using
Boost::locale
:Other details about my setup:
Thanks in advance!
The text was updated successfully, but these errors were encountered: