Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224685 - cross-compile troubles with gnulib and rpl_*
Summary: cross-compile troubles with gnulib and rpl_*
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
: 225481 226039 288077 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-03 01:38 UTC by Jim
Modified: 2010-11-17 00:02 UTC (History)
6 users (show)

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


Attachments
build log (build.log,34.58 KB, text/plain)
2008-06-03 11:00 UTC, Jim
Details
env (environment,89.58 KB, text/plain)
2008-06-03 11:00 UTC, Jim
Details
stdioh (stdio.h,27.85 KB, text/plain)
2008-06-03 11:03 UTC, Jim
Details
coreutils-6.10 build.log (build.log,53.38 KB, text/plain)
2008-10-21 14:35 UTC, Jacob Godserv
Details
coreutils-6.10 environment (environment,109.77 KB, text/plain)
2008-10-21 14:35 UTC, Jacob Godserv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim 2008-06-03 01:38:51 UTC
findutils-4.3.11 does not seem to build when i do "xmerge.sh -av gentoo-sources" with my crosscompiler.

This seems to be found in other distro's as well (debian etc):
http://www.nabble.com/build-error-findutils-td16334966.html

I think this is a known issue in gentoo on other packages:
http://forums.gentoo.org/viewtopic.php?t=692591
Not sure if it's related.


Reproducible: Always

Steps to Reproduce:
I followed the followin steps:
- Download stage3 and portage-stable
- chroot into the unziped files
- crossdev --target armv5te-softfloat-linux-gnueabi
-- great success! gcc builds! v 4.2.4
- xmerge.sh -av gentoo-sources
-- fails on find-utils dependency

Actual Results:  
... pruned for this bug:

