LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 04-12-2015, 08:00 AM   #1
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Rep: Reputation: 36
how to reinstall missing python header files on gentoo?


Hi.

This thread is a follow-up of this one. This problem is far more general than first thought, as it does not only affect pidgin (see linked thread), but many other packages as well, hence the new thread.

So the problem is, that right now I have at least 2 (possibly more) missing python header files: python.h and pyconfig.h. This prevents me from (r)emereging certain packages, like pidgin and dev-python/setuptools and possibly many others that need one of these header files.

Thus my questions are:
- how to reinstall these header files?
- which package(s) provide these header files?
- how to reinstall all python related packages?

FYI: eselect-ing another active python version and then running python-updater does not help.

Thanks in advance.
 
Old 04-15-2015, 02:38 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi

(didn't read your other thread)
pyconfig.h:
"emerge python" should be enough, no?

python.h
I do have a few versions of Python installed on Gentoo on a couple of PCs/notebooks, but I don't have that file ("find / -name python.h").
For what do you need it?
 
Old 04-15-2015, 04:32 PM   #3
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Hi.
Thanks for the reply.

Well, as it turns out, I too have pyconfig.h and it seems to be in the right place. Unfortunately, when I try to recompile pygobject, it doesn't look for this header file in the right location. The header file is in /usr/include/python2.7/pyconfig.h but for some unknown reason when pygobject compiles, it looks for it in /usr/bin/include/python2.7/pyconfig.h which path obviously does not exist. How can I fix that? Is there a way to reset it?

python.h is needed for Pidgin recompilation, although I'm not sure why. While pygobject compilation fails at the initial checking phase, pidgin fails after some compilation. By checking the last few lines of the process it is obvious again, that the compiler looks for python files at the wrong location (path with bin). Very strange...

Last edited by pusrob; 04-15-2015 at 04:33 PM.
 
Old 04-16-2015, 06:19 AM   #4
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Hi guys!

I'm not sure if it is a real solution, but creating a symlink of /usr/include to /usr/bin seems to have solved all my problems. Everything compiles now as it should. Maybe it is only a workaround, but hey, it works.

A real solution would still be much appreciated.

Thanks.
 
Old 04-18-2015, 09:57 AM   #5
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Yup, that's strange.
Which version of pygobject are you trying to emerge (and with which use-flags)?
And with which python version? (which one is active in "eselect python list")

I can try to emerge the same and see how it goes.
 
Old 04-19-2015, 12:38 PM   #6
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Hi.

I'm currently using python3.3 as default, although changing that to 3.4 or 2.7 (originally it was set to 2.7) does not help. Not even with running python-updater (it says everything is OK) after each change.

I tried to compile pygobject 3.14.0 with the cairo, python_targets_python2_7 and python_targets_python3_3 use-flags.

I suspect that some global python path setting got mixed up somewhere, and that is what I should find and correct. I just have no idea where it is...
The good news is, that the workaround works flawlessly so far, so I'm not rushed to make the proper fix
 
Old 04-19-2015, 03:31 PM   #7
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
So, I have emerged 3.14.0 (on amd64 arch) with the use-flags "cairo python2_7 python3_3 python3_4" (currently selected 3.3 in eselect) and didn't have any problems while emerging.

Code:
# eix pygobject
dev-python/pygobject
     Available versions:  
     (2)    2.28.6-r55
     (3)    3.12.2 3.14.0
       {+cairo examples libffi test +threads PYTHON_TARGETS="python2_7 python3_3 python3_4"}
     Installed versions:  2.28.6-r55(2)(19:19:58 02/18/15)(-examples -libffi -test PYTHON_TARGETS="python2_7") 3.14.0(3)(21:50:32 04/19/15)(cairo -examples -test -threads PYTHON_TARGETS="python2_7 python3_3 python3_4")
     Homepage:            https://wiki.gnome.org/Projects/PyGObject
Locations:
Code:
# find / -name pyconfig.h
/usr/include/python2.7/pyconfig.h
/usr/include/python3.3/pyconfig.h
/usr/include/python3.4/pyconfig.h
/usr/lib64/openoffice/program/python-core-2.7.6/include/python2.7/pyconfig.h
/var/tmp/portage/dev-util/kdevelop-python-1.5.2/work/kdev-python-v1.5.2/python-src/pyconfig.h
/var/tmp/portage/dev-util/kdevelop-python-1.6.0/work/kdevelop-python-1.6.0_build/python-src/pyconfig.h
If the setup is the same for you then some symlink is missing OR the Pidgin package looks for something that does not exist.
I would tend to exclude the 2nd possibility - many people would have complained by now.
Concerning case #1: how can I look for symlinks that point to that file or to its parent directory?

Otherwise you could just postpone all this stuff - whenever some other installation wants to overwrite your symlink you'll get a warning and you'll have to delete it manually.
 
Old 04-19-2015, 06:20 PM   #8
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Well, it went smoothly for you. This much I expected. I really think some variable or something got mixed in my system, and that was causing all the python related troubles. All these errors got nothing to do with actual packages.

Thus as long as there are no extra troubles, I think I'll just postpone the stuff, as the symlink I created seems to be quite harmless.

Thanks for your help anyway.
 
Old 04-19-2015, 06:57 PM   #9
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
You're welcome!
Don't forget to mark the thread as solved, yo!
 
Old 04-19-2015, 07:16 PM   #10
pusrob
Member
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 507

Original Poster
Rep: Reputation: 36
Sure thing . Marked as solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pointing configure at python header files MasterAir Linux - Software 1 05-03-2013 07:17 AM
Linux header files missing and v4l files unable to compile szutshi Linux - Newbie 5 09-13-2011 02:00 PM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM
missing header files sagitalk Programming 3 01-27-2009 08:49 AM
Missing C header files? kushalkoolwal Programming 3 11-07-2005 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration