Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#18343 closed defect (invalid)

py-geoip fails to build

Reported by: benjamin.winston@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: build failure Cc:
Port: py-geoip

Description (last modified by mf2k (Frank Schima))

upon port install py-geoip, I get:

dorothy:nproxy benjaminwinston$ sudo port install py-geoip
--->  Fetching py-geoip
--->  Verifying checksum(s) for py-geoip
--->  Extracting py-geoip
--->  Configuring py-geoip
--->  Building py-geoip
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-geoip/work/GeoIP-Python-1.2.0" && /opt/local/bin/python2.4 setup.py build " returned error 1
Command output: Traceback (most recent call last):
  File "setup.py", line 12, in ?
    ext_modules = [module1])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/core.py", line 123, in setup
    dist.parse_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 339, in parse_config_files
    filenames = self.find_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 302, in find_config_files
    check_environ()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/util.py", line 209, in check_environ
    os.environ['PLAT'] = get_platform()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/util.py", line 78, in get_platform
    cfgvars = get_config_vars()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 488, in get_config_vars
    func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 373, in _init_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "" during configure

Error: Status 1 encountered during processing.
dorothy:nproxy benjaminwinston$ 

Change History (8)

comment:1 Changed 16 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: py-geoip removed

comment:2 Changed 16 years ago by jmroot (Joshua Root)

What version of python24 do you have installed?

comment:3 Changed 16 years ago by benjamin.winston@…

lol! I take it that's a leading question! Since the answer is:

Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information.

So I should be using the ports python then? :-)

comment:4 Changed 16 years ago by benjamin.winston@…

Hmm... I've switched /usr/bin/python linkage to point instead now to /opt/local/bin/python2.4, run port py-geoip clean and then port py-geoip install again, and same problem:

orothy:~ benjaminwinston$ sudo port clean py-mysql ---> Cleaning py-mysql dorothy:~ benjaminwinston$ sudo port install py-mysql ---> Fetching py-mysql ---> Verifying checksum(s) for py-mysql ---> Extracting py-mysql ---> Applying patches to py-mysql ---> Configuring py-mysql ---> Building py-mysql Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2" && /opt/local/bin/python2.4 setup.py build " returned error 1 Command output: you may need to enable firewall access for this script first. I will start the download in 15 seconds.

(Note: if this machine does not have network access, please obtain the file

http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.6c5-py2.4.egg

and place it in this directory before rerunning this script.)


Downloading http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.6c5-py2.4.egg Traceback (most recent call last):

File "setup.py", line 5, in ?

import ez_setup; ez_setup.use_setuptools()

File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2/ez_setup.py", line 85, in use_setuptools

import setuptools; setuptools.bootstrap_install_from = egg

File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2/setuptools-0.6c5-py2.4.egg/setuptools/init.py", line 2, in ? File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2/setuptools-0.6c5-py2.4.egg/setuptools/extension.py", line 2, in ? File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2/setuptools-0.6c5-py2.4.egg/setuptools/dist.py", line 5, in ? File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-mysql/work/MySQL-python-1.2.2/setuptools-0.6c5-py2.4.egg/setuptools/command/init.py", line 13, in ? File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/bdist.py", line 29, in ?

class bdist (Command):

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/bdist.py", line 33, in bdist

user_options = [('bdist-base=', 'b',

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/util.py", line 78, in get_platform

cfgvars = get_config_vars()

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 488, in get_config_vars

func()

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 373, in _init_posix

raise DistutilsPlatformError(my_msg)

distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "" during configure

Error: Status 1 encountered during processing.

comment:5 Changed 16 years ago by benjamin.winston@…

Could it be a problem with my xcode? I've just tried building py-mysql and same problem. Clearly it's my fault and not the package maintainers - but wtf have I done wrong?

comment:6 Changed 16 years ago by benjamin.winston@…

Okay, this is now resolved, it was my fault. Since this now comes to the top of a google search for the failed shell variable, I will share (for the macports n00bs, like myself) what I did:

1) I was running the wrong python, I was using the mac os x installed python 2.5, rather than the macports package python24. I have a leopard system that was upgraded from tiger, and the former was located in /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, then linked to from /usr/bin/python. I re-linked this to point to /opt/local/bin/python2.4 I assume this made a difference but I haven't tested it - so far as the actual *use* of python in the build goes.

2) (and probably much more importantly ;-) I was running an out-of-date python24 package from macports. To update this, I first ran a "sudo port -v selfupdate", then I ran a "sudo port -R upgrade python24" which rebuilt and upgraded my python 2.4 to the latest version.

3) I then installed the modules I was looking for, including py-geoip and py-mysql. Since I saw this (cryptic?) error on two different modules, it's likely that you, my google-found-friend have a problem similar to mine. "sudo port install py-mysql" and "sudo port install py-geoip".

Could someone with the power please apply the action "mark as just-another-lamer" below, as I only have "leave as new".

RESOLVED.

comment:7 Changed 16 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed

Glad you got it working!

comment:8 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.