Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12416 closed defect (fixed)

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

Reported by: jdemeyer 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:

Description (last modified by jdemeyer)

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 jdemeyer 8 years ago.
Diff for the mercurial spkg, for review only

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by jdemeyer

  • Report Upstream changed from N/A to Fixed upstream, in a later stable release.

comment:2 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 8 years ago by jdemeyer

  • Description modified (diff)

Changed 8 years ago by jdemeyer

Diff for the mercurial spkg, for review only

comment:4 Changed 8 years ago by jdemeyer

  • Status changed from new to needs_review

comment:5 Changed 8 years ago by ohanar

  • Status changed from needs_review to positive_review

looks good, works good

comment:6 Changed 8 years ago by ohanar

  • Reviewers set to R. Andrew Ohana

comment:7 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.0.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:8 Changed 8 years ago by jdemeyer

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