Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 328531

Summary: app-arch/cpio-2.11: stat cross-compile fails with filetypes.h:85:11: error: macro "stat" requires 2 arguments, but only 1 given
Product: Gentoo Linux Reporter: Jacob Godserv <jacobgodserv>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: hwoarang, robm
Priority: High    
Version: unspecified   
Hardware: ARM   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
cpio-2.11-cross-stat.patch

Description Jacob Godserv 2010-07-16 04:59:31 UTC
Error snippet:

make[2]: Entering directory `/usr/armv7a-unknown-linux-gnueabi/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11/src'
  CC     copyout.o
  CC     copyin.o
In file included from copyout.c:25:
filetypes.h:85:11: error: macro "stat" requires 2 arguments, but only 1 given
In file included from copyout.c:25:
filetypes.h:85: error: ‘stat’ redeclared as different kind of symbol
/usr/armv7a-unknown-linux-gnueabi/usr/include/sys/stat.h:217: note: previous declaration of ‘stat’ was here
In file included from copyin.c:25:
filetypes.h:85:11: error: macro "stat" requires 2 arguments, but only 1 given
In file included from copyin.c:25:
filetypes.h:85: error: ‘stat’ redeclared as different kind of symbol
/usr/armv7a-unknown-linux-gnueabi/usr/include/sys/stat.h:217: note: previous declaration of ‘stat’ was here
make[2]: *** [copyout.o] Error 1
make[2]: *** Waiting for unfinished jobs....
copyin.c: In function ‘copyin_regular_file’:
copyin.c:541: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[2]: *** [copyin.o] Error 1
make[2]: Leaving directory `/usr/armv7a-unknown-linux-gnueabi/tmp/portage/app-arch/cpio-2.11/work/cpio-2.11/src'


Reproducible: Always

Steps to Reproduce:




Portage 9999 (default/linux/arm/10.0, gcc-4.4.3, unavailable, 2.6.33-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8800_@_2.66GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 11 Jul 2010 23:00:22 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.5-r2, 3.1.2-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -pipe  -fomit-frame-pointer "
CHOST="armv7a-unknown-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-Os -pipe  -fomit-frame-pointer "
DISTDIR="/usr/local/root/usr/portage/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 "
MAKEOPTS="-j2"
PKGDIR="/usr/armv7a-unknown-linux-gnueabi/packages/"
PORTAGE_CONFIGROOT="/usr/armv7a-unknown-linux-gnueabi/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/armv7a-unknown-linux-gnueabi/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=" "
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage sis tdfx trident 	voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jacob Godserv 2010-07-16 05:00:21 UTC
Created attachment 238989 [details]
build.log
Comment 2 Jacob Godserv 2010-07-16 05:02:04 UTC
Created attachment 238991 [details, diff]
cpio-2.11-cross-stat.patch

I can't tell if this is a hack or not to work around a larger issue, but it does appear to work (i.e. compile).
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2010-07-17 17:39:00 UTC
Cross-compiling on what? Describe your layout
Comment 4 Jacob Godserv 2010-07-19 03:33:22 UTC
Used crossdev to build an armv7a-unknown-linux-gnueabi environment using the latest stable versions. I then proceeded to build the 'system' set to an empty $ROOT folder after assigning the default arm 10.0 profile in crossdev's PORTAGE_CONFIGROOT. Not a whole lot that's non-standard.

I'm not sure exactly what you're looking for, so I hope that covered it?
Comment 5 Rob McMullen 2010-08-20 23:36:21 UTC
Ran into this same bug cross compiling for an armv5tel-softfloat-linux-gnueabi

More info on my build at: http://www.flipturn.org/OpenRD-Ultimate.html
Comment 6 SpanKY gentoo-dev 2010-10-10 00:04:18 UTC
added the fix from upstream to the current ebuild