Opened 10 years ago

Closed 9 years ago

#28479 closed defect (fixed)

gobject-introspection 0.9.12 FTB with Python < 2.5 or >= 3 selected

Reported by: gale@… Owned by: singingwolfboy@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: nhojpatrick (John Patrick)
Port: gobject-introspection

Description

With python 3.2 selected as the default python version using python-select:

$ sudo port upgrade atk
--->  Computing dependencies for gobject-introspection
--->  Configuring gobject-introspection
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)

And then from the log:

:info:configure checking whether Python support is requested... checking for a Python interpreter with version >= 2.5... python
:info:configure checking for python... /opt/local/bin/python
:info:configure checking for python version... 3.2
:info:configure checking for python platform... darwin
:info:configure checking for python script directory... ${prefix}/lib/python3.2/site-packages
:info:configure checking for python extension module directory... ${exec_prefix}/lib/python3.2/site-packages
:info:configure checking for headers required to compile python extensions...   File "<string>", line 1
:info:configure     import sys; print sys.prefix
:info:configure                         ^
:info:configure SyntaxError: invalid syntax
:info:configure   File "<string>", line 1
:info:configure     import sys; print sys.exec_prefix
:info:configure                         ^
:info:configure SyntaxError: invalid syntax
:info:configure not found
:info:configure configure: error: Python headers not found

This appears to be a problem with an autoconf script. The script in question could easily be fixed to work with all versions of python by adding parens:

import sys; print(sys.prefix)
import sys; print(sys.exec_prefix)

Change History (8)

comment:1 Changed 10 years ago by ryandesign (Ryan Schmidt)

Seems to be the same issue as #28468: gobject-introspection uses "python" when it should use a specific known-good version of python instead.

comment:2 in reply to:  1 Changed 10 years ago by gale@…

Replying to ryandesign@…:

Seems to be the same issue as #28468: gobject-introspection uses "python" when it should use a specific known-good version of python instead.

It's two different issues, but yes, that would fix both of them.

Note that this port is a little unusual in that it seems to want to compile its own extension to the python interpreter (since it is trying to verify the availability of the python headers). So it may take a little extra care to make sure that all the needed bits are in place when narrowing the port to a specific python version.

I know that we're usually talking to the wall, but we probably should complain about this again upstream.

comment:3 Changed 10 years ago by vulcan_@…

ummm .. no, that thing with the parens does not really fix it.

:info:configure checking for backtrace_symbols... yes
:info:configure checking whether Python support is requested... checking for a Python interpreter with version >= 2.5... python
:info:configure checking for python... /opt/local/bin/python
:info:configure checking for python version... 3.2
:info:configure checking for python platform... darwin
:info:configure checking for python script directory... ${prefix}/lib/python3.2/site-packages
:info:configure checking for python extension module directory... ${exec_prefix}/lib/python3.2/site-packages
:info:configure checking for headers required to compile python extensions... not found
:info:configure configure: error: Python headers not found
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gobject-introspection/work/gobject-introspection-0.10.6" && ./configure --prefix=/opt/local " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)

i made the changes to the configuration file by hand

bash-3.2# grep "sys.exec" config*
configure:py_exec_prefix=`$PYTHON -c "import sys; print (sys.exec_prefix)"`
bash-3.2# grep "sys.prefix" config*
configure:py_prefix=`$PYTHON -c "import sys; print (sys.prefix)"`

bash-3.2# python_select -l
Available versions:
current none python24 python25 python26 python26-apple python27 python32
bash-3.2# python_select -s
python32

so .. any other suggestions?

comment:4 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to singingwolfboy@…

comment:5 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: nhoj.patrick@… added

Has duplicate #32398.

The workaround would be to install and select python27, clean gobject-introspection and try again.

comment:6 Changed 9 years ago by nhojpatrick (John Patrick)

Fixed the issue by installing and selecting python 2.7.

Does this mean gobject-introspection will be update to record that it requires a specific version of python as a dependency.

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

Keywords: python3 autoconf removed
Summary: gobject-introspection 0.9.12 FTB with Python 3 selectedgobject-introspection 0.9.12 FTB with Python < 2.5 or >= 3 selected

comment:8 Changed 9 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.