homebrew-ceph-client icon indicating copy to clipboard operation
homebrew-ceph-client copied to clipboard

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

Open kilinrax opened this issue 2 years ago • 4 comments

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 avatar Jan 24 '23 16:01 kilinrax

Occurs with all release versions back to https://github.com/mulbc/homebrew-ceph-client/blob/83438b4bcb7a1acd5cbf5d720d0a808448a1c713/ceph-client.rb

kilinrax avatar Jan 25 '23 13:01 kilinrax

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)

somnevaetsya avatar Feb 12 '23 08:02 somnevaetsya

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!

kilinrax avatar Feb 13 '23 10:02 kilinrax

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?

willgorman avatar Feb 05 '24 20:02 willgorman