<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>198949</bug_id>
          
          <creation_ts>2007-11-12 17:09 0000</creation_ts>
          <short_desc>sys-libs/glibc-2.7: static compilation while using pthread_cond_timedwait() fails</short_desc>
          <delta_ts>2007-12-10 01:32:53 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://sources.redhat.com/bugzilla/show_bug.cgi?id=5465</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>bilbotux@gmail.com</reporter>
          <assigned_to>toolchain@gentoo.org</assigned_to>
          <cc>aaron@cs.tu-berlin.de</cc>
    
    <cc>charlie@gehlin.com</cc>
    
    <cc>claus.boehmer@gmx.de</cc>
    
    <cc>czarkoff@gmail.com</cc>
    
    <cc>daemon@kleczew.com</cc>
    
    <cc>dagger@gentoo.org</cc>
    
    <cc>davidepesa@gmail.com</cc>
    
    <cc>devurandom@gmx.net</cc>
    
    <cc>hongqn@gmail.com</cc>
    
    <cc>rufus-azrael@numericable.fr</cc>
    
    <cc>satana.hell@gmail.com</cc>
    
    <cc>spock@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>bilbotux@gmail.com</who>
            <bug_when>2007-11-12 17:09:41 0000</bug_when>
            <thetext>When I try to compile splashutils, it fails with the following message:
  LD      objs/fbsplashd.static
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../lib64/libpthread.a(pthread_cond_timedwait.o): In function `pthread_cond_timedwait&apos;:
(.text+0xa7): undefined reference to `__vdso_clock_gettime&apos;
collect2: ld returned 1 exit status
make: *** [objs/fbsplashd.static] Error 1

Reproducible: Always




When I was using baselayout &lt; 2 and glibc2.6, splashutils compiled fine; but then I upgraded baselayout2 and glibc2.7 and it no longer compiles. After some searches, it appears to be a glibc2.7 AMD64 problem.

My emerge --info:
Portage 2.1.3.19 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.7-r0, 2.6.23-tuxonice x86_64)
=================================================================
System uname: 2.6.23-tuxonice x86_64 Intel(R) Core(TM)2 Duo CPU T7250 @ 2.00GHz
Timestamp of tree: Mon, 12 Nov 2007 14:30:09 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6, 2.5.1-r3
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc6
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r1
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=nocona -O2 -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-march=nocona -O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;acl amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd truetype-fonts type1-fonts unicode xorg zlib&quot; ALSA_CARDS=&quot;ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vlevykin@mail.ru</who>
            <bug_when>2007-11-13 08:21:47 0000</bug_when>
            <thetext>I also have this problem. I have ~amd64 too and other parameters are very similar.
Problem appears only when I try to emerge splashutils with &quot;mng&quot; USE flag.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>spock@gentoo.org</who>
            <bug_when>2007-11-13 16:15:42 0000</bug_when>
            <thetext>Confirmed. This seems to be a glibc-2.7 problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidepesa@gmail.com</who>
            <bug_when>2007-11-13 21:47:12 0000</bug_when>
            <thetext>Same here. I also get the following message after unpack:

 * The kernel tree against which dev-libs/klibc was built was not patched
 * with a compatible version of fbcondecor. Splashutils will be compiled
 * without fbcondecor support (i.e. verbose mode will not work).

I don&apos;t know if this warning is related to the build failure, I&apos;m using gentoo-sources-2.6.23 and glibc-2.7 of course.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-11-14 04:24:53 0000</bug_when>
            <thetext>you may be SOL.  upstream glibc has stated that static linking is not supported at all (and in fact, has other known issues where things break subtly at runtime).

that said, before i look into the source code, why does splashutils need to be statically linked in the first place ?

this is a simple reduced test case:
int main(){pthread_cond_timedwait(0,0,0);}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>spock@gentoo.org</who>
            <bug_when>2007-11-14 18:07:46 0000</bug_when>
            <thetext>fbsplashd is linked with a number of graphics libraries (libpng, libmng, ...) which are located in /usr/lib.  If the user has a separate /usr partition, these libraries are unavailable at the time the fbsplash daemon is started and thus a statically linked version has to be used.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-11-14 20:16:26 0000</bug_when>
            <thetext>ive asked upstream, but i cant promise things look good</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-11-21 09:39:46 0000</bug_when>
            <thetext>*** Bug 199866 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>spock@gentoo.org</who>
            <bug_when>2007-11-24 19:31:59 0000</bug_when>
            <thetext>Created an attachment (id=136911)
A patch for glibc to fix the problem.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>senuma.takahiko@gmail.com</who>
            <bug_when>2007-11-25 09:12:46 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; Created an attachment (id=136911) [edit]
&gt; A patch for glibc to fix the problem.
&gt; 

Confirmed the patch worked. The problem was resolved on ~amd64 (with gcc-4.3-svn).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-11-25 13:33:40 0000</bug_when>
            <thetext>*** Bug 200280 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-11-27 09:38:29 0000</bug_when>
            <thetext>*** Bug 200497 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>charlie@gehlin.com</who>
            <bug_when>2007-11-27 12:39:14 0000</bug_when>
            <thetext>Ok, so putting the proposed patch into &quot;${PORTDIR_OVERLAY}&quot;/dev-libs/glibc/files/2.7/glibc-2.7-pthread_cond_timewait.patch

