Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72127 - strace 4.5.7 compile error
Summary: strace 4.5.7 compile error
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 81642 89304 91460 95461 96186 129017 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-22 13:10 UTC by Edgar Hucek
Modified: 2009-09-18 04:50 UTC (History)
5 users (show)

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


Attachments
Syscall.o created with -E option (syscall.o,193.97 KB, text/plain)
2005-02-14 08:43 UTC, Pasi Sakala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edgar Hucek 2004-11-22 13:10:02 UTC
When emergeing strace i get the following compile error :

syscall.c: In function `dumpio':
syscall.c:442: error: `__NR_pread64' undeclared (first use in this function)
syscall.c:442: error: (Each undeclared identifier is reported only once
syscall.c:442: error: for each function it appears in.)
syscall.c:458: error: `__NR_pwrite64' undeclared (first use in this function)
make[1]: *** [syscall.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/strace-4.5.7/work/strace-4.5.7'



Reproducible: Always
Steps to Reproduce:
1. i just do the emerge
2.
3.
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-11-24 06:21:06 UTC
please attach emerge info
Comment 2 brian 2004-11-25 17:02:36 UTC
I've got the same error in strace 4.5.8:

syscall.c: In function `dumpio':
syscall.c:445: error: `__NR_pread64' undeclared (first use in this function)
syscall.c:445: error: (Each undeclared identifier is reported only once
syscall.c:445: error: for each function it appears in.)
syscall.c:461: error: `__NR_pwrite64' undeclared (first use in this function)
make[1]: *** [syscall.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/strace-4.5.8/work/strace-4.5.8'
make: *** [all] Error 2

!!! ERROR: dev-util/strace-4.5.8 failed.
!!! Function src_compile, Line 510, Exitcode 2
!!! emake failed

This is my emerge info:
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.2, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r4 i686)
=================================================================
System uname: 2.6.9-gentoo-r4 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apm arts avi berkdb bitmap-fonts bluetooth bonobo cdr crypt cups dvd dvdr encode esd f77 fam flac foomaticdb fortran gdbm ggi gif gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib jack java jpeg junit kde libg++ libwww mad mikmod mmx motif mozilla mpeg nas ncurses nls oggvorbis opengl oss pam pda pdflib perl png python qt quicktime readline samba scanner sdl slang spell sse ssl svga tcltk tcpd tiff truetype usb x86 xml xml2 xmms xv zlib"
Comment 3 Matt O'Connor 2004-11-26 17:02:27 UTC
I am also getting this compile error.
Here's my emerge info.

Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r3 i686)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1400MHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=pentium4 -march=pentium4 -O2 -pipe -mfpmath=sse -mmmx -msse -msse2"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=pentium4 -march=pentium4 -O2 -pipe -mfpmath=sse -mmmx -msse -msse2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distcc distlocks fixpackages noauto sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://sunsite.ualberta.ca/pub/unix/Linux/gentoo/ ftp://gentoo.risq.qc.ca/ ftp://distro.ibiblio.org/pub/Linux/distributions/gentoo/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 apm avi berkdb bitmap-fonts bonobo cdparanoia cdr crypt cscope cups dga divx4linux doc dvd encode f77 fam fbcon flac foomaticdb fortran freetds gcj gdbm gif gpm gstreamer gtk gtk2 gtkhtml guile icc imagemagick imlib innodb java jikes jpeg junit ldap libg++ libwww mad mcal mikmod mmx mpeg mysql ncurses nls nptl odbc oggvorbis opengl pam pcmcia pdflib perl pic png pnp python quicktime readline ruby samba sdl slang slp snmp speex spell sse sse2 ssl tcltk tcpd tetex theora threads tiff truetype usb wxwindows x86 xml xml2 xmms xosd xv xvid zlib video_cards_radeon"
Comment 4 SpanKY gentoo-dev 2005-02-11 12:04:28 UTC
*** Bug 81642 has been marked as a duplicate of this bug. ***
Comment 5 Stian Skjelstad 2005-02-13 21:40:05 UTC
could you do:

cd /var/tmp/portage/strace-4.5.7/work/strace-4.5.7

and issue the failing gcc command, and append -E and upload the result .o file here? That should reveal header-files included and not.
Comment 6 SpanKY gentoo-dev 2005-02-14 05:46:22 UTC
i'm pretty sure it's a linux-headers-2.4.2[12] bug ... every report ive seen about this had 2.4 headers
Comment 7 Pasi Sakala 2005-02-14 08:43:07 UTC
Created attachment 51210 [details]
Syscall.o created with -E option
Comment 8 Pasi Sakala 2005-02-14 08:44:48 UTC
I'm having the same error with 4.5.9. I'm also using 2.4-headers and I attached object-file created with -E option.

