WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: {SOLVED} Compiling pygtk-2,12,1 error headers not found.  (Read 18148 times)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #15 on: December 23, 2008, 07:57:47 AM »
I think that problem with installing libcairo is "all libraries are not available at one place".

kagashe

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #16 on: December 23, 2008, 08:32:03 AM »
ah - perhaps LDFLAGS was unset and you need "export LDFLAGS=/lib:/usr/lib:/usr/local/lib"

..or otherwise continue down the symlinks route  :)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #17 on: December 24, 2008, 01:05:06 AM »
ah - perhaps LDFLAGS was unset and you need "export LDFLAGS=/lib:/usr/lib:/usr/local/lib"

..or otherwise continue down the symlinks route  :)
Let me clarify what is happening. I could configure PYcairo but the make failed to detect those libs. When I try to configure with "export LDFLAGS=/lib:/usr/lib:/usr/local/lib" I get the error:
Quote
configure: error: C compiler cannot create executables.

Now I am trying to compile cairo (required by pycairo and assuming it is not present) it fails to detect pixman (which is present).

kagashe

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #18 on: December 24, 2008, 01:12:16 AM »
Cairo is part of gtk+-2 in TC, so it is present.

It still sounds like you have a bad syntax in your exported flags.  I usually use something like this for LDFLAGS:

export LDFLAGS="-L/usr/local/lib -L/usr/lib"

I am not saying Juanito is wrong, but I have not tried other LDFLAGS syntax and I cannot test it now to see.

ALso, pycairo will not detect GTK and other libs if it is still having trouble with with the X development libs.
« Last Edit: December 24, 2008, 01:19:41 AM by Jason W »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #19 on: December 24, 2008, 08:10:10 AM »
Quote
I am not saying Juanito is wrong
but I think I was wrong - well spotted, I should have had the -L in front of each lib location.

Note that one other option is to edit the Makefile and correct the location of the libs - the line(s) to edit are usually near the beginning.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #20 on: December 24, 2008, 08:09:22 PM »
While I am trying to compile this package it is a good learning experince and thanks to both of you Jason and Juanito. Couple of questions:

Although the Python.h was in /usr/local/include/python2.5 (I think that is the default location) it could be detected only when I used python.tce. Using python.tcz always produced error no matter what I do with CPPFLAGS.

Similarly even after using correct syntax in LDFLAGS the libs in /usr/local/lib were not detected, however, "sudo ln -s /usr/local/xxxx.la /usr/lib" seems to work.

That brings me to the questions:
1. Is it necessary to use .tce packages instead of .tcz for compiling? Specially when our libs are located in /usr/local/lib?

2. When I compile with "sudo ln -s /usr/local/xxxx.la /usr/lib" the compiled program may also look for the symlink in /usr/lib and not finding it fails.

I will try the suggestion of Juanito to edit the makefile.

With the above I could compile pygobject and pycairo and almost succeeded in compiling pygtk but pygtk hangs in make at this point:
Creating gtkunixprint.la
..
..
..
gtk:c:68363:...:assignment for incomplete pointer type

It might be hanging also because I am trying this on 256 MB RAM machine and Python and Python-devs are loaded as .tce, others (gtk, libs Xorg etc) are .tcz.

I will also try disabling gtkunixprint in ./configure.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Compiling pygtk-2,12,1 error headers not found.
« Reply #21 on: December 25, 2008, 12:45:23 AM »
That brings me to the questions:
1. Is it necessary to use .tce packages instead of .tcz for compiling? Specially when our libs are located in /usr/local/lib?

2. When I compile with "sudo ln -s /usr/local/xxxx.la /usr/lib" the compiled program may also look for the symlink in /usr/lib and not finding it fails.
ref 1: I've used tcz extensions to compile large stuff like oo without problems

ref 2: As long as you use "l" in the extension name (i.e. tcel), the libraries will be loaded and you should be OK

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: {SOLVED} Compiling pygtk-2,12,1 error headers not found.
« Reply #22 on: December 25, 2008, 01:37:35 AM »
I have finally compiled pygtk-2.10.6.tcelm package which includes pygobject-2.12.3 pycairo-1.4.0 and pygtk-2.10.6

I did not go for pygtk-2.12.1 because of dependency problems with cairo.

kagashe

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: {SOLVED} Compiling pygtk-2,12,1 error headers not found.
« Reply #23 on: March 24, 2009, 06:01:54 AM »
I can't see pygtk in the repository
dCore user

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: {SOLVED} Compiling pygtk-2,12,1 error headers not found.
« Reply #24 on: March 24, 2009, 05:39:38 PM »
never mind I compiled myself all this libs for nicotine, I'll send soon to the tcl team
dCore user