Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 934684

Summary: >=dev-libs/protobuf-22*: ld undefined reference error with protoc [LLVM/libc++]
Product: Gentoo Linux Reporter: Gonçalo Negrier Duarte <gonegrier.duarte>
Component: Current packagesAssignee: Paul Zander <negril.nx+gentoo>
Status: UNCONFIRMED ---    
Severity: normal CC: gonegrier.duarte, luke5083
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
protobuf-23.3-r1-build.log
protobuf-23.3-r2-build.log
protobuf-22.5-r1-build.log

Description Gonçalo Negrier Duarte 2024-06-21 21:02:28 UTC
Created attachment 896234 [details]
emerge --info

When compiling protobuf-22.5-r1 and up with clang on llvm profile, ld undefined reference apearing in the linking stage of protoc (the exemple bellow is for 23.3.0-r4):

FAILED: protoc-23.3.0 
: && /usr/lib/llvm/18/bin/clang++ -stdlib=libc++ -march=native -O3 -pipe (...truncated...)
>>> referenced by libprotoc.so.23.3.0

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: absl::lts_20230802::log_internal::LogMessage& absl::lts_20230802::log_internal::LogMessage::operator<<<unsigned long, 0>(unsigned long const&)
>>> referenced by libprotoc.so.23.3.0

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: absl::lts_20230802::log_internal::LogMessage& absl::lts_20230802::log_internal::LogMessage::operator<<<unsigned short, 0>(unsigned short const&)
>>> referenced by libprotoc.so.23.3.0

I gonna attach my emerge --info and logs to protobuf-22.5-r1, protobuf-23.3-r2, protobuf-23.3-r4 (I don't know if the patch introduce in r4 change the error)
Comment 1 Gonçalo Negrier Duarte 2024-06-21 21:04:51 UTC
Created attachment 896235 [details]
protobuf-23.3-r1-build.log
Comment 2 Gonçalo Negrier Duarte 2024-06-21 21:52:37 UTC
Created attachment 896236 [details]
protobuf-23.3-r2-build.log
Comment 3 Gonçalo Negrier Duarte 2024-06-21 21:52:52 UTC
Created attachment 896237 [details]
protobuf-22.5-r1-build.log