Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138241 - pkgconfig-0.20 emerge fails on EMT64 (hardened)
Summary: pkgconfig-0.20 emerge fails on EMT64 (hardened)
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 11:09 UTC by Lorand Kelemen
Modified: 2006-08-05 04:00 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorand Kelemen 2006-06-27 11:09:10 UTC
After upgrading to latest stable gcc emerge system failed.

After some hacking we decided to turn off thread support with a dirty hack. We modified the ebuild in the following way:

src_compile() {
        econf \
                --with-threads=none \
                || die
}

Then installed by hand. All other packages compiled well.

(Well ncurses-5.5-r2 needed an ln -s /usr/lib/libc_nonshared.a /usr/lib64 prior to that, maybe I file a bug later...)

Please adjust severity as needed, we see this as a major blocker.

Error:

x86_64-pc-linux-gnu-gcc -march=nocona -O2 -fomit-frame-pointer -pipe -Wall -D_REENTRANT -o testgthread testgthread.o  ../.libs/libglib.a ./.libs/libgthread.a
testgthread.o: In function `new_thread':
testgthread.c:(.text+0x3752): undefined reference to `pthread_create'
testgthread.o: In function `test_private':
testgthread.c:(.text+0x3b2e): undefined reference to `pthread_join'
./.libs/libgthread.a(gthread.o): In function `g_mutex_trylock_posix_impl':
gthread.c:(.text+0x156): undefined reference to `pthread_mutex_trylock'
./.libs/libgthread.a(gthread.o): In function `g_private_new_posix_impl':
gthread.c:(.text+0x52a): undefined reference to `pthread_key_create'
./.libs/libgthread.a(gthread.o): In function `g_private_set_posix_impl':
gthread.c:(.text+0x5c7): undefined reference to `pthread_setspecific'
./.libs/libgthread.a(gthread.o): In function `g_private_get_posix_impl':
gthread.c:(.text+0x607): undefined reference to `pthread_getspecific'
collect2: ld returned 1 exit status
make[4]: *** [testgthread] Error 1
make[4]: Leaving directory `/usr/egatrop/tmp/portage/pkgconfig-0.20/work/pkg-config-0.20/glib-1.2.8/gthread'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/egatrop/tmp/portage/pkgconfig-0.20/work/pkg-config-0.20/glib-1.2.8'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/egatrop/tmp/portage/pkgconfig-0.20/work/pkg-config-0.20/glib-1.2.8'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/egatrop/tmp/portage/pkgconfig-0.20/work/pkg-config-0.20'
make: *** [all] Error 2

!!! ERROR: dev-util/pkgconfig-0.20 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 609:   Called die

Info:

Portage 2.1-r1 (hardened/amd64, gcc-3.4.6, glibc-2.3.6-r4, 2.6.14-hardened-r8 x86_64)
=================================================================
System uname: 2.6.14-hardened-r8 x86_64 Intel(R) Xeon(TM) CPU 3.20GHz
Gentoo Base System version 1.6.15
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict userfetch"
GENTOO_MIRRORS="http://gentoo.math.bme.hu http://gentoo.inode.at  http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inf.elte.hu http://mirror.uni-c.dk/pub/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/usr/egatrop/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 chroot crypt dlloader dnsdb expat extensions freetype gd geoip hardened hardenedphp hpn iconv justify lzw-tiff maildir memlimit mime mmx ncurses nls openssh pam pcre pic posix readline slang sse sse2 ssl udev unicode userlocales utf8 vhosts wildlsearch xml xorg zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Lorand Kelemen 2006-06-28 09:35:52 UTC
Had the same problem with glib and xfsprogs.

Hacked glib-2.8.6 ebuild too as a temporary solution.

excerpt from ebuild:

# local myconf="--with-threads=posix $(use_enable doc gtk-doc)"
local myconf="--disable-threads $(use_enable doc gtk-doc)"

xfsprogs-2.7.11

checking for pthread_mutex_init in -lpthread... no

FATAL ERROR: could not find a valid pthread library.

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /usr/egatrop/tmp/portage/xfsprogs-2.7.11/work/xfsprogs-2.7.11/config.log

!!! ERROR: sys-fs/xfsprogs-2.7.11 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  xfsprogs-2.7.11.ebuild, line 44:   Called econf '--bindir=/usr/bin' '--sbindir =/sbin' '--libexecdir=/usr/lib64' '--enable-gettext'
  ebuild.sh, line 541:   Called die

I don't know why I'm lacking certain thread support.
Comment 2 Lorand Kelemen 2006-08-01 02:30:13 UTC
I managed to compile them...

[ebuild   R   ] dev-libs/glib-2.10.3  USE="hardened -debug -doc" 0 kB
[ebuild   R   ] sys-fs/xfsprogs-2.7.11  USE="nls" 0 kB
[ebuild   R   ] dev-util/pkgconfig-0.20  USE="hardened" 0 kB

Messed around the system way too much, main changes:
nptl support, varied use flags a bit...

Only glib ebuild was newer as I see it. So I'm happy now, if someone has the time to point out the difference, please do so. :) I do not have that luxury :(

Portage 2.1-r1 (hardened/amd64, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-hardened-r10 x86_64)
=================================================================
System uname: 2.6.16-hardened-r10 x86_64 Intel(R) Xeon(TM) CPU 3.20GHz
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict userfetch"
GENTOO_MIRRORS="http://gentoo.math.bme.hu http://gentoo.inode.at  http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inf.elte.hu http://mirror.uni-c.dk/pub/gentoo/"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/usr/egatrop/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 calendar caps chroot clamav cli crypt cscope curl dlloader expat extensions freetype gd geoip hardened hardenedphp hpn iconv idn iodbc justify maildir memlimit mhash mime ncurses nls nptl odbc openssh pam pam_chroot pam_console pam_timestamp pcre perl pic posix postgres python readline session sharedext sharedmem slang sockets sse sse2 ssl truetype udev unicode userlocales utf8 vhosts xml xorg xsl zip zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 3 foser (RETIRED) gentoo-dev 2006-08-03 10:02:30 UTC
Sorry for the wait.

Not our cup of tea, reassigning.
Comment 4 solar (RETIRED) gentoo-dev 2006-08-03 12:00:20 UTC
Sorry I'm not seeing the root problem here. I don't have an EMT64 at hand but 
on amd64 this pkg does not seem to be a problem.
Comment 5 Lorand Kelemen 2006-08-05 02:40:26 UTC
Hi all,

Thanks for the participation. I cannot say more, because at the current state I cannot reproduce the errors, all related info is included. (And I won't have time or resources to reproduce them, but when I encounter them again, I'll report it here...if I can reopen the bug.) 

After messing around (see last emerge --info), the packages compiled without any dirty hacks.

Suggest to change status to LATER, or whatever, you know better :)
Comment 6 solar (RETIRED) gentoo-dev 2006-08-05 03:38:35 UTC
Perhaps the way you did your install was via taking a normal amd64 stage and 
converting it over to a hardened one over time? And perhaps not all of 
your userland was not fully hardened ready when you hit this bug before.

If you hit the bug again while starting from hardened release media by 
all means please reopen.
Comment 7 Lorand Kelemen 2006-08-05 04:00:32 UTC
I will. Btw. I used hardened-stage3 for amd64 during install, then started recompiling eg. in the right order.