Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435370 - sys-libs/libstdc++-v3-3.3.6 - /usr/armv7a-softfp-linux-gnueabi/bin/ld: unrecognised emulation mode: armelf_linux
Summary: sys-libs/libstdc++-v3-3.3.6 - /usr/armv7a-softfp-linux-gnueabi/bin/ld: unreco...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 437878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-18 01:26 UTC by John L. Poole
Modified: 2012-10-19 09:22 UTC (History)
1 user (show)

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


Attachments
Build log in 7zip format (was 856KB) (build.7z,36.35 KB, application/octet-stream)
2012-09-18 01:35 UTC, John L. Poole
Details
environment (environment,97.83 KB, text/plain)
2012-09-18 01:35 UTC, John L. Poole
Details
emerge-info (emerge-info.txt,4.05 KB, text/plain)
2012-09-18 01:36 UTC, John L. Poole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John L. Poole 2012-09-18 01:26:09 UTC
On a BeagleBone (ARM) processor:

emerge sys-libs/libstdc++

results in
 sys-libs/libstdc++-v3-3.3.6 failed (compile phase):

Reproducible: Always

Steps to Reproduce:
1.emerge sys-libs/libstdc++

Actual Results:  
mkdir libgcc
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc/xgcc -B/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc/ -B/usr/armv7a-softfp-linux-gnueabi/bin/ -B/usr/armv7a-softfp-linux-gnueabi/lib/ -isystem /usr/armv7a-softfp-linux-gnueabi/include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc -I/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/. -I/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/../include -DL_udivsi3 -xassembler-with-cpp -c /var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm -o libgcc/./_udivsi3.o
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm: Assembler messages:
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:159: Warning: ignoring attempt to redefine built-in register 'ip'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:160: Warning: ignoring attempt to redefine built-in register 'sp'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:161: Warning: ignoring attempt to redefine built-in register 'lr'
/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config/arm/lib1funcs.asm:162: Warning: ignoring attempt to redefine built-in register 'pc'
/usr/armv7a-softfp-linux-gnueabi/bin/ld: unrecognised emulation mode: armelf_linux
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
collect2: ld returned 1 exit status
make[2]: *** [libgcc/./_udivsi3.oS] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/build/gcc'
make: *** [all-gcc] Error 2
emake failed


Expected Results:  
successful build.

This may be new territory as this bug follows the bug that preventing Java from installing on an ARM platform, see Bug #305773 - Request for Support for ARM in Java (java-config) & Sun's Java SE for Embedded.  The aforesaid bug was in reference to a SheevaPlug platform, whereas this bug is in reference to a BeagleBone platform.

Logs & output to follow in the next 20 minutes.
Comment 1 John L. Poole 2012-09-18 01:29:45 UTC
bone ~ # emerge -pqv '=sys-libs/libstdc++-v3-3.3.6'
[ebuild  N    ] sys-libs/libstdc++-v3-3.3.6  USE="nls (-multilib)"

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

