[SERVER-24504] Always use objcopy from the mongodbtoolchain Created: 09/Jun/16  Updated: 05/Jul/16  Resolved: 10/Jun/16

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

Type: Improvement Priority: Critical - P2
Reporter: Andrew Morrow (Inactive) Assignee: Ernie Hershey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Build 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

Older versions of objcopy have a bug that drops the execute bit on PIE executables:

https://sourceware.org/bugzilla/show_bug.cgi?id=10802

At least rhel55 has a system objcopy that suffers from this bug.

Since we build our own objcopy as part of the toolchain build, we should specify it on the command line when invoking scons. The correct incantation is:

scons OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy ...

Note that we will need to do this for any project that builds MongoDB on rhel55, which includes the system performance and microbenchmark performance builders.



 Comments   
Comment by Ernie Hershey [ 13/Jun/16 ]

Useful comments from Henrik -

  • Performance builds should build the binaries with same toolchain,
    library versions etc as the released binaries do. In practice I think
    we've aimed for building on the same distro as jstests does.
  • The distro you see in system_perf.yml and other files isn't actually
    used to run the performance tests, rather it is just used to deploy a
    cluster to test, for which we maintain our own images.
Comment by Githook User [ 10/Jun/16 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-24504 Disable runtime hardening for RocksDB build
Branch: master
https://github.com/mongodb/mongo/commit/f1d618ed1009cd9e1da721535555083f31aad66e

Comment by Githook User [ 10/Jun/16 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-24504 Always use objcopy from custom toolchain
Branch: master
https://github.com/mongodb/mongo/commit/831bd376b13063249b3e450a35747083ab3b8531

Comment by Andrew Morrow (Inactive) [ 09/Jun/16 ]

Note, the commit for this fix should include reverting https://github.com/mongodb/mongo/commit/e1f383dedb77012d65cac4d19c5d30692c865909

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