LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-30-2010, 02:22 PM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 34
gtk+ make error in libgio - undefined reference


Hi all,

I am trying to install gtk+-2.19.0 - latest stable lib version (needed for installation of wxWidgets and then for codeblocks).

./configure runs with no errors, but make give these errors:

Code:
/usr/local/lib/libgio-2.0.so: undefined reference to `g_ptr_array_new_with_free_func'                  
/usr/local/lib/libgio-2.0.so: undefined reference to `g_error_new_valist'                              
/usr/local/lib/libgio-2.0.so: undefined reference to `g_poll'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_unref'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_hostname_is_non_ascii'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_hostname_to_ascii'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_mkstemp_full'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_array_get_type'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_byte_array_unref'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_unref'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_byte_array_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_get_element_size'
/usr/local/lib/libgio-2.0.so: undefined reference to `g_main_context_get_thread_default'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1
make[4]: Leaving directory `/home/kode/3downloads/1junk/gtk+-2.19.0/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/kode/3downloads/1junk/gtk+-2.19.0/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kode/3downloads/1junk/gtk+-2.19.0/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kode/3downloads/1junk/gtk+-2.19.0'
make: *** [all] Error 2

Any suggestion?
 
Old 01-30-2010, 02:49 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
do you use system glib?
i think it does not like the glib you got.
 
Old 01-30-2010, 02:52 PM   #3
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
I installed glib 2.23. The system glib was 18.4
 
Old 01-30-2010, 02:53 PM   #4
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
did you remove the system's glib?
 
Old 01-30-2010, 02:55 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I've recently been building some GTK and related stuff, and have found that it helps to specifically tell the build where to find stuff, because for some reason, even when the required libs and headers are in the right location, the build can't seem to find it.

Make sure your $LDFLAGS contains the correct location(s) of your lib dir (-L/usr/lib or -L/usr/local/lib or whatever) and it may help too, to export your CPPFLAGS before running the build, like:
Code:
export CPPFLAGS="${CPPFLAGS} -I/usr/include/gtk+-2.0 -I/usr/include/glib-2.0 -I/usr/include/pango-1.0"
and put the correct /include dirs for where glib and other "hard-to-find" items are.
 
Old 01-30-2010, 03:10 PM   #6
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
ozanbaba,

I didn't know how to remove system glib so i download 18.4 source, configure and then run
make uninstall
make clan
make distclean
and then install 2.23 version.

GrapefruiTgirl,
I missed the env. variables from the site of gtk++
http://library.gnome.org/devel/gtk/u...-building.html
now I export them and trying to configure, make and make install again...
 
Old 01-30-2010, 03:11 PM   #7
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
as root slackpkg remove glib2 will remove glib package
 
Old 01-30-2010, 03:26 PM   #8
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
Thank you that works correct. 18.4 version was still on the system.
Start from beginning...
 
Old 01-30-2010, 03:30 PM   #9
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
linker got confused. however what GrapefruiTgirl said makes sense, too as with it you can keep two versions of glib on the system: stock Slackware package and new beta package.
 
Old 01-30-2010, 03:50 PM   #10
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
Why after installing glib 2.23 from source it cant be slackpkg remove, install update or anything?
 
Old 01-30-2010, 04:00 PM   #11
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by konzo View Post
Why after installing glib 2.23 from source it cant be slackpkg remove, install update or anything?
no you can't

however creating a Slackware package is pretty simple compared to other systems.

Code:
su
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

CFLAGS="-O2 -march=i486 -mtune=i686= CXXFLAGS="-O2 -march=i486 -mtune=i686" ./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --docdir=/usr/doc/glib2-2.23 --build=i486-slackware-linux
make 
mkdir -p /tmp/pkg-glib2
make install DESTDIR=/tmp/pkg-glib2
cd /tmp/pkg-glib2
/sbin/makepkg -l y -c n /tmp/glib2-2.23-i486-1_none.tgz

however best way to go is using Patrick's build script in source folder of the dvd (or source cd).

and of course you car do make uninstall

Last edited by ozanbaba; 01-30-2010 at 04:03 PM.
 
1 members found this post helpful.
Old 01-31-2010, 02:08 AM   #12
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
Things goes messed up and I restore from previous day's backup. Now I am trying to build C::B within C::B using CodeBlocks-unix.cbp but have some errors. I am closing this thread as solved since I was opened similar:

http://www.linuxquestions.org/questi...3/#post3845907

Many thanks to ozanbaba and GrapefriuTgirl - I get valuable lesson from both of you.
 
  


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
make error:libpangocairo-1.0.so.0: undefined reference to `g_once....... edwinzhou Linux - Server 1 02-11-2010 02:07 PM
glibc make error: undefined reference to `__sync_fetch_and_add_4' rendezvous123 Linux - Software 4 11-09-2008 07:18 PM
Building gtk+-2.10.8 but get a undefined reference to g_thread_gettime Haraldsh Linux - Software 5 03-13-2007 02:29 AM
GTK+ build, undefined reference error? headrift Linux - Software 2 09-15-2005 04:00 PM
make error/ undefined reference apljdi Linux - Newbie 1 10-29-2002 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:24 AM.

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