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

Errors linking libhpx.so #3222

Closed
Shailesh-Tripathi opened this issue Mar 8, 2018 · 2 comments
Closed

Errors linking libhpx.so #3222

Shailesh-Tripathi opened this issue Mar 8, 2018 · 2 comments

Comments

@Shailesh-Tripathi
Copy link

Hello,
I am trying to install hpx (master branch) on Ubuntu 16.04. I am facing a linker error saying this:

sed_transform.cpp:(.text.ZN5boost12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SJ_RNS_13match_resultsISJ_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESJ[ZN5boost12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SJ_RNS_13match_resultsISJ_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESJ]+0x132): undefined reference to `boost::re_detail_106501::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >, boost::regex_traits<char, boost::cpp_regex_traits > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits > > const&, boost::regex_constants::_match_flags)'
collect2: error: ld returned 1 exit status
src/CMakeFiles/hpx.dir/build.make:2722: recipe for target 'lib/libhpx.so.1.1.0' failed

I realize that this is because the Boost regex library is not linked properly but I am not sure how to fix the issue.

I used the command like this :
`

sudo cmake -DBOOST_LIBRARYDIR=/usr/local/boost_1_65_1/libs -DBOOST_ROOT=/usr/local/boost_1_65_1 -DHWLOC_ROOT=/usr/local/share/hwloc -DHPX_WITH_MALLOC=system -DBoost_DEBUG:BOOL=ON /home/shailesh/Documents/stellar/hpx

`
and I got this warning but Configuring, generating was done and build files written.

failed to create symbolic link '/home/shailesh/Documents/stellar/hpx/my_hpx_build/share/hpx': No such file or directory

Ignoring the above warning I tried:

sudo gmake -j4

and then getting the linker error.

Kindly help me with this.
Thanks in advance!

Regards,
Shailesh Tripathi

@hkaiser
Copy link
Member

hkaiser commented Mar 8, 2018

Please make sure that you link against the same Boost libraries you compiled against. Also please make sure that Boost was built using the same ABI as HPX, i.e. all has to be either -std=c++11/-std=c++14/-std=c++17.

@Shailesh-Tripathi
Copy link
Author

Hi @hkaiser ,
Thanks for your help. The issue was finally resolved. I installed the Boost library using the bootstrap script and everything went smoothly.
Thanks again

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

No branches or pull requests

2 participants