configure: error: could not find Python headers

I rebuilded lang/python26 with PTH option, and have rebuilt Python 2.6 recursive ports. But devel/py-orbit cannot rebuild.

Code:
# make
===>   py26-orbit-2.24.0 depends on file: /usr/local/bin/python2.6 - found
===>   py26-orbit-2.24.0 depends on executable: gmake - found
===>   py26-orbit-2.24.0 depends on executable: pkg-config - found
===>   py26-orbit-2.24.0 depends on shared library: glib-2.0.0 - found
===>   py26-orbit-2.24.0 depends on shared library: IDL-2.0 - found
===>   py26-orbit-2.24.0 depends on shared library: ORBit-2.0 - found
===>  Configuring for py26-orbit-2.24.0
...
...
checking for headers required to compile python extensions... found
checking for python libraries... not found
configure: error: could not find Python headers
===>  Script "configure" failed unexpectedly.
Please run the gnomelogalyzer, available from
"http://www.freebsd.org/gnome/gnomelogalyzer.sh", which will diagnose the
problem and suggest a solution. If - and only if - the gnomelogalyzer cannot
solve the problem, report the build failure to the FreeBSD GNOME team at
[email]gnome@FreeBSD.org[/email], and attach (a)
"/usr/ports/devel/py-orbit/work/pyorbit-2.24.0/config.log", (b) the output
of the failed make command, and (c) the gnomelogalyzer output. Also, it might
be a good idea to provide an overview of all packages installed on your system
(i.e. an `ls /var/db/pkg`). Put your attachment up on any website,
copy-and-paste into [url]http://freebsd-gnome.pastebin.com[/url], or use send-pr(1) with
the attachment. Try to avoid sending any attachments to the mailing list
(gnome@FreeBSD.org), because attachments sent to FreeBSD mailing lists are
usually discarded by the mailing list software.
*** Error code 1

Stop in /usr/ports/devel/py-orbit.
 
jjthomas said:
How so? I am having the same problem.

-JJ

Because he was suggesting to install something from source instead of fixing his python/something-else installation from ports.

Questions is - did you (and OP) updated your python from 2.5 to 2.6 and followed *all* instructions in /usr/ports/UPDATING?
 
I would try first to build py-orbit separately first:
Code:
# cd /usr/ports/devel/py-orbit ; make clean ; make install clean
or even like this:
ls /var/db/pkg |grep py-orbit
and if the package exists
Code:
# cd /usr/ports/devel/py-orbit ; make deinstall ; make clean ; make reinstall
 
crsd said:
Because he was suggesting to install something from source instead of fixing his python/something-else installation from ports.

Questions is - did you (and OP) updated your python from 2.5 to 2.6 and followed *all* instructions in /usr/ports/UPDATING?

It is a brand new installation. I am installing FreeBSD on two computers. One will be a server and the other my personal workstation. The server I successfully installed the xfce desktop. :)

The server had a couple of stop messages that I was able to resolve by changing the config of the failing port.

The desktop stopped (building with a gnome desktop, btw) with the same message the OP encountered. I spent about 8 hours trying to get it resolved without any success. I then rebuilt my desktop using packages.

I did try to update ports. I got a message that it was current. Given that this was a brand new install is that a good assumption, or did I miss a step. I am installing FreeBSD 8.0.

If my desktop finishes and works the way I want it to, that will be fine. If not I'll give ports another go.

-JJ
 
I was able to get eveything to install. I did install GhostScript8 before I installed xorg / gnome2. I also used portmaster this go around.

-JJ
 
PlatinumKing, do you still have this problem, or can this topic be marked [solved]?
 
Doesn't work if using GNU Pth

This is a work around, not a solution. Basically, if you are using GNU Pth (PTH option on the lang/python26 "make config" screen), then the pth.h file isn't found because it isn't included in the python headers. Because the GNU Pth option is off by default, most people don't run into the issue as it then uses a version included in python.

Thus, you can work around the problem by either copying or symlinking the real pth.h file into the python includes or reinstalling python without the GNU Pth option. However, the best solution would probably be to have the configure script check if devel/pth is installed.
 
Try
ln -s /usr/local/lib/pth/libpth.a /usr/local/lib/
ln -s /usr/local/include/pth/pth.h /usr/local/include/python2.6

Or rebuild python without PTH support.
 
Back
Top