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 error due to boost::filesystem::detail::copy_file #196

Open
calvinmccarter opened this issue Apr 8, 2023 · 0 comments
Open

Linking error due to boost::filesystem::detail::copy_file #196

calvinmccarter opened this issue Apr 8, 2023 · 0 comments

Comments

@calvinmccarter
Copy link

On CentOS, I first install zlib, boost, and boost-devel via yum. Then when I run cmake .., it succeeds with:

-- cotire 1.8.0 loaded.
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   regex
--   system
--   thread
--   chrono
--   atomic


** Build Summary **
  Version:          3.0.8
  Prefix:           /usr/local
  Build Type:       Release
  Architecture:     x86_64
  System:           Linux
  Boost Include:    /usr/include
  Boost Libraries:  /usr/lib64
  Zlib Include:     /usr/include
  Zlib Library:     /usr/lib64/libz.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/calvin/sandbox/LucenePlusPlus/build

But when I run make, it fails with:

[ 66%] Linking CXX executable deletefiles
../../core/liblucene++.so.3.0.8: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/demo/deletefiles/deletefiles] Error 1
make[1]: *** [src/demo/deletefiles/CMakeFiles/deletefiles.dir/all] Error 2
make: *** [all] Error 2

This problem appears to show up elsewhere for Boost due to C++11: https://stackoverflow.com/questions/35007134/c-boost-undefined-reference-to-boostfilesystemdetailcopy-file, but I'm not quite sure what changes are needed in LucenePlusPlus to fix this.

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

1 participant