Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38279 - gtkscintilla-0.0.8: /usr/lib/libgtkscintilla2.so: undefined symbol: g_thread_init
Summary: gtkscintilla-0.0.8: /usr/lib/libgtkscintilla2.so: undefined symbol: g_thread_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Low normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-15 05:34 UTC by Jens Hoffrichter
Modified: 2004-10-17 11:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gtkscintilla2-0.0.8-r1.ebuild.patch (gtkscintilla2-0.0.8-r1.ebuild.patch,502 bytes, patch)
2004-01-15 05:39 UTC, Jens Hoffrichter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Hoffrichter 2004-01-15 05:34:55 UTC
When using gtkscintilla using pyscintilla-1.99.2 (not in portage), the error:

ImportError: /usr/lib/libgtkscintilla2.so: undefined symbol: g_thread_init

occurs.

This is due to a missing library link to libgthread while compiling gtkscintilla.

At the only application in portage that uses gtkscintilla (gphpedit), the error does not occur because gphpedit is linked explicitly against libgthread, so the library is always loaded when loading libgtkscintilla.

Reproducible: Always
Steps to Reproduce:
1. Install pyscintilla, found at http://sra.itc.it/people/cavada/dload/pyscintilla-1.99.2.tar.gz
2. start a python shell
3. type "import scintilla"

Actual Results:  
ImportError: /usr/lib/libgtkscintilla2.so: undefined symbol: g_thread_init

Expected Results:  
Load the scintilla module into python.

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0,
2.4.20-gentoo-r7)
=================================================================
System uname: 2.4.20-gentoo-r7 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.3.12
distcc 2.9 i486-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=athlon-xp -funroll-loops -pipe"
CHOST="i486-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=athlon-xp -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs distcc sandbox"
GENTOO_MIRRORS="http://gentoo.inode.at http://gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/jh/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd apache2 apm arts autofs avi berkdb bonobo cdr crypt cups curl
doc dvd encode esd ethereal evo expat foomaticdb gb gd gdbm gif gnome gphoto2
gpm gtk gtk2 gtkhtml guile imap imlib java javascript jpeg kde ldap libg++
libwww mad maildir mbox mcal mikmod motif mozaccess mozcalendar mozctl mozilla
mozinterfaceinfo mozp3p mozsvg mozxmlterm mpeg mysql ncurses nls oggvorbis
opengl openssh oss pam pcap pdflib perl png postgres python qt quicktime
readline samba sdl slang spell ssl svga tcltk tcpd tetex transcode truetype usb
vim-with-x wxwindows x86 xml2 xmms xv zlib"
Comment 1 Jens Hoffrichter 2004-01-15 05:39:16 UTC
Created attachment 23851 [details, diff]
gtkscintilla2-0.0.8-r1.ebuild.patch

I've fixed the ebuild using `gtk-config --libs gthread`, an additional sed
command applied to the Makefile. I'm not sure in either using LDFLAGS_PRE or
LDFLAGS_POST, I have decided for LDFLAGS_PRE and it works :) But maybe it
belogs logically to the LDFLAGS_POST, but I can find no reasons for this.

CU,
Jens
Comment 2 foser (RETIRED) gentoo-dev 2004-02-29 09:44:50 UTC
Sorry for the late reply, but is this still a problem in 0.1.0 ?

Comment 3 Danny Milosavljevic 2004-03-04 05:18:33 UTC
yes.
Comment 4 Danny Milosavljevic 2004-03-04 05:24:29 UTC
when working around like this:
        # some quick touches to the Makefile, bump the version
        # and make use of our CFLAGS
        cp Makefile Makefile.orig
        sed -e "/CFLAGS/s/-g/${CFLAGS} -fPIC/" < Makefile.orig > Makefile

        cp Makefile Makefile.orig
        sed -e "/LDFLAGS_PRE/s/$/ -lgthread /" < Makefile.orig > Makefile

        # and again, in the scintilla part
        cd ${S}/scintilla/gtk
        cp makefile makefile.orig
        sed -e "/CXXFLAGS/s/-Os/${CFLAGS} -fPIC/" < makefile.orig > makefile

then 
ImportError: /usr/lib/libgthread-1.2.so.0: undefined symbol: g_mutex_init

happens. Doesn't seem g_mutex_init exists in gtk2 (according to docs)
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2004-03-04 20:06:24 UTC
i'm not sure that is actually correct. gtk2scintilla uses gtk2 (and by extension glib-2.x), and libgthread-1.2.so is from glib-1.2.

the patch should probably use pkg-config gthread-2.0 --libs instead of gnome-config
Comment 6 foser (RETIRED) gentoo-dev 2004-03-05 05:26:34 UTC
do it the nice way in fixing the configure.in script.
Comment 7 foser (RETIRED) gentoo-dev 2004-08-18 09:01:50 UTC
could you please patch the configur.in script & post it here ?
Comment 8 Alastair Tse (RETIRED) gentoo-dev 2004-10-17 11:05:07 UTC
gtkscintilla2 doesn't use autoconf. added an unintrusive solution to 0.1.0