Help - Search - Members - Calendar
Full Version: Gtk2 Issue In Compiling
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
ZDevil
Good day!

I've been trying to compile a couple of apps that required GTK2 on my Z (C1000 rc12). However, unfortunately I got none of them complied because of the same error during configure:

CODE
checking for GTK+ - version >= 2.0.3... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: *** GTK >= 2.0.3 not found ***


Isn't true that GTK2 is already installed in rc12? I tried to prefix the path like this but still to no avail:
CODE
--with-gtk-prefix=/usr/lib/gtk/gtk-2.0/2.4.0


But pgas assured me that GTK apps should be compiled well on Z. Or did I miss something crucial here? blink.gif

Please enlighten this newbie before he finally freaks out. Thanks! smile.gif
ZDevil
Not sure if this is relevant. Here is what I find concerning the gtk2 error in config.log when compiling gtk2-enabled JPilot:

CODE
configure:23049: result: GTK2 support enabled by configure options
configure:23078: checking for pkg-config
configure:23096: found /opt/native/arm/3.4.4-xscale-softvfp/bin/pkg-config
configure:23109: result: /opt/native/arm/3.4.4-xscale-softvfp/bin/pkg-config
configure:23130: checking for GTK+ - version >= 2.0.3
configure:23275: result: no
configure:23308: gcc -o conftest -g -O2  
-I/mnt/card/jpilot/pilot-link-0.12.0-pre4/incl$
conftest.c:37:21: gtk/gtk.h: No such file or directory
conftest.c: In function `main':
conftest.c:43: error: `gtk_major_version' undeclared (first use in this
function)
conftest.c:43: error: (Each undeclared identifier is reported only once
conftest.c:43: error: for each function it appears in.)
conftest.c:43: error: `gtk_minor_version' undeclared (first use in this
function)
conftest.c:43: error: `gtk_micro_version' undeclared (first use in this
function)
configure:23314: $? = 1
configure: failed program was:
| /* confdefs.h.  */


(I added --with-pilot-prefix=/mnt/card/... because the required pilot-link headers are there.)

Thanks!! smile.gif
pgas
hmm, difficult to say what the problem is without trying, can you please post a link to the sources you are trying to compile?

pkgc-config retrune the flags for compiling gtk2.0 apps you can try
CODE
pkg-config --clfags gtk+-2.0
pkg-config --libs gtk+-2.0


You can check how the test is done in the configure script, and check what goes wrong, maybe bypassing the test..
ZDevil
That's very nice of you, pgas. smile.gif

I was trying to compile about half a dozen apps requiring gtk+, here are two of them:
The first is JPilot
Requirement: http://www.jpilot.org/requirements.html
Source: http://jpilot.org/jpilot-0.99.8.tar.gz
Patch 1: http://www.jpilot.org/patch.jpilot-sync
Patch 2: http://www.neonbox.org/zaurus/jpilot-0.99.8-armfix.diff
Patch 3: http://www.neonbox.org/zaurus/jpilot-0.99....gfault_fix.diff
(Finally learned how to apply patches after doing googling for quite a while ... tongue.gif )

To sync devices, Pilot-link also has to be compiled.
Source: http://www.pilot-link.org/filestore2/downl....0-pre4.tar.bz2

I was trying to compile it with --enable-gtk2 (for multi-language support) flag and to get all the plugins (esp keyring and mail) included, but ran into errors as described above.

Another app is leafpad 0.8.5 (with several fixes of the older versions. 0.7.8 is available as a pdaXrom ipk)
Source: http://savannah.nongnu.org/download/leafpa...ad-0.8.5.tar.gz

Meanwhile I'll also have a go with the instruction you gave after work today.
Thanks! laugh.gif
ZDevil
QUOTE(pgas @ Dec 5 2005, 10:22 AM)
hmm, difficult to say what the problem is without trying, can you please post a link to the sources you are trying to compile?

