Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 May 2011 17:34:30 -0500
From:      Jeremy Messenger <mezz.freebsd@gmail.com>
To:        Ion-Mihai Tetcu <ionut@tetcu.info>
Cc:        gnome@freebsd.org, Koop Mast <kwm@rainbow-runner.nl>, Ion-Mihai Tetcu <itetcu@freebsd.org>, python@freebsd.org
Subject:   Re: gobject-introspection fails to commpile with python2.7 WITH_PTH
Message-ID:  <BANLkTin8wdZSx0K3cmUNq_GjftAPd-fhZw@mail.gmail.com>
In-Reply-To: <20110502155040.60948717.ionut@tetcu.info>
References:  <20110502141720.df243dd1.itetcu@FreeBSD.org> <1304337490.85599.41.camel@crashalot.rainbow-runner.nl> <BANLkTi=fS05JxceBq_EYQpkwSHvuVom=ow@mail.gmail.com> <20110502155040.60948717.ionut@tetcu.info>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/5/2 Ion-Mihai Tetcu <ionut@tetcu.info>:
> On Mon, 2 May 2011 07:02:08 -0500
> Jeremy Messenger <mezz.freebsd@gmail.com> wrote:
>
>> On Mon, May 2, 2011 at 6:58 AM, Koop Mast <kwm@rainbow-runner.nl> wrote:
>> > On Mon, 2011-05-02 at 14:17 +0300, Ion-Mihai Tetcu wrote:
>> >> Hi,
>> >>
>> >>
>> >> Am I tripping on something known here?
>> >>
>> >> Trying to switch to python 2.7 my home dektop, the
>> >> upgrade-site-packages: target fails on gobject-introspectio with:
>> >> >>>>>
>> >> checking whether Python support is requested... checking whether /usr=
/local/bin/pythowith:n2.7 version >=3D 2.5... yes
>> >> checking for /usr/local/bin/python2.7 version... 2.7
>> >> checking for /usr/local/bin/python2.7 platform... freebsd8
>> >> checking for /usr/local/bin/python2.7 script directory... ${prefix}/l=
ib/python2.7/site-packages
>> >> checking for /usr/local/bin/python2.7 extension module directory... $=
{exec_prefix}/lib/python2.7/site-packages
>> >> checking for headers required to compile python extensions... not fou=
nd
>> >> configure: error: Python headers not found
>> >> =3D=3D=3D> =A0Script "configure" failed unexpectedly.
>> >> >>>>>
>> >>
>> >> The relevant part of the log:
>> >> >>>>>
>> >> configure:13291: checking for /usr/local/bin/python2.7 extension modu=
le directory
>> >> configure:13320: result: ${exec_prefix}/lib/python2.7/site-packages
>> >> configure:13341: checking for headers required to compile python exte=
nsions
>> >> configure:13356: cpp -I/usr/local/include -I/usr/local/include/python=
2.7 conftest.c
>> >> In file included from conftest.c:42:
>> >> /usr/local/include/python2.7/Python.h:166:17: error: pth.h: No such f=
ile or directory
>> >> configure:13356: $? =3D 1
>> >> configure: failed program was:
>> >> | /* confdefs.h */
>> >> | #define PACKAGE_NAME "gobject-introspection"
>> >> | #define PACKAGE_TARNAME "gobject-introspection"
>> >> | #define PACKAGE_VERSION "0.9.12"
>> >> | #define PACKAGE_STRING "gobject-introspection 0.9.12"
>> >> | #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?=
product=3Dglib&component=3Dintrospection"
>> >> | #define PACKAGE_URL ""
>> >> | #define PACKAGE "gobject-introspection"
>> >> | #define VERSION "0.9.12"
>> >> | #define STDC_HEADERS 1
>> >> | #define HAVE_SYS_TYPES_H 1
>> >> | #define HAVE_SYS_STAT_H 1
>> >> | #define HAVE_STDLIB_H 1
>> >> | #define HAVE_STRING_H 1
>> >> | #define HAVE_MEMORY_H 1
>> >> | #define HAVE_STRINGS_H 1
>> >> | #define HAVE_INTTYPES_H 1
>> >> | #define HAVE_STDINT_H 1
>> >> | #define HAVE_UNISTD_H 1
>> >> | #define HAVE_DLFCN_H 1
>> >> | #define LT_OBJDIR ".libs/"
>> >> | #define YYTEXT_POINTER 1
>> >> | #define SHLIB_SUFFIX "so"
>> >> | #define GOBJECT_INTROSPECTION_LIBDIR "/usr/local/lib"
>> >> | #define GIR_SUFFIX "gir-1.0"
>> >> | #define GIR_DIR "/usr/local/share/gir-1.0"
>> >> | #define SIZEOF_CHAR 1
>> >> | #define SIZEOF_SHORT 2
>> >> | #define SIZEOF_INT 4
>> >> | #define SIZEOF_LONG 8
>> >> | #define STDC_HEADERS 1
>> >> | #define HAVE_FCNTL_H 1
>> >> | #define HAVE_STDLIB_H 1
>> >> | #define HAVE_STRING_H 1
>> >> | #define HAVE_MEMCHR 1
>> >> | #define HAVE_STRCHR 1
>> >> | #define HAVE_STRSPN 1
>> >> | #define HAVE_STRSTR 1
>> >> | #define HAVE_STRTOL 1
>> >> | #define HAVE_STRTOULL 1
>> >> | /* end confdefs.h. =A0*/
>> >> | #include <Python.h>
>> >> configure:13361: result: not found
>> >> configure:13363: error: Python headers not found
>> >> >>>>>
>> >>
>> >> The relevant part of Python.h is:
>> >> >>>>>
>> >> #ifdef HAVE_PTH
>> >> /* GNU pth user-space thread support */
>> >> #include <pth.h>
>> >> #endif
>> >> >>>>>
>> >>
>> >> Pth lives at:
>> >> /usr/local/include/pth/pth.h
>> >> :)
>>
>> What does your output looks?
>>
>> # python2.7-config --includes
>>
>> I have reported a bug at python@ about python2.6-config doesn't
>> include -L/usr/local/lib/pth. I image for -I/usr/local/include/pth
>> too.
>
> root(itetcu)@it/SU> /usr/ports/lang/python [15:48:24] 0
> =A0# python2.7-config --includes
> -I/usr/local/include/python2.7 -I/usr/local/include/python2.7
>
> :( so the problem does seem to be on the python side also.

Yep. I have committed a fix in gobject-introspection by use
'python${PYTHON_VERSION}-config --includes' instead of static version.

Cheers,
Mezz

>> > As you probably have guessed, python doesn't do -Iinclude/pth/ so it c=
an't find the include.
>> > IMO this is something that should be fixed in the python ports instead
>> > of all python users if python is build by pth support. I think the
>> > python team has some pr's about this.
>>
>> Agreed, but too bad the gobject-introspection doesn't use
>> 'python2.7-config --includes'. I will cook up a patch for
>> gobject-introspection to use 'python2.7-config --includes' this
>> evening.
>
>
> --
> Ion-Mihai Tetcu <ionut@tetcu.info>
>



--=20
mezz.freebsd@gmail.com - mezz@FreeBSD.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTin8wdZSx0K3cmUNq_GjftAPd-fhZw>