misc/151534: lang/python26 + WITH_PTH doesn't install correctly

Tom Evans tevans.uk at googlemail.com
Mon Oct 18 13:40:07 UTC 2010


>Number:         151534
>Category:       misc
>Synopsis:       lang/python26 + WITH_PTH doesn't install correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 18 13:40:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Tom Evans
>Release:        7-STABLE
>Organization:
Mintel
>Environment:
FreeBSD strangepork.mintel.co.uk 7.3-STABLE FreeBSD 7.3-STABLE #3: Fri May 14 18:27:38 BST 2010     root at strangepork.mintel.co.uk:/usr/FreeBSD/RELENG_7/obj/usr/FreeBSD/RELENG_7/src/sys/STRANGEPORK  i386
>Description:
If python is built/installed with the WITH_PTH knob enabled, then the python C header file Python.h explicitly includes <pth.h>. 

By default, this is installed in /usr/local/include/pth , but this include path is not then typically included in 3rd party modules include path, so any python module that requires compilation fails.

Eg, this is for net/py-ldap2:

root at strangepork '14:26:55' '/usr/ports/net/py-ldap2'
> # make clean all
===>  Cleaning for python26-2.6.6
===>  Cleaning for py26-ldap2-2.3.11
=============================================================

You can build py26-ldap2-2.3.11 with the following options:

WITH_SASL                with (Cyrus) SASL2 support

=============================================================

===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
... <snip> ...
building '_ldap' extension
creating temp.freebsd-7.3-STABLE-i386-2.6
creating temp.freebsd-7.3-STABLE-i386-2.6/Modules
cc -DNDEBUG -O2 -fno-strict-aliasing -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -O2 -fno-strict-aliasing -pipe -DLDAP_DEPRECATED -fPIC -DHAVE_LIBLDAP_R -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.11 -IModules -I/usr/local/include -I/usr/include/sasl -I/usr/local/include/python2.6 -c Modules/LDAPObject.c -o temp.freebsd-7.3-STABLE-i386-2.6/Modules/LDAPObject.o
In file included from Modules/common.h:10,
                 from Modules/LDAPObject.c:4:
/usr/local/include/python2.6/Python.h:163:17: error: pth.h: No such file or directory
error: command 'cc' failed with exit status 1
*** Error code 1

Stop in /usr/FreeBSD/CURRENT/ports/net/py-ldap2.

This is also discussed on the FreeBSD forums, with the advice there being to symlink or copy the pth.h header into the python include directories!
http://forums.freebsd.org/showpost.php?p=63771&postcount=16

>How-To-Repeat:
cd /usr/ports/lang/python26
make config (select WITH_PTH)
make clean all deinstall reinstall
cd /usr/ports/net/py-ldap2
make clean all
>Fix:
I'm unsure - I tried to fix it by patching Misc/python-config.in to include the pth location, but this seemingly doesn't help matters - the net/py-ldap2 port (or python distutils) must be getting the includes from elsewhere.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list