Bug 8124 - Fail to install sdk ext on i686 host
Summary: Fail to install sdk ext on i686 host
Status: VERIFIED FIXED
Alias: None
Product: ADT
Classification: Yocto Project Subprojects
Component: adt (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0.1
Assignee: Randy Witt
QA Contact: Yi Zhao
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-08-07 09:33 UTC by Yi Zhao
Modified: 2016-01-21 07:11 UTC (History)
11 users (show)

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


Attachments
build.log (582.60 KB, text/x-log)
2015-08-07 09:33 UTC, Yi Zhao
no flags Details
preparing_build_system.log (1.78 KB, text/x-log)
2015-11-09 06:04 UTC, Yi Zhao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2015-08-07 09:33:44 UTC
Created attachment 2637 [details]
build.log

Git rev: master/22078d5e533e59a9aa6999abefbf6ece4e01de8d
Steps:
1. set the arch to qemuppc
2. bitbake core-image-sato -c populate_sdk_ext
3. Install the poky-glibc-x86_64-core-image-sato-ppc7400-toolchain-ext-1.8+snapshot.sh

Error message:
######################
$ ./poky-glibc-x86_64-core-image-sato-ppc7400-toolchain-ext-1.8+snapshot.sh 
Poky (Yocto Project Reference Distro) Extensible SDK installer version 1.8+snapshot
===========================================================
Enter target directory for SDK (default: /opt/poky/1.8+snapshot): /opt/poky/1.8
You are about to install the SDK to "/opt/poky/1.8". Proceed[Y/n]?
Extracting SDK...done
Setting it up...
Extracting buildtools...
Preparing build system...
ERROR: Unable to install packages. Command '/opt/poky/1.8/tmp/sysroots/x86_64-linux/usr/bin/smart --log-level=warning --data-dir=/opt/poky/1.8/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/rootfs/var/lib/smart install -y packagegroup-core-ssh-dropbear@all packagegroup-core-x11-sato-games@qemuppc packagegroup-core-x11-base@all smartpm@ppc7400 psplash@ppc7400 packagegroup-core-boot@qemuppc packagegroup-base-extended@qemuppc rpm@ppc7400 packagegroup-core-x11-sato@qemuppc locale-base-en-us@ppc7400 locale-base-en-gb@ppc7400' returned 1:
Loading cache...
Updating cache...               ######################################## [100%]

Computing transaction...error: Can't install packagegroup-distro-base-1.0-r83@qemuppc: no package provides packagegroup-core-device-devel


ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /opt/poky/1.8/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.23316
ERROR: Task 7 (/opt/poky/1.8/layers/poky/meta/recipes-sato/images/core-image-sato.bb, do_rootfs) failed with exit code '1'
SDK preparation failed: see /opt/poky/1.8/preparing_build_system.log
######################
Comment 1 Yi Zhao 2015-09-24 08:00:33 UTC
I tested it with latest master branch. (git rev: 7b86c771c80d0759c2ca0e57c46c4c966f89c49e)

For x86_64 host, there is no such issue. But on i686 host, the installation process will freeze and never end:

$ ./poky-glibc-i686-core-image-sato-i586-toolchain-ext-1.8+snapshot.sh 
Poky (Yocto Project Reference Distro) Extensible SDK installer version 1.8+snapshot
===========================================================
Enter target directory for SDK (default: ~/poky_sdk): 
You are about to install the SDK to "/home/build/poky_sdk". Proceed[Y/n]? 
Extracting SDK...done
Setting it up...
Extracting buildtools...
Preparing build system...        <--- The process hung here.
Comment 2 Yi Zhao 2015-10-13 05:49:01 UTC
This issue still happens on 2.0 rc1 build.
Comment 3 Randy Witt 2015-10-13 18:10:10 UTC
Yi, in the first log you are installing an sdk that was built on x86_64, and I'm assuming to a 32-bit host as you mention in the bug title.

But on the second, you are installing a sdk that was built on i686. Are you sure you were installing it to a 32-bit host and not a 64-bit host? The reason I ask is because 32-bit to 64-bit may be due to https://bugzilla.yoctoproject.org/show_bug.cgi?id=8140
Comment 4 Yi Zhao 2015-10-14 07:56:33 UTC
(In reply to comment #3)
> Yi, in the first log you are installing an sdk that was built on x86_64, and
> I'm assuming to a 32-bit host as you mention in the bug title.
> 
> But on the second, you are installing a sdk that was built on i686. Are you
> sure you were installing it to a 32-bit host and not a 64-bit host? The
> reason I ask is because 32-bit to 64-bit may be due to
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=8140

Hi Randy,
Here my test steps:
1. Build toolchain sdk ext for x86_64 on an x86_64 host, then install it on an x86_64 host. There was an issue for it but after 1.9 M3, it works well.

2. Build toolchain sdk ext for i686 on an i686 host, then install it on an i686 host. It doesn't work so far. So I changed this bug's title.

Yi
Comment 5 brian avery 2015-10-14 16:14:23 UTC
I verified that building the esdk for core sato  on ubuntu 14.04 32 bit for 32 bit by doing:
> bitbake core-image-sato -c populate_sdk_ext
running: 
> glibc-i686-core-image-sato-i586--toolchain-ext-2.0.sh
hangs and the log preparing_build_system.log has in it:
ERROR: Timeout while attempting to communicate with bitbake server
ERROR: Could not connect to server False:

---
When I run strace it also shows the FUTEX_WAIT problem.
Comment 6 Randy Witt 2015-10-14 17:28:09 UTC
Since this issue is caused by buildtools hanging which is in 8140, I'm marking it as as blocked by 8140.
Comment 7 Yi Zhao 2015-11-06 05:29:52 UTC
Update:
For 2.0 rc3 (jethro/fc45deac89ef63ca1c44e763c38ced7dfd72cbe1), the sdk ext toolchain for i686 can install without error. But when I tried to run devtool, I got the following error:
####################
$ devtool --help
ImportError: No module named site
####################
Comment 8 Alexandru Georgescu 2015-11-06 09:25:28 UTC
(In reply to comment #7)
> Update:
> For 2.0 rc3 (jethro/fc45deac89ef63ca1c44e763c38ced7dfd72cbe1), the sdk ext
> toolchain for i686 can install without error. But when I tried to run
> devtool, I got the following error:
> ####################
> $ devtool --help
> ImportError: No module named site
> ####################

Hi Yi,
From the error I can tell that the installation failed. To eliminate the doubts on this, can you retest this with latest rc? there are some scenarios that I would suggest:

1. use an existing or build an 32bit sdk_ext and install int on a 32bit machine. Please note that the installer might not be very comprehensible if installation fails, so a confirmation on the install log would be advised.

2. If installation fails then the issue is still present. Please add the install log as well here if so.

3. If the installation is successful, run $ devtool --help (make sure to use a new shell) and even a $ devtool build-image [some image] to check the sdk_ext can actually do a build on the 32bit host.


Optional:
Can we use a 32bit sdk_ext generated by a 64bit build machine, and test the above steps as well?
Comment 9 Paul Eggleton 2015-11-06 09:53:26 UTC
Indeed, this looks to me like the SDK installation failed as well. Yi, can you please attach preparing_build_system.log from the SDK installation directory?
Comment 10 Paul Eggleton 2015-11-06 11:39:46 UTC
FWIW this bug isn't actually fixed, because I just tested installing an i686 extensible SDK on a 32-bit Ubuntu 15.04 VM and it failed - uninative-tarball is still being built for 64-bit.
Comment 11 Paul Eggleton 2015-11-06 11:56:02 UTC
Looking at uninative-tarball, it can only build for a system which is the same architecture as the build host on which it was built - which means that theext SDK has the same restriction. Effectively SDKMACHINE can't be used to set what machine it should work on; we really ought to validate that at SDK build time.

What this means is, if you really want an i686 extensible SDK you need to build it on a 32-bit machine.
Comment 12 Paul Eggleton 2015-11-06 12:12:16 UTC
The actual first-line failure here might be what I've documented under bug 8660.
Comment 13 Yi Zhao 2015-11-09 06:04:53 UTC
Created attachment 2845 [details]
preparing_build_system.log

Here is the preparing_build_system.log. This ext sdk was built on Fedora 22 (i686) host and I tried to install it on Debian 8 (i686) platform.
Comment 14 Yi Zhao 2015-11-09 07:06:02 UTC
I re-built a ext sdk on Fedora 23 (i686) today, when tried to install it on the same host, I got the following error:
####################
$ ./poky-glibc-i686-core-image-sato-armv5e-toolchain-ext-2.0.sh 
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.0
==========================================================================
Enter target directory for SDK (default: ~/poky_sdk): 
You are about to install the SDK to "/home/build/poky_sdk". Proceed[Y/n]? 
grep: ./poky-glibc-i686-core-image-sato-armv5e-toolchain-ext-2.0.sh: Value too large for defined data type
Extracting SDK...bzip2: (stdin) is not a bzip2 file.
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
done
Setting it up...ls: cannot access /home/build/poky_sdk/environment-setup-*: No such file or directory

Extracting buildtools...
./poky-glibc-i686-core-image-sato-armv5e-toolchain-ext-2.0.sh: line 183: ./*buildtools-nativesdk-standalone*: No such file or directory
mv: cannot stat '*-nativesdk-libc.tar.*': No such file or directory
Preparing build system...
sh: buildtools/environment-setup*: No such file or directory
SDK preparation failed: see /home/build/poky_sdk/preparing_build_system.log
######################
Comment 15 Yi Zhao 2015-12-17 05:40:11 UTC
Update:

On 2.1 M1 (git rev:master/5e3e2e0cbb0a49986f4653e64c4c8d2b5461645e), the ext_sdk for i686 can install without problems. But the devtool can not run, I already filed a new bug 8826 to report it. I think this bug can be marked as fixed.
Comment 16 Randy Witt 2016-01-14 22:15:42 UTC
The following commit should fix.

commit a5dd1dd8904c62ef0ca5c208f997453e77860add
Author: Randy Witt <randy.e.witt@linux.intel.com>
Date:   Wed Dec 9 12:50:44 2015 -0800
Comment 17 Yi Zhao 2016-01-21 07:11:37 UTC
Verified with 2.0.1: jethro/dd0ba9ea4a11ab15348d4fe3574e4b28784db82f

The sdk_ext can install without problems on i686 host.