bone ~ #
Comment 2 John L. Poole 2012-09-18 01:35:22 UTC
Created attachment 324136 [details]
Build log in 7zip format (was 856KB)
Comment 3 John L. Poole 2012-09-18 01:35:41 UTC
Created attachment 324138 [details]
environment
Comment 4 John L. Poole 2012-09-18 01:36:05 UTC
Created attachment 324140 [details]
emerge-info
Comment 5 SpanKY gentoo-dev 2012-09-18 20:09:50 UTC
why waste time building libstdc++-v3 ?  i can't think of any reason why you'd want this old binary on an arm system.
Comment 6 John L. Poole 2012-09-18 20:26:44 UTC
I don't even know what this package does, it came to be a dependency for installing java on ARM.  I therefore have no opinion and defer to yours which seems to be: java-config should not include sys-libs/libstdc++ as a dependency for ARM installations.
Comment 7 SpanKY gentoo-dev 2012-09-18 20:46:03 UTC
which java package exactly ?
Comment 8 John L. Poole 2012-09-18 21:14:11 UTC
java-config, a mature bug at https://bugs.gentoo.org/show_bug.cgi?id=305773
Comment 9 SpanKY gentoo-dev 2012-09-18 21:28:47 UTC
that's java-config, not the JDK/JRE.  which one are you trying exactly ?
Comment 10 John L. Poole 2012-09-18 21:42:25 UTC
My goal was to get IcedTea to run, and if not that, then Sun (now Oracle's) Java runtime environment.
Comment 11 SpanKY gentoo-dev 2012-09-19 04:26:51 UTC
(In reply to comment #10)

so why are you trying to install libstdc++ ?  the ibm jdk is the only one i can see that pulls that in, and that's for ppc/ppc64, and only because they're binary packages.

icedtea is built from source, so installing the binary-only libstdc++ doesn't make sense there either.

that leaves the sun/oracle binaries, and i just grabbed one and that doesn't appear to need libstdc++ either.
Comment 12 John L. Poole 2012-09-19 05:45:29 UTC
It seems you're one step ahead of me anticipating what I was trying to do.

All I was trying to do was get the java-config working so I could install java --- then on the Sheevaplug and now on the BeagleBone. I created Bug #305773 to have ARM included as I had concluded I could not install java within Gentoo's framework without such feature.  Since nothing happened on Bug #305773 within a few weeks after opening it, it looked like a request that was not going to have anything happen on it, so I moved on accepting the fact that java could not be installed on the Sheevaplug (I spent considerable time trying to boot strap IcedTea and gave up).  What brought me back to Bug #305773 was I recently acquired a BeagleBone and I wanted to install Java (as the Angstrom build has Java running in it for the development kit) and found myself back at Bug #305773 that I had created for the Sheevaplug -- I was being gated by the lack of java-config being configured for ARM.  Someone provided suggestions in Bug #305773  in the last week that moved me forward and the next roadblock I ran into was this bug.  I do not now what  sys-libs/libstdc++-v3-3.3.6 is, it was a dependency that appeared when I was trying to get the java-config to work.  Somewhere something pulled it, and/or the IBM java, in.  I ended up cleaning out my /etc/portage/packages.keywords and got the java-config installed yesterday.  I wish I could tell you more... when I opened this bug I thought providing the breaking point and the requested files would be all that is needed and unfortunately my memory cannot provide you with all the answers you seek.

If you want to close this bug because you have concluded the problem is not something preventing me from getting Java working on the BeagleBone, that's fine.  When I focus back on getting a Java installed on the BeagleBone, I'll keep in mind your questions and if I run into another roadblock, I'll try to provide context beyond the problem build.  It's likely I was trying to build the java-based development environment that ships with the BeagleBone on Gentoo and I'm guessing that is based on IBM.
Comment 13 SpanKY gentoo-dev 2012-09-19 06:03:09 UTC
(In reply to comment #12)

i would like to delay attempting to fix libstdc++ for arm systems at the point where someone actually needs it as i suspect it won't be trivial.

i also suspect that it getting pulled in by your java work is either (1) a fat fingered emerge/etc... or (2) a broken dependency somewhere.  if the latter, let's find & fix that dependency.  post `emerge -pv --tree <pkg>` if you stumble across that again.
Comment 14 John L. Poole 2012-09-19 06:05:17 UTC
That's fine.  Will do as you suggest... I'm going to have to block out some time to give it more careful thought.
Comment 15 SpanKY gentoo-dev 2012-10-10 20:17:34 UTC
*** Bug 437878 has been marked as a duplicate of this bug. ***
Comment 16 Laurence 2012-10-10 21:05:03 UTC
Same problem installing Java, here is the emerge tree. 
localhost dev-java # emerge -pv --tree sun-jre-bin

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N f  *] dev-java/sun-jre-bin-1.6.0.35  USE="-X -alsa -jce (-nsplugin) -pax_kernel" 0 kB
[nomerge       ]  dev-java/java-config-2.1.12 
[ebuild  N    ~]   virtual/jre-1.5.0-r1  0 kB
[ebuild  N    ~]    virtual/jdk-1.5.0  0 kB
[ebuild  N f  *]     dev-java/ibm-jdk-bin-1.5.0.12_p5-r1  USE="-X (-alsa) -doc -examples -javacomm (-nsplugin) -odbc" 0 kB
[ebuild  N    ~]      dev-java/java-config-2.1.12  48 kB
[ebuild  N     ]      virtual/libstdc++-3.3  0 kB
[ebuild  N     ]       sys-libs/libstdc++-v3-3.3.6  USE="nls (-multilib)" 23,459 kB
[ebuild  N     ]   dev-java/java-config-wrapper-0.16  8 kB
Comment 17 SpanKY gentoo-dev 2012-10-10 21:22:53 UTC
(In reply to comment #16)

you're doing something wrong.  most likely you set invalid accept keywords for the bin packages.  blindly setting "~x86" or "~amd64" on a system other than x86 or amd64 is a bad idea.
Comment 18 Laurence 2012-10-10 21:29:51 UTC
(In reply to comment #17)
> (In reply to comment #16)
> 
> you're doing something wrong.  most likely you set invalid accept keywords
> for the bin packages.  blindly setting "~x86" or "~amd64" on a system other
> than x86 or amd64 is a bad idea.
my accept keywords is default ACCEPT_KEYWORDS="arm" see all the details below. 

alhost dev-java # emerge --info            
Portage 2.1.11.9 (default/linux/arm/10.0/armv6j, gcc-4.5.4, glibc-2.15-r2, 3.2.27+ armv6l)
=================================================================
System uname: Linux-3.2.27+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.1
Timestamp of tree: Wed, 10 Oct 2012 20:30:01 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          3.2.3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="*"
CBUILD="armv6j-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv introspection ipv6 modules mudflap ncurses nls nptl openmp pam pcre pppd readline session ssl tcpd unicode 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" 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, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 19 SpanKY gentoo-dev 2012-10-10 21:39:28 UTC
(In reply to comment #18)

the packages you showed in comment #16 do not have KEYWORDS=arm, so the only way you could have been able to emerge them was via modifying accept keywords (i.e. package.keywords).  that is the wrong way to go about it.

if you want java, then use icedtea from source.
Comment 20 John L. Poole 2012-10-10 21:44:07 UTC
Perhaps verifying what's in your /etc/portage directory with:
 grep -n ~arm /etc/portage/*
might confirm this?
Comment 21 Laurence 2012-10-19 09:22:16 UTC
(In reply to comment #20)
> Perhaps verifying what's in your /etc/portage directory with:
>  grep -n ~arm /etc/portage/*
> might confirm this?

Thanks I did not have any ACCEPT_KEYWORDS set, setting it to ACCEPT_KEYWORDS="~arm" in /etc/portage/make.conf seems to have solved the problem.
emerge jre is now busy running and will not pull in sys-libs/libstdc++-v3.

Can the "arm" keywords be taken away from the libstdc++-v3 package? Might stop someone else getting this error in the future.