Mongodb build failure

I am trying to build mongodb source and see following error. It looks like version mismatch for binutils… any specific versions needed?

Skipping ranlib for thin archive build/opt/mongo/db/s/libsharding_commands_d.a
Linking build/opt/mongo/db/mongod
/bin/ld.gold: internal error in make_view, at …/…/gold/fileread.cc:474
collect2: error: ld returned 1 exit status
scons: *** [build/opt/mongo/db/mongod] Error 1
scons: building terminated because of errors.
build/opt/mongo/db/mongod failed: Error 1

That appears to be a crash within ld.gold itself, so it represents a problem with the toolchain you are using, not with the MongoDB sources. We don’t really have a required version of binutils. However, unless you are building v4.0 or older, the toolchain we use to build binary releases of v4.2+ is currently based on GCC 8 and binutils 2.30.

1 Like