Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296294 - dev-embedded/scratchbox compile fails for ARM target
Summary: dev-embedded/scratchbox compile fails for ARM target
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Olivier Crete (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-09 08:51 UTC by Tohru O
Modified: 2012-08-15 21:51 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tohru O 2009-12-09 08:51:41 UTC
Compiling the helloworld.c example inside scratchbox will fail for ARM target.

Reproducible: Always

Steps to Reproduce:
1. Install scratchbox components (not all may be necessary to setup environment)
emerge -v scratchbox scratchbox-devkit-apt-https scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-devkit-qemu scratchbox-toolchain-cs2007q3-glibc2_5 scratchbox-devkit-git scratchbox-devkit-svn

2.Try ./compilers/cs2007q3-glibc2.5-i486/bin/i486-pc-linux-gnu-gcc packages/hello.c -o /tmp/helloX86

This should compile and run.

3.Try ./compilers/cs2007q3-glibc2.5-arm7/bin/arm-none-linux-gnueabi-gcc packages/hello.c -o /tmp/helloArm

Actual Results:  
Step 3 above fails with:
/opt/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/libgcc.a when searching for -lgcc
/opt/scratchbox/compilers/cs2007q3-glibc2.5-arm7/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc



Expected Results:  
Should compile and run as in Step 2 for X86 target.

This problem is reproducible when inside the scratchbox environment as well. If the scratchbox tools are installed manually, the example helloworld.c will compile and run for both targets.
Comment 1 Robin Hill 2009-12-09 11:49:24 UTC
The problem would appear to be within the scratchbox-toolchain-cs2007q3-glibc2_5 ebuild.  This is stripping the files during install (presumably with an x86 application), which is messing up the ARM binaries/libraries.

Adding RESTRICT="strip binchecks" to the ebuild fixes the issue here.
Comment 2 Justin 2010-01-15 16:23:09 UTC
(In reply to comment #1)
> Adding RESTRICT="strip binchecks" to the ebuild fixes the issue here.
> 

I can confirm that this does fix the problem.
Comment 3 Olivier Crete (RETIRED) gentoo-dev 2010-01-18 05:41:20 UTC
Mr Flameeyes decided it would be funny to remove the RESTRICT line without filing a bug or even trying to see if it actually breaks anything. I'm restoring it with a big fat comment...
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-01-18 08:56:16 UTC
You have been warned *especially* about *not using binchecks*.

Thank you for *breaking again QA policies on that regard*.

Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2010-01-18 13:19:28 UTC
Restrict stripping is fine here and should fixed the issue itself.
Binchecks restrictions on the other hand should never EVER be used in something that installs ELF binaries.

Let me cite the manpage:
binchecks
---------
Disable all QA checks for binaries.  This should ONLY be used in packages for  which  binary  checks  make  no  sense  (linux-headers  and  ker                   nel-sources,  for  example, can safely be skipped since they have no binaries).  If the binary checks need to be skipped for other reasons (such                   as proprietary binaries), see the QA CONTROL VARIABLES section for more specific exemptions.

So you only disable ALL qa warnings and nothing else. Warnings is the word here, not some removal of something magical from your package but just the warning that something is going wrong.

If you feel like the packages are doing it correctly and qa warning is wrong then you can override that with QA_whatsoever variables that can be found in (man 5 ebuild).

I note that user reported that something fixes the issue, i wonder if you tried the "fix" without the binchecks at all or just commited it in... (because here it really needs only that strip...)

I agree that Diego removed wrongly the strip, but since you had wrong bincheck there from the starter and no documented reason why you restrict stuff there is quite good conclusion from that -> it is not required. (in theory it might be documented in changelog, but i don't see such text there nor in the cvs log for the package)
Comment 6 Thomas Raschbacher gentoo-dev 2010-03-09 15:07:18 UTC
it'D be nice to leave something working in portage (arm binaries cannot be compiled and/or run atm .. i duno about strip/bincheck though ;)
Comment 7 Olivier Crete (RETIRED) gentoo-dev 2010-03-10 15:36:20 UTC
The reason I disabled binchecks is that they take a long long long time on this package. And since this is a binary package, they are entirely useless.  All they do in this case is to make the users miserable.

That said, the package should work with RESTRICT=strip

Are you sure it's still broken ? It works here for me.
Comment 8 SpanKY gentoo-dev 2010-03-10 16:48:51 UTC
that is simply not true.  there are binary checks that will work regardless of the package being built from source.

if your package installs binaries, you must not restrict bincheck.  this is a bug in your ebuild an QA should fix it for you.
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-08-15 21:51:57 UTC
As I see it there is nothing left to discuss on this bug