Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12416 closed defect (fixed)

Mercurial assumes that any system with XCode *installed* will use XCode to *build* Mercurial

Reported by: Jeroen Demeyer Owned by: tbd
Priority: major Milestone: sage-5.0
Component: packages: standard Keywords:
Cc: Merged in: sage-5.0.beta4
Authors: Jeroen Demeyer Reviewers: R. Andrew Ohana
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

This is an except from upstream's setup.py:

if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
    # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
    # distutils.sysconfig
    version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()[0]
    # Also parse only first digit, because 3.2.1 can't be parsed nicely
    if (version.startswith('Xcode') and
        StrictVersion(version.split()[1]) >= StrictVersion('4.0')):
        os.environ['ARCHFLAGS'] = '-arch i386 -arch x86_64'

The ARCHFLAGS are passed to gcc during the setup of Mercurial. This obviously breaks on a system with XCode installed, but where the "gcc" found in the PATH isn't XCode's gcc.

In later upstream releases, the last line is changed to

os.environ['ARCHFLAGS'] = ''

So I propose to backport this change.

spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/mercurial-1.8.4.p0.spkg

See #12570 for a follow-up.

Attachments (1)

mercurial-1.8.4.p0.patch (11.6 KB) - added by Jeroen Demeyer 11 years ago.
Diff for the mercurial spkg, for review only

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by Jeroen Demeyer

Report Upstream: N/AFixed upstream, in a later stable release.

comment:2 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)

comment:3 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)

Changed 11 years ago by Jeroen Demeyer

Attachment: mercurial-1.8.4.p0.patch added

Diff for the mercurial spkg, for review only

comment:4 Changed 11 years ago by Jeroen Demeyer

Status: newneeds_review

comment:5 Changed 11 years ago by R. Andrew Ohana

Status: needs_reviewpositive_review

looks good, works good

comment:6 Changed 11 years ago by R. Andrew Ohana

Reviewers: R. Andrew Ohana

comment:7 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.0.beta4
Resolution: fixed
Status: positive_reviewclosed

comment:8 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)
Note: See TracTickets for help on using tickets.