Bug 12095 - Toolchain.Host.Mismatch problem
Summary: Toolchain.Host.Mismatch problem
Status: RESOLVED WONTFIX
Alias: None
Product: ADT
Classification: Yocto Project Subprojects
Component: adt (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.5 M2
Assignee: Chin Huat Ang
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-09-16 22:26 UTC by Dvorkin Dmitry
Modified: 2017-12-08 19:09 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dvorkin Dmitry 2017-09-16 22:26:37 UTC
My Linux is x86_64.
I built SDK for i686 + arm to easily run on 32bit Linux versions (i686).
I installed Eclipse x86_64 and tryed to configure my i686 SDK at Yocto ADT plugin. No success. It says, SDK arch and host arch are different.

I used my i686 SDK in my x86_64 Linux without problems for year. Why Eclipse ADT plugin complains? If I'll build x86_86 SDK I allowed to use it with my Eclipse x86_64.

The wrong check (it says, I can't use i686 gcc to build with Eclipse x86_64!) forces me to change my SDK to x86_64 arch and stop supporintg i686. Or build two SDKs for i686 and x86_64.

I think, line 149 of http://git.yoctoproject.org/cgit/cgit.cgi/eclipse-poky-contrib/tree/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKChecker.java#n149 is completely incorrect.

the check has to be about like this:

if ( host_arch != "x86_64" && sdk_arch != host_arch) return( MISMATCH);

or:

if ( host_arch LIKE "i\d\d\d" && sdk_arch != host_arch) return( MISMATCH);

or (more strict, using JavaScript syntax):

ha = host_arch.replace( 'i', '').replace( '_', '').toInt()
sa = sdk_arch.replace( 'i', '').replace( '_', '').toInt();
if ( sa > ha) return( MISMATCH);
Comment 1 brian avery 2017-09-28 23:27:39 UTC
Question:

I commented out the sdk check as a quick test and found that for autotools at least, the configure fails if I use a 586 sdk on an x86-64 host .  It fails due to gcc failing to find libgcc and fails to find crtbegin.o.

If i source the 586 env from a shell I see the same failure if I try to build a hello.c. 

How were you building with the 586 sdk from the command line?
Comment 2 Dvorkin Dmitry 2017-10-05 07:36:37 UTC
I'm building programs with my cross-gcc from i686 SDK without problems.
I'm using i686 SDK, built from scratch with yocto on my Mageia distribution.
No external libraries/gcc used, except SDL/libsdl-native.
Comment 3 Stephen K Jolley 2017-10-06 13:59:46 UTC
Brian, I believe the question was answered.
Comment 4 brian avery 2017-12-08 19:09:06 UTC
Given current resources, we won't be able to address this. Suggested workaround is to build both the 32 and 64 bit sdks.