Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30302 - glibc-2.3.2-r6 ebuild failed : undefined reference to `__GI___pwrite64' when linking iconvconfig
Summary: glibc-2.3.2-r6 ebuild failed : undefined reference to `__GI___pwrite64' when ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Alpha Linux
: High blocker (vote)
Assignee: Martin Schlemmer (RETIRED)
Keywords: EBUILD
Depends on:
Reported: 2003-10-04 01:35 UTC by Mathieu MILLET
Modified: 2004-01-05 11:27 UTC (History)
1 user (show)

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

failed Patch made on the examples of Sparc64 and IA64 (diff.2.3.2-r6.alpha,1.61 KB, patch)
2003-10-11 08:20 UTC, Mathieu MILLET
Details | Diff
Right patch (diff-2.3.2-r6.alpha,1.00 KB, patch)
2003-10-12 10:03 UTC, Mathieu MILLET
Details | Diff
Right complete patch (diff-2.3.2-r6.alpha,1.56 KB, patch)
2003-10-12 10:37 UTC, Mathieu MILLET
Details | Diff
new patch for glibc-2.3.2-r8 (glibc-2.3.2-r8-alpha.patch,1.64 KB, patch)
2003-10-29 07:48 UTC, Andrej Filipcic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu MILLET 2003-10-04 01:35:02 UTC
gcc -nostdlib -nostartfiles -o
-Wl,-dynamic-linker=/lib/   -Wl,-z,combreloc
/var/tmp/portage/glibc-2.3.2-r6/work/glibc-2.3.2/buildhere/csu/crti.o `gcc
-lgcc -lgcc_eh `gcc --print-file-name=crtend.o`
undefined reference to `__GI___pwrite64'
collect2: ld returned 1 exit status

Reproducible: Always
Steps to Reproduce:
1.ebuild /usr/portage/sys-libc/glibc-2.3.2-r6.ebuild merge

Actual Results:  
emerge failed

Expected Results:  
emerge successfully

I try glibc-2.3.2-r6 since glibc-2.3.2-r1 doesn't compile either and the
encountered error has been corrected with the branch update patches used in

emerge info :
Portage 2.0.49-r7 (default-alpha-1.4, gcc-3.2.3, glibc-unavailable, 2.4.20-raid2)
System uname: 2.4.20-raid2 alpha EV56
ACCEPT_KEYWORDS="alpha ~alpha"
CFLAGS="-mcpu=ev56 -O3 -pipe"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=ev56 -O3 -pipe"
USE="alpha crypt cups encode foomaticdb gif gnome gpm gtk imlib jpeg libg++
libwww mikmod motif ncurses nls oggvorbis opengl oss pdflib png quicktime sdl
slang spell ssl tcpd truetype X xml2 xmms xv zlib gdbm berkdb readline pam perl
python acl avi bonobo clamav doc dv dvd evo ffmpeg flash gamma gb gd gnomedb
gstreamer gtk2 gtkhtml hbci imagemagick imap innodb ipv6 kerberos lcms libgda
mad mcal mdb memlimit menu mldonkeypango mozaccess mozcalendar mozinterfaceinfo
mozirc mozp3p mozsvg mozxmlterm mpeg music oav odbc pic plotutils postgres samba
sasl snmp tiff transcode type1 usb v4l videos vim-with-x wmf X509 xfs xinerama
xml xosd xvid -kde -qt"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-08 16:58:55 UTC
What version binutils ?  And could you try it without ccache/hardened-gcc
you are using any of those (I do see FEATURES=ccache ... ), thanks.
Comment 2 Mathieu MILLET 2003-10-08 23:47:00 UTC
binutils version :

I will try without ccache and emerge proposes to me to upgrade to binutils

I also found this email on the libc-alpha mailing list:

That presents the same error as mine (but it doesn't seem at the same step
of compilation).
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2003-10-09 18:02:32 UTC
Azarah, I see this too when trying to build glibc-2.3.2-r6 on alpha...
Comment 4 Joshua Kinard gentoo-dev 2003-10-09 18:41:15 UTC
Looks like a bug in any 64-bit versions of glibc.  I've seen google returns
for alpha, sparc64, and ia64.  The URL below contains a patch that resolves
a bug on ia64, see if it will resolve alpha's issues as well.
Comment 5 Joshua Kinard gentoo-dev 2003-10-09 19:30:48 UTC
Here's one for sparc64 (64-bit) glibc:
Comment 6 Mathieu MILLET 2003-10-11 08:20:54 UTC
Created attachment 19103 [details, diff]
failed Patch made on the examples of Sparc64 and IA64

This patch does NOT correct the problem.
Comment 7 Mathieu MILLET 2003-10-12 10:03:07 UTC
Created attachment 19133 [details, diff]
Right patch

This patch works (ie : no more compilation at this step) BUT
The compilation still fails.

What should I do, close this bug and open another or keep this one open ?

Here is the new error :

-c  -I../include -I.
-I../libio  -I/var/tmp/portage/glibc-2.3.2-r6/work/glibc-2.3.2/buildhere
-I../linuxthreads/sysdeps/alpha/elf -I../sysdeps/alpha/elf
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/alpha
-I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv
-I../sysdeps/unix/alpha -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/alpha/fpu -I../sysdeps/alpha -I../sysdeps/wordsize-64
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem
/usr/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/include -isystem /usr/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h	   -DASSEMBLER	   -g0

Assembler messages:
Error: .prologue directive without a preceding .ent directive
make[2]: ***
Error 1
make[2]: Leaving directory
make[1]: *** [linuxthreads/others] Error 2
make[1]: Leaving directory
make: *** [all] Error 2

!!! ERROR: sys-libs/glibc-2.3.2-r6 failed.
!!! Function src_compile, Line 456, Exitcode 2
!!! (no error message)
Comment 8 Mathieu MILLET 2003-10-12 10:37:16 UTC
Created attachment 19136 [details, diff]
Right complete patch

This patch corrects both the __GI___pwrite64 error and the '.prologue
directive' error described in the previous message.

Still, this patch enables glibc to compile. I don't know if glibc is "actually"
Comment 9 Mathieu MILLET 2003-10-12 10:38:20 UTC
Please test the last patch for both compilation and then use of the glibc
Comment 10 Andrej Filipcic 2003-10-29 07:48:04 UTC
Created attachment 19937 [details, diff]
new patch for glibc-2.3.2-r8

I use it in ebuild with
if [ "${ARCH}" = "alpha" ]
		# Fix compatability with compaq compilers by ifdef'ing out some

		# 2.3.2 additions.
		# <> (14 Jun 2003).
		cd ${S}; epatch ${FILESDIR}/2.3.2/${P}-decc-compaq.patch
		cd ${S}; epatch ${FILESDIR}/glibc-2.3.2-r8-alpha.patch
Comment 11 Andrej Filipcic 2003-10-29 07:53:22 UTC
Comment on attachment 19937 [details, diff]
new patch for glibc-2.3.2-r8

there is also a problem with __pread64, so I used __pwrite64 analogy
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-03 15:07:46 UTC
Run a 'make check' in the build dir - it should pass most tests (all on x86,
but not sure on alpha).
Comment 13 Mathieu MILLET 2004-01-05 11:27:11 UTC
glibc now emerge successfully