Here's my emerge info

Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.4.28-gentoo-r5 i686)
=================================================================
System uname: 2.4.28-gentoo-r5 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.2.3-r1,dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 14:36:53)]
dev-lang/python:     2.2.3-r1, 2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.7.9-r1, 1.9.4, 1.5, 1.6.3, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1, 2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/"
LANG="C"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.fi.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib alsa apm arts avi berkdb bitmap-fonts bonobo canna cdr cups curl dba encode esd f77 fam flac font-server foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib ipv6 jack java jpeg junit kde ldap libg++ libwww mad matroska mikmod motif mozilla mpeg mysql nas ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline sdl session sharedmem slang snmp speex spell ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb v4l xml xml2 xmms xv zlib video_cards_radeon linguas_fi"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
 
Comment 9 Stian Skjelstad 2005-02-14 09:02:50 UTC
at around line 442 we have

#ifdef SYS_pread64
        case SYS_pread64:
#endif


grep SYS_pread64 -R /usr/include/ /usr/src/linux-2.6.9/include/ /usr/src/linux-2.4.26-rc1/ /usr/include/bits/syscall.h

gives me

/usr/include/bits/syscall.h: #define SYS_pread64 __NR_pread64



grep __NR_pread64 -R /usr/include/ /usr/src/linux-2.6.9/include/ /usr/src/linux-2.4.26-rc1/

gives me

/usr/include/asm/unistd.h:#define __NR_pread64            180



This is 2.6 header files..

What does these greps end up with on your system?
Comment 10 Pasi Sakala 2005-02-14 09:15:02 UTC
Those greps give me:

grep SYS_pread64 -R /usr/include/ /usr/src/linux-2.4.28-gentoo-r5 /usr/include/bits/syscall.h

gives

/usr/include/bits/syscall.h:#define SYS_pread64 __NR_pread64

and

grep __NR_pread64 -R /usr/include/ /usr/src/linux-2.4.28-gentoo-r5

gives

/usr/include/bits/syscall.h:#define SYS_pread64 __NR_pread64
Comment 11 Stian Skjelstad 2005-02-14 09:24:17 UTC
Those kernel-header-files are broken then. The definition in asm/unistd.h is missing.

Does that file exists are your system?


For the maintainers of sys-kernel. How does this behave on a system?
> Headers:  sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1
Comment 12 Pasi Sakala 2005-02-14 09:29:05 UTC
Yes it exists there, but the only occurrance of __NR_pread is 

#define __NR_pread              180

and not __NR_pread64, what you got with 2.6.x
Comment 13 Stian Skjelstad 2005-02-14 09:44:04 UTC
>Yes it exists there, but the only occurrance of __NR_pread is 

#define __NR_pread              180

and not __NR_pread64, what you got with 2.6.x


SYS_pread64 should not have been defined then, or should have been defined as __NR_pread.

The value however is the same as __NR_pread64 (syscall 180), but if it is binary-compatible I don't know.

Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-04-16 04:00:13 UTC
*** Bug 89304 has been marked as a duplicate of this bug. ***
Comment 15 Mark van Dijk 2005-04-16 16:18:33 UTC
recompiling glibc worked for me!
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2005-05-04 10:58:08 UTC
*** Bug 91460 has been marked as a duplicate of this bug. ***
Comment 17 Mark van Dijk 2005-05-05 04:21:06 UTC
could anyone please confirm that recompiling glibc is the resolving issue. Thank you.
Comment 18 SpanKY gentoo-dev 2005-05-12 11:42:27 UTC
thanks Stian / Pasi for the details

fix here is to either rebuild glibc, or if that's no fun, you can
delete the SYS_pread64 / SYS_pwrite64 defines from your
/usr/include/bits/syscall.h

you should be able to copy & paste this into a shell to fix it too:
sed -i -e '/SYS_pread64/d' -e '/SYS_pwrite64/d' /usr/include/bits/syscall.h
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2005-06-08 08:18:31 UTC
*** Bug 95461 has been marked as a duplicate of this bug. ***
Comment 20 SpanKY gentoo-dev 2005-06-15 10:28:43 UTC
*** Bug 96186 has been marked as a duplicate of this bug. ***
Comment 21 SpanKY gentoo-dev 2006-04-07 18:07:52 UTC
*** Bug 129017 has been marked as a duplicate of this bug. ***
Comment 22 Mark (voidzero) 2006-04-09 05:33:38 UTC
recompiling glibc works for me. Thanks guys :)