Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 432938

Summary: games-board/aisleriot-3.2.3.2-r1: ./.libs/libaisleriot.a(libaisleriot_la-ar-runtime.o): In function `ar_runtime_init': ar-runtime.c:(.text+0x178): undefined reference to `g_thread_init'
Product: Gentoo Linux Reporter: Oschtan <dawnstyle>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 406437    
Attachments: build.log

Description Oschtan 2012-08-27 08:03:54 UTC
In subject

Reproducible: Always




emerge --info
Portage 2.2.0_alpha123 (default/linux/amd64/10.0, gcc-4.7.1, glibc-2.15-r2, 3.3.3-gentoo x86_64)
=================================================================
System uname: Linux-3.3.3-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-2.2
Timestamp of tree: Mon, 27 Aug 2012 06:45:01 +0000
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.3
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo overlays-oschtan
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL googleearth Oracle-BCLA-JavaSE google-chrome skype-4.0.0.7-copyright google-talkplugin"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles metadata-transfer news nodoc noinfo noman parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ash.catalysis.ru/gentoo http://trumpetti.atm.tut.fi/gentoo http://oschtan.academ.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage"
USE="7zip X a52 aac aalib acpi additions alsa amd64 amr ao apm applet artworkextra audiofile bdf berkdb bzip2 cairo cdr cjk cli colord consolekit cracklib crypt cups cxx dbus demos divx djvu dri drm dts dvd dvdr dvdread enca exif faac fat fbcondecor ffmpeg flac foomaticdb fortran ftp fuse g3dvl gallium gd gdu gecko gif gles glitz gnome-keyring gpm gstreamer gtk gtk3 gudev hpijs hwdb icons iconv icq imlib introspection java javascript jbig jpeg jpeg2k lame lcms libkms libnotify lzma mad mime mjpeg mmx modules motif mp2 mp3 mp4 mpeg mplayer mudflap multilib multitarget natspec nautilus ncurses nls npp nptl nptlonly nsplugin oav objc objc++ objc-gc ogg openexr opengl openmp oscar pam pcre pdf png policykit postscript ppds pppd pulseaudio rar readline reiserfs resolvconf rtc samba sdl session sndfile socialweb sound source spell spl sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification suid svg symlink syslog tcpd theora tiff truetype udev udisks unicode usb userlocales vaapi vcd vdpau vorbis vpx wma wmf wmp x264 x264-svn-encoder xattr xcb xml xmp xorg xpm xscreensaver xv xvid xvmc zip zlib" ALSA_CARDS="intel-hda" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Oschtan 2012-08-27 08:04:35 UTC
Created attachment 322346 [details]
build.log
Comment 2 Rafał Mużyło 2012-08-27 13:29:40 UTC
Most likely that call should be surrounded by
'#if !GLIB_CHECK_VERSION(2, 32, 0)...#endif'.

gthread was removed from gobject-2.0.pc in 2.32, but at the same time glib started to init threads unconditionally on its own.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-08-28 18:57:21 UTC
(In reply to comment #2)
> gthread was removed from gobject-2.0.pc in 2.32, but at the same time glib
> started to init threads unconditionally on its own.

Actually, g_type_init has called g_thread_init unconditionally since glib-2.24 iirc.

I can't reproduce this particular build failure in aisleriot-3.2.3.2-r1 - I am guessing that one of aisleriot's dependencies on my machine is surreptitiously providing gthread - but in cvs I've now added a patch from aisleriot-3.4 that should fix it.

>  28 Aug 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  aisleriot-3.2.3.2-r1.ebuild, +files/aisleriot-3.2.3.2-g_thread_init.patch:
>  Fix g_thread_init/glib-2.32 build failure (bug #432938, thanks to Oschtan).
Comment 4 Rafał Mużyło 2012-08-28 20:06:38 UTC
(In reply to comment #3)
> 
> Actually, g_type_init has called g_thread_init unconditionally since
> glib-2.24 iirc.
> 
> I can't reproduce this particular build failure in aisleriot-3.2.3.2-r1 - I
> am guessing that one of aisleriot's dependencies on my machine is
> surreptitiously providing gthread - but in cvs I've now added a patch from
> aisleriot-3.4 that should fix it.
> 

I was referring to the changes listed on top of "Overview of changes from GLib 2.29/2.30 to 2.31.0" section of glib NEWS, in particular: "threading is now always enabled in GLib".
That's why such #ifdef block should be a valid change.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-08-28 20:32:09 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > 
> > Actually, g_type_init has called g_thread_init unconditionally since
> > glib-2.24 iirc.
> > 
> > I can't reproduce this particular build failure in aisleriot-3.2.3.2-r1 - I
> > am guessing that one of aisleriot's dependencies on my machine is
> > surreptitiously providing gthread - but in cvs I've now added a patch from
> > aisleriot-3.4 that should fix it.
> > 
> 
> I was referring to the changes listed on top of "Overview of changes from
> GLib 2.29/2.30 to 2.31.0" section of glib NEWS, in particular: "threading is
> now always enabled in GLib".
> That's why such #ifdef block should be a valid change.

Threading has been de facto always enabled in glib since at least 2.22 days because glib simply failed to build when configured with --disable-threads :)

g_type_init has automatically called g_thread_init since 2.23.2, see http://git.gnome.org/browse/glib/commit/?id=fa2bced1f30f93443ef43ce8b5b1e437cd07168c

The changes in 2.31.0 were that the --disable-threads configure switch was finally removed; and that g_thread_init, which had been useless for years (since g_type_init called it), was now explicitly deprecated, and attempts to call it started causing build failures.
Comment 6 Rafał Mużyło 2012-08-28 21:14:08 UTC
(In reply to comment #5)
> Threading has been de facto always enabled in glib since at least 2.22 days
> because glib simply failed to build when configured with --disable-threads :)
> 
> g_type_init has automatically called g_thread_init since 2.23.2, see
> http://git.gnome.org/browse/glib/commit/
> ?id=fa2bced1f30f93443ef43ce8b5b1e437cd07168c
> 
> The changes in 2.31.0 were that the --disable-threads configure switch was
> finally removed; and that g_thread_init, which had been useless for years
> (since g_type_init called it), was now explicitly deprecated, and attempts
> to call it started causing build failures.


Not quite correct.
There's no build failure related to using g_thread_init, but it's pointless and if called with non-NULL, it prints a warning about incorrect use (that has i.e. bit wine in regard of gstreamer).
IIUC, this commit: http://git.gnome.org/browse/glib/commit/?id=47444dacc069be5984df4064ae382d45a9ae8c9e made threads initialized upon library load.