[SERVER-12682] Better default arguments to scons on OSX Mavericks Created: 11/Feb/14  Updated: 11/Jul/16  Resolved: 18/Feb/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Nikolaus Demmel Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Downstream on homebrew we ran into the issue that on OS X Mavericks 10.9 you would really want to build with libc++ by default. In particular when linking against system libs (e.g. boost) this is a requirement, since they are likely built with libc++. Could we change the default arguments for OS X to the following:

a) On 10.7 and above, if --libc++ is passed, default osx-version-min to 10.7. (currently the default is 10.6, which conflicts with libc++ such that supplying the libc++ flag alone has no effect)
b) On 10.9 and above, default to using libc++ (and thus also osx-verison-min 10.7)



 Comments   
Comment by Githook User [ 18/Feb/14 ]

Author:

{u'username': u'NikolausDemmel', u'name': u'Nikolaus Demmel', u'email': u'nikolaus@nikolaus-demmel.de'}

Message: SERVER-12682 Add warning on OS X if libc++ is selected and osx-version-min is < 10.7.

Signed-off-by: Andrew Morrow <acm@10gen.com>
Branch: master
https://github.com/mongodb/mongo/commit/efc9a4a324fa7046be9ec41431c3edf6f9be24ef

Comment by Nikolaus Demmel [ 18/Feb/14 ]

Pull request: https://github.com/mongodb/mongo/pull/637

Comment by Andrew Morrow (Inactive) [ 14/Feb/14 ]

Hi Nikolaus -

Yes, improving the error message for that situation would go a long way. I'll leave this assigned to me and try to get to it, but if you want to write up a pull request adding this behavior I will see to it that it gets attention. Though I can't promise it will get merged right away given where we are in our release cycle.

Thanks,
Andrew

Comment by Nikolaus Demmel [ 14/Feb/14 ]

Hi Andrew,
thanks for explaining. I can understand the reasoning.

Currently on OS X 10.9 when I just supply '--libc++' scons exits with
libc++ requested, but compiler does not support -stdlib=libc++

Could an extended warning (on OS X when clang is selected, which is default on 10.9) informing about the need for --osx-version-min=10.7 or higher be a compromize to address the issue?

Cheers,
Nikolaus

Comment by Andrew Morrow (Inactive) [ 14/Feb/14 ]

Hi Nikolaus -

While I agree that it is can be painful to get the flags right for a libc++ build, I'm not sure that we want to do this, at least not right now. Increased coupling between flags makes it harder for us to determine by sight what a given build line is going to do, and having the system default to our min supported platform independent of the local system means that we don't need to adjust flags for automated builds if/when the build machine itself changes.

Thanks,
Andrew

Comment by Nikolaus Demmel [ 11/Feb/14 ]

Downstream issue: https://github.com/Homebrew/homebrew/pull/25253

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