Bug 3161 - cannot build Hello World Ansi C project using standalone Toolchain for PowerPC
Summary: cannot build Hello World Ansi C project using standalone Toolchain for PowerPC
Status: VERIFIED FIXED
Alias: None
Product: ADT
Classification: Yocto Project Subprojects
Component: adt (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.3 M5
Assignee: Laurentiu Palcu
QA Contact:
URL:
Whiteboard: (merged)
Depends on:
Blocks: 3201
  Show dependency tree
 
Reported: 2012-09-24 10:10 UTC by Alexandru Georgescu
Modified: 2012-10-16 13:50 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Georgescu 2012-09-24 10:10:37 UTC
Errors appear When trying to build a Hello World Ansi C Autotools Project using the  standalone toolchain in Eclipse for PowerPC. Using ADT installer, this doesn't reproduce.


Toolchain: http://autobuilder.yoctoproject.org/pub/nightly/20120916-2/toolchain/x86_64/poky-eglibc-x86_64-powerpc-toolchain-gmae-1.2+snapshot-20120916.sh

Sysroot: http://autobuilder.yoctoproject.org/pub/nightly/20120916-2/machines/qemu/qemuppc/core-image-sato-sdk-qemuppc.tar.bz2

Eclipse plugin: http://autobuilder.yoctoproject.org/pub/nightly/20120916-2/eclipse-plugin/juno/org.yocto.sdk-rc1-201209162333.zip



Steps to reproduce:
1. Download toolchain and Sysroot and extract them in a specified location.
2. Created a headless Eclipse build and used the eclipse-plugin from above.
3. Configure Yocto Project Settings with Sysroot, toolchain, installed in step1.
4. Create a Hello World Ansi C Autottools Project.
5. Reconfigure Project and then Build.



Expected results
5. Reconfigure and Build is successful.

Actual results
5. In Problems pane (in Eclipse) I have the following errors:

Description	Resource	Path	Location	Type
C compiler cannot create executables	hello_C_ppc_toolchain_2		-1	Configure Problem
in `/home/alex/workspace-ww38/hello_C_ppc_toolchain_2':	hello_C_ppc_toolchain_2		-1	Configure Problem
make: *** No rule to make target `all'.			 	C/C++ Problem
make: *** No rule to make target `clean'.			 	C/C++ Problem
Comment 1 Jessica 2012-09-24 22:26:42 UTC
I took a look at the problem, it failed for me for both toolchain installer or adt_installer.  The real failure is this:

configure:3219: powerpc-poky-linux-gcc  -m32 -mhard-float  -mcpu=603e --sysroot=/home/jzhang/test-yocto/ppc  -g -O0  --sysroot=/home/jzhang/test-yocto/ppc  --sysroot=/home/jzhang/test-yocto/ppc  --sysroot=/home/jzhang/test-yocto/ppc conftest.c  >&5
as: unrecognized option '-mppc'


It caused by  we have this for ppc gcc: 

sysroots/i686-pokysdk-linux/usr/lib/ppc603e-poky-linux/gcc/powerpc-poky-linux/4.7.2/plugin/include/config/rs6000/rs6000.h:%{mcpu=ec603e: -mppc} \
Comment 2 Laurentiu Palcu 2012-09-25 14:58:57 UTC
This issue should be fixed in the latest tree. Please retest by using toolchain tarballs older than 09.24.
Comment 3 Alexandru Damian 2012-09-25 15:02:04 UTC
Alex, can you please retest this using current HEAD ?
Comment 4 Radu Moisan 2012-09-28 07:59:44 UTC
(In reply to comment #3)
> Alex, can you please retest this using current HEAD ?

the latest nightly would suffice, I think.
Comment 5 Alexandru Georgescu 2012-10-01 12:13:30 UTC
Hi, I have tested with this build: http://autobuilder.yoctoproject.org/pub/nightly/20120926-1

which is older than 09.24, and reproduces with the standalone toolchain.
The standalone toolchain was installed in a different location than the default one.

When solved, please set it to resolved fixed, not Invalid Fixed because this is a valid bug.

My test host this time is a Fedora17 32bit machine.

Thanks,
Alex.
Comment 6 Alexandru Georgescu 2012-10-01 13:09:09 UTC
The same happenes when creating a GTK project as well.
Comment 7 Jessica 2012-10-01 16:49:39 UTC
Alex,

Is the toolchain you tested against is the official M5 built toolchain?
Comment 8 Alexandru Georgescu 2012-10-02 09:29:04 UTC
Hi Jessica,

Yes, I am using the official build for 1.3_M5 RC2:

Download: http://autobuilder.yoctoproject.org/pub/nightly/20120926-1
poky: 718eb85806e080d0b165344b272e531ef19421eb
meta-qt3: 8730326c902e6fb256b5dea77a6dde28d813c424
eclipse-poky: c88444d96958324e7dda9bd496977be3369aea1e
Comment 9 Radu Moisan 2012-10-03 08:15:35 UTC
This should not happen anymore. We have a patch submitted for it by Laur.
Comment 10 Laurentiu Palcu 2012-10-05 11:51:09 UTC
Root cause: 32bit cross-canadian and nativesdk packages didn't have RPATHs relocated because the building machine had a chrpath version <0.14.
Comment 11 Alexandru Georgescu 2012-10-16 13:50:08 UTC
Verified.