/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: expected declaration specifiers or '...' before '(' token
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: conflicting types for 'rpl_fseeko'
./stdio.h:275: error: previous declaration of 'rpl_fseeko' was here
depbase=`echo file-set.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	armv5te-softfloat-linux-gnueabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..  -I../../intl   -Os -pipe -MT file-set.o -MD -MP -MF $depbase.Tpo -c -o file-set.o file-set.c &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from ./stdio.h:31,
                 from hash.h:26,
                 from file-set.h:5,
                 from file-set.c:20:
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: expected declaration specifiers or '...' before '(' token
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: conflicting types for 'rpl_fseeko'
./stdio.h:275: error: previous declaration of 'rpl_fseeko' was here
make[4]: *** [areadlink-with-size.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [file-set.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11'
make: *** [all] Error 2
 * 
 * ERROR: sys-apps/findutils-4.3.11 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2350:  Called die
 * The specific snippet of code:
 *       emake AR="$(tc-getAR)" || die "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/environment'.
 * 

 * Messages for package sys-apps/findutils-4.3.11 merged to /usr/armv5te-softfloat-linux-gnueabi/:

 * 
 * ERROR: sys-apps/findutils-4.3.11 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2350:  Called die
 * The specific snippet of code:
 *       emake AR="$(tc-getAR)" || die "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/environment'.
 *
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: conflicting types for 'rpl_fseeko'
./stdio.h:275: error: previous declaration of 'rpl_fseeko' was here
depbase=`echo file-set.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	armv5te-softfloat-linux-gnueabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..  -I../../intl   -Os -pipe -MT file-set.o -MD -MP -MF $depbase.Tpo -c -o file-set.o file-set.c &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from ./stdio.h:31,
                 from hash.h:26,
                 from file-set.h:5,
                 from file-set.c:20:
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: expected declaration specifiers or '...' before '(' token
/usr/armv5te-softfloat-linux-gnueabi/usr/include/stdio.h:654: error: conflicting types for 'rpl_fseeko'
./stdio.h:275: error: previous declaration of 'rpl_fseeko' was here
make[4]: *** [areadlink-with-size.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [file-set.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11/gnulib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/findutils-4.3.11/work/findutils-4.3.11'
make: *** [all] Error 2
 * 
 * ERROR: sys-apps/findutils-4.3.11 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2350:  Called die
 * The specific snippet of code:
 *       emake AR="$(tc-getAR)" || die "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/environment'.
 * 

 * Messages for package sys-apps/findutils-4.3.11 merged to /usr/armv5te-softfloat-linux-gnueabi/:

 * 
 * ERROR: sys-apps/findutils-4.3.11 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2350:  Called die
 * The specific snippet of code:
 *       emake AR="$(tc-getAR)" || die "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/findutils-4.3.11/temp/environment'.
 *
Comment 1 Jim 2008-06-03 01:42:25 UTC
I should mention i am xmerging in :

export SYSROOT="/usr/armv5te-softfloat-linux-gnueabi"
Comment 2 SpanKY gentoo-dev 2008-06-03 03:27:28 UTC
it's most likely an issue in gnulib, not findutils/coreutils/whatever

post the full build log as an attachment and post the stdio.h header in question
Comment 3 Jim 2008-06-03 11:00:20 UTC
Created attachment 155343 [details]
build log
Comment 4 Jim 2008-06-03 11:00:58 UTC
Created attachment 155345 [details]
env
Comment 5 Jim 2008-06-03 11:03:00 UTC
Created attachment 155347 [details]
stdioh
Comment 6 Jim 2008-06-03 11:04:13 UTC
I added the build log, environment, and stdio.h as attachments. If the fix is to rebuild my gcc with crossdev please let me know in the bug ... thanks so much for looking at this!
Comment 7 SpanKY gentoo-dev 2008-06-12 13:11:44 UTC
probably just need to add another variable to the default export list so as to force the autoconf test in a favorable way
Comment 8 SpanKY gentoo-dev 2008-06-12 13:11:49 UTC
*** Bug 225481 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2008-06-12 13:11:56 UTC
*** Bug 226039 has been marked as a duplicate of this bug. ***
Comment 10 Brad Normand 2008-06-29 20:42:03 UTC
I'm getting a somewhat similar error attempting to xmerge vanilla-sources for i486-pc-linux-uclibc.  Any hint on what env variable I can set to get past this, or where I can look to find it?


In file included from ./stdio.h:31,
                 from areadlink-with-size.c:25:
/usr/i486-pc-linux-uclibc/usr/include/stdio.h:644: error: syntax error before '(' token
/usr/i486-pc-linux-uclibc/usr/include/stdio.h:644: error: `rpl_fseeko' declared as function returning a function
/usr/i486-pc-linux-uclibc/usr/include/stdio.h:644: error: syntax error before "int"
make[4]: *** [areadlink-with-size.o] Error 1


A workaround is using older versions of findutils and coreutils:
echo ">=sys-apps/findutils-4.3" >> /usr/i486-pc-linux-uclibc/etc/portage/package.mask
echo ">=sys-apps/coreutils-6.10" >> /usr/i486-pc-linux-uclibc/etc/portage/package.mask
Comment 11 SpanKY gentoo-dev 2008-06-29 23:04:11 UTC
solar: lets add these fseek vars to the site configs and call it a day
Comment 12 solar (RETIRED) gentoo-dev 2008-06-29 23:18:30 UTC
I need exact names. ac_foo_bar ? Actually there are quite a few sprintf snprintf vsprintf etc ones that nearly every configure checks for that always hold true for us in -uclibc* and -gnu* land.

Also we have not pushed the new crossdev with site.conf support.
Comment 13 John Holland 2008-08-12 01:51:06 UTC
During cross compiling gl_cv_func_stdin is being set to no, thus forcing fseeko replacement. Setting gl_cv_func_stdin=yes in site/linux lets the cross compile continue.

coreutils is also a candidate for the gl_cv_func_wcwidth_works work around...
Comment 14 Jacob Godserv 2008-10-21 14:34:05 UTC
I've got a me-too situation when emerging coreutils-6.10:

depbase=`echo areadlink-with-size.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        arm-unkown-linux-gnueabi-gcc -std=gnu99  -I.      -Os -pipe -MT areadlink-with-size.o -MD -MP -MF $depbase.Tpo -c -o 
areadlink-with-size.o areadlink-with-size.c &&\
        mv -f $depbase.Tpo $depbase.Po
depbase=`echo base64.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        arm-unkown-linux-gnueabi-gcc -std=gnu99  -I.      -Os -pipe -MT base64.o -MD -MP -MF $depbase.Tpo -c -o base64.o base64.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from ./stdio.h:33,
                 from areadlink-with-size.c:25:
/usr/arm-unkown-linux-gnueabi/usr/include/stdio.h:718: error: expected declaration specifiers or '...' before '(' token
/usr/arm-unkown-linux-gnueabi/usr/include/stdio.h:718: error: conflicting types for 'rpl_fseeko'
./stdio.h:277: error: previous declaration of 'rpl_fseeko' was here
make[2]: *** [areadlink-with-size.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.10-r2/work/coreutils-6.10/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-6.10-r2/work/coreutils-6.10/lib'
make: *** [all-recursive] Error 1

The complete build.log environment, and emerge --info outputs are to follow.
Comment 15 Jacob Godserv 2008-10-21 14:35:04 UTC
Created attachment 169312 [details]
coreutils-6.10 build.log
Comment 16 Jacob Godserv 2008-10-21 14:35:27 UTC
Created attachment 169314 [details]
coreutils-6.10 environment
Comment 17 Jacob Godserv 2008-10-21 14:36:30 UTC
jacob-gdesktop Gentoo # xmerge --info
Portage 2.1.4.5 (uclibc/ppc, gcc-4.2.4, unavailable, 2.6.25-gentoo-r7 i686)
=================================================================
System uname: 2.6.25-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Timestamp of tree: Mon, 13 Oct 2008 21:00:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="arm ppc"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe"
CHOST="arm-unkown-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CTARGET="arm-unkown-linux-gnueabi"
CXXFLAGS="-Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo     http://prometheus.cs.wmich.edu/gentoo     http://mirror.datapipe.net/gentoo     http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="minimal ppc" 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="uclibc" INPUT_DEVICES="keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l"
Unset:  CPPFLAGS, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 18 Jacob Godserv 2008-10-21 15:20:36 UTC
I can confirm the package.mask workaround works on my system.

(I also adjusted the make.profile - I had it set to ppc when it should've been arm. I don't think this affected anything related to this bug though.)
Comment 19 SpanKY gentoo-dev 2008-10-26 08:33:45 UTC
this is being addressed with config.site files ... we arent going to patch every random package that may include gnulib
Comment 20 Marat Radchenko 2008-10-27 06:58:59 UTC
it isn't 'every random package'. it's coreutils and findutils (which both are included into 'system').
Comment 21 SpanKY gentoo-dev 2008-10-27 07:02:50 UTC
just because your small random sampling only turned up those two packages doesnt make it true

we arent going to patch packages, end of story ... use the config.site work
Comment 22 Marat Radchenko 2008-11-29 20:29:34 UTC
just for record: adding gl_cv_func_wcwidth_works=yes to config.site allows it to build
Comment 23 SpanKY gentoo-dev 2009-10-10 17:07:48 UTC
*** Bug 288077 has been marked as a duplicate of this bug. ***
Comment 24 vpappas 2010-11-15 23:35:44 UTC
(In reply to comment #22)
> just for record: adding gl_cv_func_wcwidth_works=yes to config.site allows it
> to build
> 

where can i add the gl_cv_func_wcwidth_works=yes?In which file?
Comment 25 Jacob Godserv 2010-11-15 23:45:56 UTC
(In reply to comment #24)
> where can i add the gl_cv_func_wcwidth_works=yes?In which file?

I can't remember off the top of my head, but it's in /usr/share somewhere. If you do a "locate" you should be able to find it.
Comment 26 vpappas 2010-11-15 23:47:47 UTC
(In reply to comment #22)
> just for record: adding gl_cv_func_wcwidth_works=yes to config.site allows it
> to build
> 

where can i add the gl_cv_func_wcwidth_works=yes?In which file?
Comment 27 vpappas 2010-11-15 23:52:51 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > where can i add the gl_cv_func_wcwidth_works=yes?In which file?
> 
> I can't remember off the top of my head, but it's in /usr/share somewhere. If
> you do a "locate" you should be able to find it.
> 

thank you for your answer.
i can see two functions config_site_arch and config_site_names where to write?
Comment 28 Leho Kraav (:macmaN @lkraav) 2010-11-16 01:11:47 UTC
i slapped it outside the functions and it helped on i686-gentoo-linux-uclibc:

5 TOPDIR=/usr/share/crossdev/include/site                                     
6 gl_cv_func_wcwidth_works=yes                                                
Comment 29 vpappas 2010-11-16 09:33:33 UTC
(In reply to comment #27)
> (In reply to comment #25)
> > (In reply to comment #24)
> > > where can i add the gl_cv_func_wcwidth_works=yes?In which file?
> > 
> > I can't remember off the top of my head, but it's in /usr/share somewhere. If
> > you do a "locate" you should be able to find it.
> > 
> 
> thank you for your answer.
> i can see two functions config_site_arch and config_site_names where to write?
> 

(In reply to comment #28)
> i slapped it outside the functions and it helped on i686-gentoo-linux-uclibc:
> 
> 5 TOPDIR=/usr/share/crossdev/include/site                                     
> 6 gl_cv_func_wcwidth_works=yes                                                
> 

I have already put the gl_cv_func_wcwidth_works=yes  in /usr/share/config.site and i am still getting error.
I am running xmerge gentoo-sources for (powerpc-linux-gnu)and the error i am getting:
ERROR: sys-apps/findutils-4.4.2 failed:
    make failed
 Call stack:
    ebuild.sh, line 54: Called src_compile
   enviroment, line 2622: Called die
Comment 30 vpappas 2010-11-16 23:16:21 UTC
please need help argent.
I am trying to xmerge gentoo-sources for target: powerpc-linux-gnu
I have already put the gl_cv_func_wcwidth_works=yes  in /usr/share/config.site
and i am still getting error.

ERROR: sys-apps/findutils-4.4.2 failed:
    make failed
 Call stack:
    ebuild.sh, line 54: Called src_compile
   enviroment, line 2622: Called die
Comment 31 vpappas 2010-11-17 00:02:41 UTC
I Solved by inserting :gl_cv_func_wcwidth_works=yes in /bin/xmerge.sh.
Anyway i'm going deeper now.
thank you.