Bug 3770

Summary: populate_sdk_base.bbclass: cannot install 32 bit SDK on 64 bit host
Product: [Yocto Project Subprojects] ADT Reporter: Wolfgang Denk <wd>
Component: adtAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium CC: laurentiu.palcu, poky.adt.watcher, poky.watcher, sgw
Version: 1.4   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
[pATCH] populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host none

Description Wolfgang Denk 2013-01-22 11:13:34 UTC
Created attachment 1019 [details]
[pATCH] populate_sdk_base.bbclass: Allow installation of ix86 SDK on x86_64 host

Commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" prevents not only the installation of 64 bit SDK
configurations on 32 bit hosts (which indeed cannot work), but also
the legitimate installation of a 32 bit SDK on a 64 bit host.

For a distribution, it may be very convenient to provide only
one set of images (configured for ix86), as these images will
work both on 32 and 64 bit systems.

The attached patch is supposed to fix this problem.
Comment 1 Laurentiu Palcu 2013-01-22 11:41:42 UTC
The fix looks OK. But I would like to see a warning message for those who install i686 SDK on a x86_64 host. Something like:
"WARNING: The SDK is intended for 32 bit hosts. You're installing it on a 64 bit machine. Make sure you have the 32 bit libraries installed."

At least we make sure people are not caught by suprise when their SDK tools and toolchain do not work on their machine.

Also, I think you could send the patch directly to
openembedded-core@lists.openembedded.org

Thanks
Comment 2 Wolfgang Denk 2013-01-22 12:29:36 UTC
(In reply to comment #1)
> The fix looks OK. But I would like to see a warning message for those who
> install i686 SDK on a x86_64 host. Something like:
> "WARNING: The SDK is intended for 32 bit hosts. You're installing it on a 64
> bit machine. Make sure you have the 32 bit libraries installed."
> 
> At least we make sure people are not caught by suprise when their SDK tools
> and toolchain do not work on their machine.

I have to admit that I don't like that idea - it just adds noise to
the installation.  There are a number of other software packages that
come in 32 bit versions even on 64 bit systems, without warning about
this.

See for example Adobe Reader [1], which installs a 32 bit binary, not
even asking if the host is 32 or 64 bit:

	-> file /opt/Adobe/Reader9/Reader/intellinux/bin/acroread
	/opt/Adobe/Reader9/Reader/intellinux/bin/acroread: ELF 32-bit
	LSB executable, Intel 80386, version 1 (SYSV), dynamically
	linked (uses shared libs), for GNU/Linux 2.2.5, stripped

[1] ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.3/enu/AdbeRdr9.5.3-1_i486linux_enu.rpm


Sometimes even packages explicitly labeled as 64 bit versions include
32 bit binaries - example: google-earth-stable-6.2.2.6613-0.x86_64
contains this file:

	-> file /opt/google/earth/free/googleearth-bin
	/opt/google/earth/free/googleearth-bin: ELF 32-bit LSB
	executable, Intel 80386, version 1 (SYSV), dynamically linked
	(uses shared libs), for GNU/Linux 2.6.15,
	BuildID[sha1]=0x7b9b6f926c9cce7276fe550a14bf7190bb71ee75,
	stripped

I think we should keep the noise level low, too.


> Also, I think you could send the patch directly to
> openembedded-core@lists.openembedded.org

Done.

Thanks,

Wolfgang Denk