pkgc-config retrune the flags for compiling gtk2.0 apps you can try
CODE
pkg-config --clfags gtk+-2.0
pkg-config --libs gtk+-2.0


You can check how the test is done in the configure script, and check what goes wrong, maybe bypassing the test..
*



Just can't resist the temptation so I fish my Z out from my sag to try.
Then a question popped up: rolleyes.gif
I found pkg-config in the native SDK image. How can I retune the flags and where should I put them?
Pardon my being so obliviously n00b. Thanks again.

[Update]
Ok, now figure it out. Stupid me biggrin.gif (Very often discover the answer shortly after asking stupid questions. Maybe that's life? )
Just do
CODE
export PKG_CONFIG_PATH=/opt/native/arm/3.4.4-scale-softvfp/armv5tel-cack0-linux/lib/pkg-config

before doing pkg-config --cflags gtk+-2.0 and pkg-config --libs gtk+-2.0.
No need to skip the test. Configured JPilot successfully. Let's see how make goes. smile.gif
pgas
hmm, PKG_CONFIG_PATH is set correctly for me in /etc/profile by default

Can you check your /etc/profile?

Note that pkg-config --cflags gtk+-2.0 just print the list of flags that should be use as arguments to gcc to compile gtk+-2.0, it does not actually do/set anything.
ZDevil
QUOTE(pgas @ Dec 5 2005, 02:00 PM)
hmm, PKG_CONFIG_PATH is set correctly for me in /etc/profile by default

Can you check your /etc/profile?

Note that pkg-config --cflags gtk+-2.0   just print the list of flags that should be use as arguments to gcc to compile gtk+-2.0, it does not actually do/set anything.
*


Just checked my /etc/profile. What's funny is that there is a missing "-" in all "pkg-config" in the path:
The original:
CODE
PKG_CONFIG_PATH=PKG_CONFIG_PATH=/opt/native/arm/3.4.4-scale-softvfp/armv5tel-cack0-linux/lib/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig

should be ... ?:
CODE
PKG_CONFIG_PATH=PKG_CONFIG_PATH=/opt/native/arm/3.4.4-scale-softvfp/armv5tel-cack0-linux/lib/pkg-config:/usr/lib/pkg-config:/usr/local/lib/pkgcon-fig:/usr/X11R6/lib/pkg-config


As far as i can remember, I've never tampered with the PKG_CONFIG_PATH lines. Could it be something else that causes this (e.g. packages installed with the wrong paths?) Or am I just further misleading myself into a more n00b path? tongue.gif

Thanks again. smile.gif
pgas
hmm, what sdk are you using? the zgcc image?

the *.pc files are in /opt/native/arm/3.4.4-scale-softvfp/armv5tel-cack0-linux/lib/pkgconfig and not in pkg-config for me.
ZDevil
QUOTE(pgas @ Dec 5 2005, 02:23 PM)
hmm, what sdk are you using? the zgcc image?

the *.pc files are in /opt/native/arm/3.4.4-scale-softvfp/armv5tel-cack0-linux/lib/pkgconfig and not in pkg-config for me.
*


Yes, I'm using the zgcc 3.4.4 image.
Right... this is what confuses me. See how this n00b is confusing himself all the time instead of making good progress. tongue.gif
At first when I used pkg-config --clfags gtk+-2.0 and pkg-config --libs gtk+-2.0, an error popped up asking me to check the PKG_CONFIG_PATH.
So I located the paths in the /etc/profile , and then I export PKG_CONFIG_PATH to the path as in /etc/profile. After that I pkg-config --clfags gtk+-2.0 and pkg-config --libs gtk+-2.0 without errors, and configured simply went through.
So my hunch is i still need to export the path manually in order to avoid the GTK2 not found error during configure.
Please, give me an explanation to let this n00b see some light in the darkness. smile.gif
I have yet to try the other apps. Perhaps I will test this on leafpad 0.8.5 after building a gtk2-enabled version of JPilot.
pgas
you should not have to export PKG_CONFIG_PATH manually, it works for me....so no explanation smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.