Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking CXX executable udho-example-hello failed #2

Open
xingfeT opened this issue Nov 10, 2021 · 2 comments
Open

Linking CXX executable udho-example-hello failed #2

xingfeT opened this issue Nov 10, 2021 · 2 comments

Comments

@xingfeT
Copy link

xingfeT commented Nov 10, 2021

[ 50%] Built target udho
[ 75%] Linking CXX executable udho-example-hello
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::re_detail_107000::icu_regex_traits_implementation::transform(int const*, int const*) const': hello.cpp:(.text._ZNK5boost16re_detail_10700031icu_regex_traits_implementation9transformEPKiS3_[_ZNK5boost16re_detail_10700031icu_regex_traits_implementation9transformEPKiS3_]+0x44): undefined reference to boost::re_detail_107000::icu_regex_traits_implementation::do_transform(int const*, int const*, icu_50::Collator const*) const'
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::re_detail_107000::icu_regex_traits_implementation::transform_primary(int const*, int const*) const': hello.cpp:(.text._ZNK5boost16re_detail_10700031icu_regex_traits_implementation17transform_primaryEPKiS3_[_ZNK5boost16re_detail_10700031icu_regex_traits_implementation17transform_primaryEPKiS3_]+0x44): undefined reference to boost::re_detail_107000::icu_regex_traits_implementation::do_transform(int const*, int const*, icu_50::Collator const*) const'
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::icu_regex_traits::translate_nocase(int) const': hello.cpp:(.text._ZNK5boost16icu_regex_traits16translate_nocaseEi[_ZNK5boost16icu_regex_traits16translate_nocaseEi]+0x15): undefined reference to u_tolower_50'
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::basic_regex<int, boost::icu_regex_traits>::assign(int const*, int const*, unsigned int)': hello.cpp:(.text._ZN5boost11basic_regexIiNS_16icu_regex_traitsEE6assignEPKiS4_j[_ZN5boost11basic_regexIiNS_16icu_regex_traitsEE6assignEPKiS4_j]+0x2a): undefined reference to boost::basic_regex<int, boost::icu_regex_traits>::do_assign(int const*, int const*, unsigned int)'
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::re_detail_107000::perl_matcher<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int>, std::allocator<boost::sub_match<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int> > >, boost::icu_regex_traits>::find_restart_word()': hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17find_restart_wordEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17find_restart_wordEv]+0xe9): undefined reference to boost::icu_regex_traits::isctype(int, unsigned long) const'
hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17find_restart_wordEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17find_restart_wordEv]+0x164): undefined reference to boost::icu_regex_traits::isctype(int, unsigned long) const' CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::re_detail_107000::perl_matcher<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int>, std::allocator<boost::sub_match<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int> > >, boost::icu_regex_traits>::match_word_boundary()':
hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE19match_word_boundaryEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE19match_word_boundaryEv]+0x60): undefined reference to boost::icu_regex_traits::isctype(int, unsigned long) const' hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE19match_word_boundaryEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE19match_word_boundaryEv]+0x14a): undefined reference to boost::icu_regex_traits::isctype(int, unsigned long) const'
CMakeFiles/udho-example-hello.dir/hello.cpp.o: In function boost::re_detail_107000::perl_matcher<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int>, std::allocator<boost::sub_match<boost::u8_to_u32_iterator<__gnu_cxx::__normal_iterator<char const*, std::string>, int> > >, boost::icu_regex_traits>::match_within_word()': hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17match_within_wordEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17match_within_wordEv]+0x6a): undefined reference to boost::icu_regex_traits::isctype(int, unsigned long) const'
CMakeFiles/udho-example-hello.dir/hello.cpp.o:hello.cpp:(.text._ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17match_within_wordEv[_ZN5boost16re_detail_10700012perl_matcherINS_18u8_to_u32_iteratorIN9__gnu_cxx17__normal_iteratorIPKcSsEEiEESaINS_9sub_matchIS8_EEENS_16icu_regex_traitsEE17match_within_wordEv]+0x106): more undefined references to `boost::icu_regex_traits::isctype(int, unsigned long) const' follow
collect2: error: ld returned 1 exit status
make[3]: *** [examples/CMakeFiles/udho-example-hello.dir/build.make:113: examples/udho-example-hello] Error 1
make[2]: *** [CMakeFiles/Makefile2:378: examples/CMakeFiles/udho-example-hello.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:385: examples/CMakeFiles/udho-example-hello.dir/rule] Error 2

@neel
Copy link
Owner

neel commented Nov 16, 2021

Sorry for the late reply. It seems some libraries are missing. What OS you are using ? Try installing icu libraries.

In ubuntu 20.04 installing the following packages should work.

apt-get install -y build-essential checkinstall zlib1g-dev 
apt-get install -y libboost-all-dev cmake gcc clang git curl wget libssl-dev libpugixml-dev

In Arch Linux

pacman -S base-devel boost cmake gcc clang git curl wget pugixml

If your are using Mac, you need to provide path to your icu4c library. Check #32 CMakeLIsts.txt

If you do not need ICU then turn off UDHO_USE_ICU while CMake.

@neel
Copy link
Owner

neel commented Nov 26, 2021

@xingfeT Solved ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants