You are not logged in.
Hi all,
I installed a custom glibc to get rid of linuxthreads stuff. I modified the testing glibc PKGBUILD (only removed linuxthreads stuff):
pkgname=glibc
pkgver=2.3.5
pkgrel=6
# glibc doesn't release very often, so we often use CVS snapshots to
# stay up-to-date with new features. Snapshots are available at
# ftp://sources.redhat.com/pub/glibc/snapshots/
_snap=20050504T1818
_hdrver=2.6.12.0
pkgdesc="GNU C Library with NPTL and linuxthreads"
url="http://www.gnu.org/software/libc"
depends=()
source=(ftp://ftp.archlinux.org/other/glibc/glibc-$_snap.tar.bz2
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-${_hdr
glibc-2.3.4.patch nscd glibc-fedora.patch)
md5sums=('c1022359f010726f5a0689e9808b51ac' 'eae2f562afe224ad50f65a6acfb4252c'
'43ff78a3d6e21bd374367b924b1335de' 'cb05c700433da449b137e277165fa585'
'2249979e4a1e4cc1a09d0842a7f4676f')
build() {
# Kernel Headers
mkdir -p $startdir/pkg/usr/include
cp -r linux-libc-headers-${_hdrver}/include/linux $startdir/pkg/usr/include/li
cp -r linux-libc-headers-${_hdrver}/include/asm-i386 $startdir/pkg/usr/include
find $startdir/pkg -type d -exec chmod 755 {} ;
find $startdir/pkg -type f -exec chmod 644 {} ;
echo "" > $startdir/pkg/usr/include/linux/config.h
chown -R root.root $startdir/pkg/usr/include
cd $startdir/src/glibc-$_snap
patch -Np1 -i ../glibc-2.3.4.patch || return 1
patch -Np1 -i ../glibc-fedora.patch || return 1
mkdir ../glibc-build
cd ../glibc-build
../glibc-$_snap/configure --prefix=/usr
--enable-add-ons=nptl --without-cvs
--enable-kernel=2.6.0
--with-headers=$startdir/pkg/usr/include
--enable-bind-now --with-tls --with-__thread
--disable-profile
make || return 1
make install_root=$startdir/pkg install
make install_root=$startdir/pkg localedata/install-locales
rm -rf $startdir/pkg/etc/ld.so.cache $startdir/pkg/etc/localtime
install -D -m644 $startdir/src/glibc-$_snap/nscd/nscd.conf $startdir/pkg/etc/n
install -D -m755 $startdir/src/nscd $startdir/pkg/etc/rc.d/nscd
sed -i -e 's/^tserver-user/#tserver-user/' $startdir/pkg/etc/nscd.conf || re
}
My gcc version is gcc 4.0.1-2 from testing.
No look at this code snippet:
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
printf("%dn", getpid());
return 0;
}
If I compile it without -static, it returns the pid. If I compile it with -static it returns 5 (which is not the right pid).
If I use arch glibc from testing, it works with and without -static
testing glibc says
Compiled by GNU CC version 4.0.1.
Compiled on a Linux 2.6.12 system on 2005-07-09.
my custom glibc (compiled with gcc 4.0.1-2) says
Compiled by GNU CC version 4.0.2 20050818 (prerelease).
Compiled on a Linux 2.6.12 system on 2005-09-02.
(I recompiled it today, but my first build was some weeks old but used the same compiler)
So can anyone tell me what exactly breaks the static binary? Is it the modified glibc PKGBUILD or the different compiler used for glibc compilation? If the latter is true, gcc 4.0.1-2 must be really broken.
Or can anyone tell me how this can happen and what the f*** is going on?
Offline