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

Changing the BOOST_URL leads to linking error #89

Open
Weiming-Hu opened this issue Mar 30, 2020 · 3 comments
Open

Changing the BOOST_URL leads to linking error #89

Weiming-Hu opened this issue Mar 30, 2020 · 3 comments

Comments

@Weiming-Hu
Copy link

Weiming-Hu commented Mar 30, 2020

Due to the recurrent issue #88, I'm trying to use an alternative BOOST_URL from ``.

But after I changed the URL and recompile my code, the following linking errors appear:

"boost::filesystem::emit_error(int, boost::system::error_code*, char const*)", referenced from:
      boost::filesystem::error(int, boost::system::error_code*, char const*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::emit_error(int, boost::filesystem::path const&, boost::system::error_code*, char const*)", referenced from:
      boost::filesystem::error(int, boost::filesystem::path const&, boost::system::error_code*, char const*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::emit_error(int, boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*, char const*)", referenced from:
      boost::filesystem::error(int, boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*, char const*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::filesystem_error::filesystem_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::system::error_code)", referenced from:
      boost::filesystem::detail::current_path(boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::filesystem_error::filesystem_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::filesystem::path const&, boost::system::error_code)", referenced from:
      boost::filesystem::detail::canonical(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::symlink_status(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::read_symlink(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::permissions(boost::filesystem::path const&, boost::filesystem::perms, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      ...
  "boost::filesystem::filesystem_error::filesystem_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code)", referenced from:
      boost::filesystem::detail::copy(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::filesystem_error::~filesystem_error()", referenced from:
      boost::filesystem::detail::canonical(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::symlink_status(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::read_symlink(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::copy(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::current_path(boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      ...
  "boost::filesystem::detail::dir_itr_close(void*&, void*&)", referenced from:
      boost::filesystem::detail::dir_itr_imp::~dir_itr_imp() in libAnEnIO.a(FunctionsIO.cpp.o)
      boost::filesystem::detail::dir_itr_imp::~dir_itr_imp() in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)", referenced from:
      boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&, boost::filesystem::directory_options) in libAnEnIO.a(FunctionsIO.cpp.o)
      boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&, boost::system::error_code&) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&, boost::filesystem::directory_options::enum_type) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)", referenced from:
      boost::filesystem::directory_iterator::increment() in libAnEnIO.a(FunctionsIO.cpp.o)
      boost::filesystem::detail::(anonymous namespace)::remove_all_aux(boost::filesystem::path const&, boost::filesystem::file_type, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
  "boost::filesystem::directory_entry::get_status(boost::system::error_code*) const", referenced from:
      boost::filesystem::directory_entry::status() const in libAnEnIO.a(FunctionsIO.cpp.o)
  "typeinfo for boost::filesystem::filesystem_error", referenced from:
      boost::filesystem::detail::canonical(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::symlink_status(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::read_symlink(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::copy(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)
      boost::filesystem::detail::current_path(boost::system::error_code*) in libboost_filesystem.a(operations.cpp.o)

This is how I'm using this module. You won't see the code where I change BOOST_URL because that is still local. Everything was working well when I don't change the URL (well, as for now, since the Boost mirror is down, the downloading won't go through).

Please advice. Thank you.

@Weiming-Hu
Copy link
Author

I'm not sure whether this helps. I looked inside the boost-cmake build folder to see what are available. I found the following. AnalogEnsemble is my github project.

$ pwd
/Users/wuh20/github/AnalogsEnsemble/build/build/boost-cmake
$ ls
CMakeFiles                 Makefile                   libboost_date_time.a       libboost_filesystem.a      libboost_program_options.a libboost_serialization.a

Thank you

@Weiming-Hu
Copy link
Author

My development environment is as follows:

  • OS: Mac OS Mojave Version 10.14.6
  • Model: MacBook Air (13-inch, Early 2015)
  • CMake version: 3.15.5
  • Compiler: Apple clang version 11.0.0 (clang-1100.0.33.17)

@Weiming-Hu
Copy link
Author

I just tried a different version https://cfhcable.dl.sourceforge.net/project/boost/boost/1.70.0/boost_1_70_0.tar.bz2 with 430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778.

The error is different. I guess it might be a version problem.

Undefined symbols for architecture x86_64:
  "boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)", referenced from:
      boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&, boost::filesystem::directory_options) in libAnEnIO.a(FunctionsIO.cpp.o)
  "boost::filesystem::directory_entry::get_status(boost::system::error_code*) const", referenced from:
      boost::filesystem::directory_entry::status() const in libAnEnIO.a(FunctionsIO.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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