LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-21-2005, 06:18 PM   #1
dantelives
LQ Newbie
 
Registered: Jun 2005
Location: Salem, Oregon
Distribution: Kubuntu
Posts: 3

Rep: Reputation: 0
compiling error with GTK+


After finally getting GTK+ 2.6.7 to compile and install I am having a problem using the library while compiling another program. Here is the relevant text from compiling the program:

checking for GTK+ - version >= 2.0.0... 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.

The relevant text (as near as I can tell) from config.log is:

configure:2987: checking for GTK+ - version >= 2.0.0
configure:3102: gcc -o conftest -g -O2 -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include conftest.c -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 >&5
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_renderer_get_type'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_renderer_set_matrix'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `g_assert_warning'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_renderer_draw_glyphs'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_renderer_draw_layout'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_renderer_draw_layout_line'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `pango_font_description_get_size_is_absolute'
/usr/local/lib/libpangoft2-1.0.so.0: undefined reference to `g_return_if_fail_warning'
collect2: ld returned 1 exit status
configure:3105: $? = 1
configure: program exited with status 1

I've tried setting the PKG_CONFIG_PATH and LD_LIBRARY_PATH variables but I keep getting the same message. GTK seemed to compile and install fine once I got the supporting libaries installed with the above variables set to find the libraries. Could someone with more programming experience, please, point me to where my problem is? Thanks.

Oh, and a secondary question. Is there a file in which the PKG_CONFIG_PATH is defined? It seems that after I make the change with "export PKG_CONFIG_PATH" it only lasts as long as I have the terminal open. When I reopen the terminal and type "env" there is no PKG_CONFIG_PATH entry and I swear that I've had to reset it when trying to compile.

Last edited by dantelives; 06-21-2005 at 06:33 PM.
 
Old 06-21-2005, 08:03 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
first when you retry stuff either start off with a fresh package untar or make sure you delete any files
configure.cache or like that
some rocket scientist thinks it's a good idea for configure to remember failure

first i think pkgconfig searches it's own prefix first by defautl and i'm not really sure you can change that but i might be wrong
i would put those variable exports in ~/.bash_profile
and they will get read when you log in
for imediate read in
source ~/.bash_profile
might want to log all the way back out and back in so you know the are set for all new terminals you open

beyond that it gets real tricky when you want to keep two different versions of gtk2 and freinds
but i can at least talk about the situation in general and possibly you can figure it out

tricky mainly because the package config files are all just called for instance
gtk+-2.0.pc no matter which version of gtk it points to
plus the .pc files are setup to find not the actual library names but equally generic links called things like just libpango-1.0.so.0 or libglib-2.0.so.0

but beyond that you have to think about the headers
do you have some headers in /usr/local/include now ??? if not your new headers in /usr/include killed (coppied over) the old ones ?? not sure just have to check it out

the *.pc files no doubt point to the correct headers and dependancies but only if the right .pc is being used (you might have to actually hide some old .pc files)

you can use the command "ldd" to see what libs are linked to what like
Code:
(gary) /usr/lib  $ ldd libpangoft2-1.0.so
        linux-gate.so.1 =>  (0xffffe000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40047000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x40086000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x400b5000)
        libz.so.1 => /lib/libz.so.1 (0x40156000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x40168000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x401ac000)
        libdl.so.2 => /lib/libdl.so.2 (0x401b1000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x401b5000)
        libc.so.6 => /lib/libc.so.6 (0x40241000)
        libm.so.6 => /lib/libm.so.6 (0x40357000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4037a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
and even look for object references with commands like
objdump -t /usr/lib/libglib-2.0.so.0 | grep g_assert_warning
but remenber the libs contain references to other libs so you sometimes have to follow dependancies to actually find stuff.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GTK error when starting gtk-chtheme Dswissmiss Linux - Software 1 10-01-2004 11:53 PM
GAIM: compiling gtk 2.4.0 error turtle1980 Linux - Newbie 5 08-11-2004 08:15 AM
compiling gaim/ gtk error (two versions of gtk) webazoid Linux - Software 0 07-06-2004 06:05 PM
help with error compiling gtk+-2.4.0 Metal Martian Linux - Newbie 3 05-11-2004 09:04 AM
error with gtk compiling mplayer with gui Anubis Linux - General 2 02-29-2004 01:20 PM


All times are GMT -5. The time now is 12:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration