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

Duplicated boost::phoenix::placeholder:: symbols between ConfUtils.cc.o and MonCap.cc.o #25

Open
kilinrax opened this issue Jan 24, 2023 · 4 comments

Comments

@kilinrax
Copy link

kilinrax commented Jan 24, 2023

Possibly user error, but I've been stuck on this for a couple of days.

duplicate symbol 'boost::phoenix::placeholders::uarg9' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg8' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg7' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg6' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg5' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg4' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg3' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg2' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg1' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg10' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
ld: 10 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Let me know if a longer log excerpt would be helpful.

I've tried downgrading Boost to 1.76 (suggested for similar errors compiling LibreOffice here) and Cython to 0.29.22.

@kilinrax
Copy link
Author

@somnevaetsya
Copy link

hi, did you manage to solve the problem? have the same problem on m1 chip:

Last 15 lines from .../05.ninja:
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg1' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
duplicate symbol 'boost::phoenix::placeholders::uarg10' in:
    src/common/CMakeFiles/common-common-objs.dir/ConfUtils.cc.o
    src/CMakeFiles/common-objs.dir/mon/MonCap.cc.o
ld: 10 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@kilinrax
Copy link
Author

hi, did you manage to solve the problem? have the same problem on m1 chip:

Yes - you need boost downgraded to 1.76 in ceph-client.rb, which was merged here. You should be able to pull and rebuild. Manually remove boost, or downgrade it before rebuilding if it doesn't.

Sorry for the slow reply!

@willgorman
Copy link

Unfortunately it seems like using boost 1.76 has some issues with Xcode 15.

/opt/homebrew/opt/[email protected]/include/boost/container_hash/hash.hpp:131:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct hash_base : std::unary_function<T, std::size_t> {};
                           ~~~~~^~~~~~~~~~~~~~
                                __unary_function
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;

According to https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes#Deprecations unary_function is no longer supported in C++17. Newer versions of boost avoid the compilation error but then run into the duplicate symbol error mentioned here. Is there any way to be able to use newer versions of boost?

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

3 participants