[SERVER-15685] --libc++ require -lc++abi on some platforms Created: 16/Oct/14  Updated: 01/Jun/22  Resolved: 01/Jun/22

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 2.7.7
Fix Version/s: 4.1 Desired

Type: Improvement Priority: Major - P3
Reporter: Mira Carey Assignee: Alex Neben
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It seems that recent libc++ require -lc++abi on some platforms (I'm seeing it on up to date arch).

The fix is an extra configure check that adds -lc++abi to the linker flags if needed.

The error in question:

/bin/ld: build/linux2/allocator_system/cc_clang/cxx_clang++/dbg_on/libc++/sanitize_address_leak/mongo/logger/rotatable_file_writer.o: undefined reference to symbol '_ZNSt8bad_castC1Ev'
/usr/lib/libc++abi.so.1: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [build/linux2/allocator_system/cc_clang/cxx_clang++/dbg_on/libc++/sanitize_address_leak/mongo/base/owned_pointer_vector_test] Error 1


Generated at Thu Feb 08 03:38:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.