Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let the user override MACOSX_DEPLOYMENT_TARGET #16312

Closed
nexttime mannequin opened this issue May 9, 2014 · 4 comments
Closed

Let the user override MACOSX_DEPLOYMENT_TARGET #16312

nexttime mannequin opened this issue May 9, 2014 · 4 comments

Comments

@nexttime
Copy link
Mannequin

nexttime mannequin commented May 9, 2014

In sage-env, we currently have:

# Mac OS X-specific setup
if [ `uname` = "Darwin" ]; then
    # set MACOSX_DEPLOYMENT_TARGET -- if set incorrectly, this can
    # cause lots of random "Abort trap" issues on OSX. see trac
    # #7095 for an example.
    MACOSX_VERSION=`uname -r | awk -F. '{print $1}'`
    MACOSX_DEPLOYMENT_TARGET=10.$[$MACOSX_VERSION-4]
    export MACOSX_DEPLOYMENT_TARGET
fi

With binary distributions of Sage, e.g. when trying to install an optional spkg, this can lead to errors like

configure:3166: checking whether the C compiler works
configure:3188: gcc    conftest.c  >&5
ld: library not found for -lcrt1.10.6.o
collect2: error: ld returned 1 exit status
configure:3192: $? = 1
configure:3230: result: no

hidden in config.log, the visible configure error message being

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Applications/sage/local/var/tmp/sage/build/<package>/src':
configure: error: C compiler cannot create executables
See `config.log' for more details

At least as a work-around, the user should be able to set MACOSX_DEPLOYMENT_TARGET to some other value (e.g. 10.4) to get past such errors.

Setting a different target may make sense for developers (using Sage built from source) as well.

CC: @jhpalmieri

Component: build

Keywords: Xcode GCC -mmacosx-version-min compiler cannot create executables Darwin Mavericks MacApp bdist binary distribution

Issue created by migration from https://trac.sagemath.org/ticket/16312

@nexttime nexttime mannequin added this to the sage-6.3 milestone May 9, 2014
@nexttime nexttime mannequin added c: build labels May 9, 2014
@nexttime
Copy link
Mannequin Author

nexttime mannequin commented May 9, 2014

comment:1

I think #7095 (a huge ticket dealing with a couple of issues) is no longer (or not really) relevant here; there's some discussion of MACOSX_DEPLOYMENT_TARGET though, see #7095 comment:36 ff.

@nexttime
Copy link
Mannequin Author

nexttime mannequin commented May 9, 2014

comment:2

P.S.: Note that we meanwhile build most if not all parts of Sage with our own FSF GCC; Apple's GCC is only used to bootstrap our GCC (and to build some Objective C[++] files IIRC).

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 7, 2021

comment:4

The code that was setting MACOSX_DEPLOYMENT_TARGET was removed in #18272, so we can close this ticket.

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Jun 7, 2021
@jhpalmieri
Copy link
Member

comment:5

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants