Author Topic: How do I build an app requiring GTK?  (Read 2758 times)

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« on: May 15, 2004, 01:18:39 pm »
I am trying to build GQView 1.2, since the 1.3 version on pdaXrom is not stable (it aborts after about ten seconds of slideshow or photo viewing). However, it is not clear to me what I have to do to build the app. I have downloaded the -devel packages, and I see they have static libraries in them. But I am not sure if that is what I want. Do I just stick those libs into my /opt/arm/3.3.2/armv5tel-cacko-linux/usr/X11R6/lib directory? What about the config scripts in those packages? Do I need to run those? I suspect not.
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #1 on: May 16, 2004, 12:26:57 pm »
Anyone?
Zaurus SL-C860 / pdaXrom

sashz

  • Sr. Member
  • ****
  • Posts: 388
    • View Profile
    • http://
How do I build an app requiring GTK?
« Reply #2 on: May 16, 2004, 12:37:56 pm »
Quote
Anyone?


install SDK and run sdk environment, than try:

LDFLAGS=\"-Wl,-rpath-link,$X11LIB\" ./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=$X11INC --x-libraries=$X11LIB

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #3 on: May 16, 2004, 05:47:05 pm »
Thank you sash, but no luck. It appears that my GTK is out of date? Here is the complaint:
Code: [Select]
checking for gtk-config... /opt/arm/3.3.2/bin/gtk-config

checking for GTK - version >= 1.2.10... 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 was incorrectly installed

*** or that you have moved GTK since it was installed. In the latter case, you

*** may want to edit the gtk-config script: /opt/arm/3.3.2/bin/gtk-config

configure: error: GTK+ >= 1.2.10 not installed.

This is why I was trying to install the latest version from the ipk feed.
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #4 on: May 16, 2004, 05:53:16 pm »
I take it back. When I look at the gtk-config script, it shows the version as 1.2.10.
And when I run \"gtk-config --version\", it returns 1.2.10.
So, there must be some other issue with the configure script.
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #5 on: May 16, 2004, 05:59:29 pm »
Ok. The problem is that the config program that is compiled and linked to test the GTK version is failing to link.
The problem is the lack of libXext, as this config.log snippet shows:
Code: [Select]
configure:1636: gcc -o conftest -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/gtk-1.2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/include/glib-1.2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/lib/glib/include -I/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include  -Wl,-rpath-link,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib conftest.c  -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm -Wl,-rpath-link,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib 1>&5

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libgtk.so when searching for -lgtk

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libgdk.so when searching for -lgdk

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libgmodule.so when searching for -lgmodule

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libglib.so when searching for -lglib

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libdl.so when searching for -ldl

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libdl.a when searching for-ldl

/usr/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXext.so when searching for -lXext

/usr/bin/ld: cannot find -lXext

And yet, the library is there:
Code: [Select]
sh-2.05b$ find /opt/arm/3.3.2/armv5tel-cacko-linux/ -name libXext* -print

/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib/libXext.so

So, I am confused now...
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #6 on: May 16, 2004, 06:00:16 pm »
Oh, duh. Now I see it. The configure script is using gcc, not the cacko cross gcc.
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #7 on: May 16, 2004, 06:03:49 pm »
Here is what I needed, to set CC:
Code: [Select]
CC=armv5tel-cacko-linux-gcc LDFLAGS="-Wl,-rpath-link,$X11LIB" ./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=$X11INC --x-libraries=$X11LIB
Zaurus SL-C860 / pdaXrom

time

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://www.trustice.com
How do I build an app requiring GTK?
« Reply #8 on: May 16, 2004, 09:59:10 pm »
Ok, I finally got GQView to build, however, it is still not working. Segfault when I run it after several complaints about:
Code: [Select]
GdkPixbuf-WARNING **: Can not open pixbuf loader module file \'\': No such file or directory

GdkPixbuf-WARNING **: Error loading XPM image loader: Image type \'xpm\' is not supported

To get it to compile, I had to add \'-lgdk-x11-2.0\' to the link step.
No idea why it segfaults, but I think I give up now.
Alas, the new 1.4 GQView on the pdaXrom feed is still unstable.
It will crash when I do full screen slide shows, which is precisely what I want it for
Zaurus SL-C860 / pdaXrom