community
community copied to clipboard
boost_regex Cannot build with ICU support
Package and Environment Details (include every applicable attribute)
- Package Name/Version: boost_regex /1.69
- Operating System+version: Linux Ubuntu 18.10
- Compiler+version: clang 7
- Docker image: conanio/gcc7
- Conan version: conan 1.12.2
- Python version: Python 3.7.0
###1. conanfile.txt (static)
[requires]
boost_regex/1.69.0@bincrafters/stable
[options]
boost_regex:use_icu=True
boost_regex:shared=False
icu:shared=False
icu:with_unit_tests=False
[generators]
cmake_find_package
cmake_paths
During build of the boost regex in cosole
[cmake] Performing configuration checks
[cmake]
[cmake] - has_icu builds : no
in the build log "~/.conan/data/boost_regex/1.69.0/bincrafters/stable/build/4ac79257f1cb90eb553eb4a339227e24d468a06a/bin/config.log"
...updating 7 targets...
4 clang-linux.compile.c++.without-pch bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/has_icu_test.o
5 clang-linux.link bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/has_icu
6 /usr/bin/ld: /home/malirod/.conan/data/icu/63.1/bincrafters/stable/package/038c2a260c5a4890e52ed4ef6e1716e1c793406e/lib/libicuuc.a(putil.ao): in function `uprv_dl_open_63':
7 putil.cpp:(.text.uprv_dl_open_63+0x13): undefined reference to `dlopen'
8 /usr/bin/ld: /home/malirod/.conan/data/icu/63.1/bincrafters/stable/package/038c2a260c5a4890e52ed4ef6e1716e1c793406e/lib/libicuuc.a(putil.ao): in function `uprv_dl_close_63':
9 putil.cpp:(.text.uprv_dl_close_63+0x7): undefined reference to `dlclose'
10 /usr/bin/ld: /home/malirod/.conan/data/icu/63.1/bincrafters/stable/package/038c2a260c5a4890e52ed4ef6e1716e1c793406e/lib/libicuuc.a(putil.ao): in function `uprv_dlsym_func_63':
11 putil.cpp:(.text.uprv_dlsym_func_63+0xe): undefined reference to `dlsym'
12 clang: error: linker command failed with exit code 1 (use -v to see invocation)
13
14 "/usr/bin/clang++-7" -L"/home/malirod/.conan/data/icu/63.1/bincrafters/stable/package/038c2a260c5a4890e52ed4ef6e1716e1c793406e/lib" -o "bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/
has_icu" -Wl,--start-group "bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/has_icu_test.o" -Wl,-Bstatic -Wl,-Bdynamic -lrt -licudata -licui18n -licuuc -Wl,--end-group -m64 -pthread -std=c++11 -
stdlib=libstdc++
15
16 ...failed clang-linux.link bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/has_icu...
17 ...skipped <pbin/regex/build/bd861a9baa57b5f260b512cfa257e7fb>has_icu.passed for lack of <pbin/regex/build/bd861a9baa57b5f260b512cfa257e7fb>has_icu...
18 ...failed updating 1 target...
###2. conanfile.txt (dynamic)
[requires]
boost_regex/1.69.0@bincrafters/stable
[options]
boost_regex:use_icu=True
boost_regex:shared=True
icu:shared=True
icu:with_unit_tests=False
[generators]
cmake_find_package
cmake_paths
build output
[cmake] Performing configuration checks
[cmake]
[cmake] - has_icu builds : no
build log:
clang-linux.compile.c++.without-pch bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu_test.o
5 clang-linux.link bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu
6 testing.unit-test bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu.passed
7 bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu: error while loading shared libraries: libicuuc.so.63: cannot open shared object file: No such file or directory
8
9 ····
10 "bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu" && touch "bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu.passed"
11
12 ...failed testing.unit-test bin/regex/build/c42c822ef99384bff4ac74b5386002b0/has_icu.passed...
13 ...failed updating 1 target...
Im not sure whether this problem relates to conan or this is boost iteself.
it seems like command line misses -ldl
to link with dl library. not sure yet where to apply fix, need to investigate
Adding -ldl
manually will help (this was my first guess). But Im not sure this is way to go. For me the following looks strange -Wl,-Bstatic -Wl,-Bdynamic
. And this is for static build. For dynamic build this might not work.
Interesting facs. Seems boost local depends on regex. In the same env replace regex with locale boost_locale/1.69.0@bincrafters/stable
and got regex with icu
[cmake] Performing configuration checks
[cmake]
[cmake] - has_icu builds : yes
[cmake]
[cmake] ...patience...
[cmake]
[cmake] ...found 630 targets...
[cmake] ...updating 25 targets...
[cmake]
[cmake] clang-linux.compile.c++.without-pch bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/c_regex_traits.o
[cmake]
[cmake] clang-linux.compile.c++.without-pch bin/regex/build/bd861a9baa57b5f260b512cfa257e7fb/cpp_regex_traits.o
@malirod boost_locale
doesn't depend on regex
(perhaps you meant it depends on icu
) . Still, we only pre-build with icu
off for both regex
and locale
, so I'm not sure how it would be related. Did you possibly install ICU to some system folder and now it's being detected by b2
?
Of note, I'm bumping the dependency on ICU to 63.1 on the 1.69.0 testing branch which I meant to do earlier.
Also, i found this bug regarding ICU and -ldl
:
https://bugs.swift.org/browse/SR-3819