and applying the following diff:
# diff /usr/portage/sys-libs/glibc/glibc-2.7.ebuild /usr/local/portage/sys-libs/glibc/glibc-2.7.ebuild 
29c29
&lt; IUSE=&quot;debug gd glibc-omitfp glibc-compat20 hardened multilib nls selinux profile vanilla ${LT_VER:+glibc-compat20 nptl nptlonly}&quot;
---
&gt; IUSE=&quot;debug gd glibc-omitfp glibc-compat20 hardened mng-splash multilib nls selinux profile vanilla ${LT_VER:+glibc-compat20 nptl nptlonly}&quot;
160a161,165
&gt;       if use mng-splash ; then
&gt;               cd &quot;${S}&quot;
&gt;               einfo &quot;Patching to get working mng-support in splashutils&quot;
&gt;               epatch &quot;${FILESDIR}&quot;/2.7/glibc-2.7-pthread_cond_timewait.patch
&gt;       fi

makes the patch apply ok and glibc to emerge OK. But then all hell breaks loose; whatever I try to emerge, it all ends up with random errors, mostly at configure. They all seemed to have to do with a broken libsandbox...
Anyway, I suppose one should rebuild toolchain instead of just rebuilding glibc, right?

I would be more than happy to help out getting mng-support in splashutils, but I&apos;m affraid I&apos;m stuck here...
I&apos;m on ~amd64, gcc-4.2.2 and glibc-1.7 (now unpatched)

Cheers! /Charlie</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-11-28 14:25:59 0000</bug_when>
            <thetext>*** Bug 200635 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-11-30 16:24:09 0000</bug_when>
            <thetext>*** Bug 200828 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>spock@gentoo.org</who>
            <bug_when>2007-12-01 09:09:39 0000</bug_when>
            <thetext>(In reply to comment #12)
&gt; makes the patch apply ok and glibc to emerge OK. But then all hell breaks
&gt; loose; whatever I try to emerge, it all ends up with random errors, mostly at
&gt; configure. They all seemed to have to do with a broken libsandbox...
&gt; Anyway, I suppose one should rebuild toolchain instead of just rebuilding
&gt; glibc, right?

Charlie, could you please include some of these errors that you&apos;re seeing when glibc is compiled with this patch?  Also, could you please provide your `emerge --info`?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-12-01 11:07:39 0000</bug_when>
            <thetext>*** Bug 200910 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-12-08 08:44:34 0000</bug_when>
            <thetext>*** Bug 201645 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-12-09 21:41:23 0000</bug_when>
            <thetext>*** Bug 201806 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-12-10 01:14:36 0000</bug_when>
            <thetext>fixed in glibc-2.7-r1

http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.7/1065_all_glibc-x86_64-libpthread-no-vdso.patch?rev=1.1</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>136911</attachid>
            <date>2007-11-24 19:31 0000</date>
            <desc>A patch for glibc to fix the problem.</desc>
            <filename>glibc.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtTmF1cnAgZ2xpYmMtMi43LW9yaWcvbnB0bC9zeXNkZXBzL3VuaXgvc3lzdi9saW51eC94
ODZfNjQvcHRocmVhZF9jb25kX3RpbWVkd2FpdC5TIGdsaWJjLTIuNy9ucHRsL3N5c2RlcHMvdW5p
eC9zeXN2L2xpbnV4L3g4Nl82NC9wdGhyZWFkX2NvbmRfdGltZWR3YWl0LlMKLS0tIGdsaWJjLTIu
Ny1vcmlnL25wdGwvc3lzZGVwcy91bml4L3N5c3YvbGludXgveDg2XzY0L3B0aHJlYWRfY29uZF90
aW1lZHdhaXQuUwkyMDA3LTExLTI0IDE3OjMyOjUzLjAwMDAwMDAwMCArMDEwMAorKysgZ2xpYmMt
Mi43L25wdGwvc3lzZGVwcy91bml4L3N5c3YvbGludXgveDg2XzY0L3B0aHJlYWRfY29uZF90aW1l
ZHdhaXQuUwkyMDA3LTExLTI0IDE3OjA3OjA3LjAwMDAwMDAwMCArMDEwMApAQCAtMTM0LDEyICsx
MzQsMTQgQEAgX19wdGhyZWFkX2NvbmRfdGltZWR3YWl0OgogCS8qIE9ubHkgY2xvY2tzIDAgYW5k
IDEgYXJlIGFsbG93ZWQgc28gZmFyLiAgQm90aCBhcmUgaGFuZGxlZCBpbiB0aGUKIAkgICBrZXJu
ZWwuICAqLwogCWxlYXEJMjQoJXJzcCksICVyc2kKKyMgaWZkZWYgU0hBUkVECiAJbW92cQlfX3Zk
c29fY2xvY2tfZ2V0dGltZUBHT1RQQ1JFTCglcmlwKSwgJXJheAogCW1vdnEJKCVyYXgpLCAlcmF4
CiAJUFRSX0RFTUFOR0xFICglcmF4KQogCWp6CTI2ZgogCWNhbGwJKiVyYXgKIAlqbXAJMjdmCisj
IGVuZGlmCiAyNjoJbW92bAkkX19OUl9jbG9ja19nZXR0aW1lLCAlZWF4CiAJc3lzY2FsbAogMjc6
Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>