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.
please attach emerge info
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"
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"
*** Bug 81642 has been marked as a duplicate of this bug. ***
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.
i'm pretty sure it's a linux-headers-2.4.2[12] bug ... every report ive seen about this had 2.4 headers
Created attachment 51210 [details] Syscall.o created with -E option
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
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?
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
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
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
>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.
*** Bug 89304 has been marked as a duplicate of this bug. ***
recompiling glibc worked for me!
*** Bug 91460 has been marked as a duplicate of this bug. ***
could anyone please confirm that recompiling glibc is the resolving issue. Thank you.
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
*** Bug 95461 has been marked as a duplicate of this bug. ***
*** Bug 96186 has been marked as a duplicate of this bug. ***
*** Bug 129017 has been marked as a duplicate of this bug. ***
recompiling glibc works for me. Thanks guys :)