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"
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
Sorry for the late reply, but is this still a problem in 0.1.0 ?
yes.
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)
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
do it the nice way in fixing the configure.in script.
could you please patch the configur.in script & post it here ?
gtkscintilla2 doesn't use autoconf. added an unintrusive solution to 0.1.0