Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#17685 closed defect (fixed)

Mercurial 1.1 port fails to build using MacPorts 1.7

Reported by: luc@… Owned by: deric@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc:
Port: mercurial

Description

Trying to build mercurial 1.1 using the latest MacPorts 1.7 fails with the following error message:

....
....
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_mercurial/work/mercurial-1.1" && /opt/local/bin/python2.5 setup.py build'
Traceback (most recent call last):
  File "setup.py", line 144, in <module>
    **extra)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 125, in setup
    dist.parse_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 378, in parse_config_files
    filenames = self.find_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 339, in find_config_files
    check_environ()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/util.py", line 208, in check_environ
    os.environ['PLAT'] = get_platform()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/util.py", line 78, in get_platform
    cfgvars = get_config_vars()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/sysconfig.py", line 493, in get_config_vars
    func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/sysconfig.py", line 375, in _init_posix
    elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')):
ValueError: invalid literal for int() with base 10: ''

This seems to be caused by MACOSX_DEPLOYMENT_TARGET not being set correctly.

Change History (10)

comment:1 Changed 12 years ago by luc@…

Cc: luc@… added

Cc Me!

comment:2 Changed 12 years ago by mf2k (Frank Schima)

Cc: deric@… luc@… removed
Owner: changed from macports-tickets@… to deric@…

The reporter is automatically CC'ed.

comment:3 Changed 12 years ago by luc@…

One thing I forgot to mention is that even though distutils seems to get an empty MACOSX_DEPLOYMENT_TARGET, the environment variable is correctly set by MacPorts as shown by the following line from the log:

DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5'

comment:4 Changed 12 years ago by blb@…

Builds fine for me on 1.7, what version of python25 do you have installed? Use port installed python25.

comment:5 Changed 12 years ago by luc@…

% port installed python25
The following ports are currently installed:
  python25 @2.5.2_7+darwin_9 (active)

comment:6 Changed 12 years ago by luc@…

More details: distutils looks for MACOSX_DEPLOYMENT_TARGET in the "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/Makefile" file. Mine has it empty:

...
# Deployment target selected during configure, to be checked
# by distutils. The export statement is needed to ensure that the
# deployment target is active during build.
MACOSX_DEPLOYMENT_TARGET=
export MACOSX_DEPLOYMENT_TARGET
...

comment:7 Changed 12 years ago by jmroot (Joshua Root)

Might need to rebuild python25, as MacPorts 1.6 did not set MACOSX_DEPLOYMENT_TARGET. Do it like so:

sudo port -fn upgrade python25

comment:8 in reply to:  7 Changed 12 years ago by luc@…

Replying to jmr@…:

Might need to rebuild python25, as MacPorts 1.6 did not set MACOSX_DEPLOYMENT_TARGET.

That was it. Upgrading failed as well however, but uninstalling, reinstalling and then upgrading mercurial worked just fine. Thanks for the help, I guess this can be closed now.

comment:9 Changed 12 years ago by deric@…

Resolution: fixed
Status: newclosed

comment:10 Changed 12 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.