-
Notifications
You must be signed in to change notification settings - Fork 4k
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
用mold链接brpc报duplicate symbol #1809
Comments
看起来是mold的行为和其它ld不兼容,参考:rui314/mold#524 |
从clang14升级到clang15,又遇到了类似的问题 ld.lld: error: duplicate symbol: guard variable for butil::detail::ClassNameHelper<long>::name[abi:cxx11]
>>> defined at doris_main.cpp
>>> src/service/CMakeFiles/doris_be.dir/doris_main.cpp.o:(guard variable for butil::detail::ClassNameHelper<long>::name[abi:cxx11])
>>> defined at key.cpp.o:(.bss._ZGVN5butil6detail15ClassNameHelperIlE4nameB5cxx11E+0x0) in archive /mnt/disk1/pxl/doris/thirdparty/installed//lib64/libbrpc.a
ld.lld: error: duplicate symbol: guard variable for butil::detail::ClassNameHelper<bvar::detail::MaxTo<long>>::name[abi:cxx11]
>>> defined at doris_main.cpp
>>> src/service/CMakeFiles/doris_be.dir/doris_main.cpp.o:(guard variable for butil::detail::ClassNameHelper<bvar::detail::MaxTo<long>>::name[abi:cxx11])
>>> defined at key.cpp.o:(.bss._ZGVN5butil6detail15ClassNameHelperIN4bvar6detail5MaxToIlEEE4nameB5cxx11E+0x0) in archive /mnt/disk1/pxl/doris/thirdparty/installed//lib64/libbrpc.a
ld.lld: error: duplicate symbol: guard variable for butil::detail::ClassNameHelper<bvar::detail::AddTo<long>>::name[abi:cxx11]
>>> defined at rpc_fn_call.cpp
>>> rpc_fn_call.cpp.o:(guard variable for butil::detail::ClassNameHelper<bvar::detail::AddTo<long>>::name[abi:cxx11]) in archive src/exprs/libExprs.a
>>> defined at task_control.cpp.o:(.bss._ZGVN5butil6detail15ClassNameHelperIN4bvar6detail5AddToIlEEE4nameB5cxx11E+0x0) in archive /mnt/disk1/pxl/doris/thirdparty/installed//lib64/libbrpc.a
ld.lld: error: duplicate symbol: guard variable for butil::detail::ClassNameHelper<int>::name[abi:cxx11]
>>> defined at rpc_fn_call.cpp
>>> rpc_fn_call.cpp.o:(guard variable for butil::detail::ClassNameHelper<int>::name[abi:cxx11]) in archive src/exprs/libExprs.a
>>> defined at index_service.cpp.o:(.bss._ZGVN5butil6detail15ClassNameHelperIiE4nameB5cxx11E+0x0) in archive /mnt/disk1/pxl/doris/thirdparty/installed//lib64/libbrpc.a
ld.lld: error: duplicate symbol: guard variable for butil::detail::ClassNameHelper<bvar::detail::AddTo<int>>::name[abi:cxx11]
>>> defined at rpc_fn_call.cpp
>>> rpc_fn_call.cpp.o:(guard variable for butil::detail::ClassNameHelper<bvar::detail::AddTo<int>>::name[abi:cxx11]) in archive src/exprs/libExprs.a
>>> defined at index_service.cpp.o:(.bss._ZGVN5butil6detail15ClassNameHelperIN4bvar6detail5AddToIiEEE4nameB5cxx11E+0x0) in archive /mnt/disk1/pxl/doris/thirdparty/installed//lib64/libbrpc.a
clang-15: error: linker command failed with exit code 1 |
试了一下用ld是可以的,lld不行 |
Fixed by #1936 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug (描述bug)
用ld/lld/gold链接都是可以的,但是mold链接就会报这个错,不知道是mold的问题还是brpc的问题?
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: