[SERVER-44688] duplicate symbols when compiling with clang 9 Created: 17/Nov/19  Updated: 21/Nov/19  Resolved: 21/Nov/19

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 4.2.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ryan Schmidt Assignee: Andrew Morrow (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File main.log.bz2    
Issue Links:
Duplicate
duplicates SERVER-44025 Ensure that isNamedCode variable temp... Closed
Operating System: ALL
Sprint: Dev Platform 2019-12-02
Participants:

 Description   

Hi, mongodb 4.2.1 builds fine on macOS 10.13 when compiled with --libc++ using MacPorts clang 7, and also with clang 8 if I apply the fix fromĀ SERVER-44270. But using clang 9, the build fails with hundreds of thousands of duplicate symbol errors like this:

duplicate symbol __ZN5mongo13error_details11isNamedCodeILi9EEE in:
build/MP/mongo/shell/dbshell.o
build/MP/mongo/shell/mongodbcr.o
duplicate symbol __ZN5mongo13error_details11isNamedCodeILi199EEE in:
build/MP/mongo/shell/dbshell.o
build/MP/mongo/shell/mongodbcr.o
duplicate symbol __ZN5mongo13error_details11isNamedCodeILi89EEE in:
build/MP/mongo/shell/dbshell.o
build/MP/mongo/shell/mongodbcr.o

My compressed full build log is attached.

Another user reported the same problem when using clang 9 to build mongodb 4.0.13 on OS X 10.11. Here is their compressed full build log if you'd like it.



 Comments   
Comment by Andrew Morrow (Inactive) [ 21/Nov/19 ]

ryandesign - I believe this has been fixed on the v4.2 branch and the fix will arrive in the upcoming r4.2.2 tag. I'm closing this ticket, but please let me know if I there is more I can do to assist.

The v4.2 commit is available here: https://github.com/mongodb/mongo/commit/e484c9af6b4ae4a1d22c905e252ad3ad13f30bfc

Comment by Andrew Morrow (Inactive) [ 20/Nov/19 ]

ryandesign - Were you able to see if the fix for SERVER-44025 addresses this issue for you?

Comment by Andrew Morrow (Inactive) [ 19/Nov/19 ]

ryandesign - I think this is SERVER-44025, which is fixed on master but not on v4.2. I've asked that it be tagged for backport to at least v4.2, but in the meantime you should be able to trivially apply the same fix. Also, I checked in with the engineer who found and fixed SERVER-44025, and they indicated that you were likely to run in to SERVER-44059 next, and that will get backport requests as well.

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