Bug 9759 - python-2.7.9-r1 do_install failing (meta-intel [minnowboard])
Summary: python-2.7.9-r1 do_install failing (meta-intel [minnowboard])
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.8.3
Hardware: x86 x86_64
: Medium critical
Target Milestone: 1.8.3
Assignee: Alejandro Hernandez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-06-12 20:10 UTC by CB
Modified: 2016-12-06 17:50 UTC (History)
5 users (show)

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


Attachments
do_install, log and build directory (14.64 MB, application/x-gzip)
2016-06-12 20:10 UTC, CB
no flags Details
.../corei7-64-poky-linux/python/2.7.9-r1/temp logs (190.93 KB, application/x-gzip)
2016-08-12 20:24 UTC, CB
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description CB 2016-06-12 20:10:30 UTC
Created attachment 3233 [details]
do_install, log and build directory

Dear all,

Using poky-fido-13.0.2 and Bitbake targeting Minnowboard (meta-intel), python-2.7.9-r1 do_install do not work properly.
make: *** [sharedmods] Error 132
ERROR: oe_runmake failed
=======================================================================
The build configuration is:
BB_VERSION        = "1.26.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "CentOS-Linux-7.1.1503"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "intel-corei7-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.8.1"
TUNE_FEATURES     = "m64 corei7"
TARGET_FPU        = ""
meta            
meta-yocto        
meta-yocto-bsp    = "<unknown>:<unknown>"
meta-intel        = "fido:29a1746ea844e1d99571cbf5533f0ff581191b16"
=========================================================================

In Attachment, the do_install script, log.do_install file and local build directory: aclocal-copy, config.status, libpython2.7.a, ... ,Makefile

If necessary, I can make some additional experiments.
At this moment, I am not able to find the problem.
Best Regards
Comment 1 Alejandro Hernandez 2016-07-01 21:47:57 UTC
Hey CB,

I am unable to reproduce your issue, as far as I can tell I am using the same config as you:

Build Configuration:
BB_VERSION        = "1.26.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "SUSE-LINUX-42.1"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "intel-corei7-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.8.2"
TUNE_FEATURES     = "m64 corei7"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "fido:c9f0a99050ec0050f0dbcd55d0cd2ab18848113f"  
meta-intel        = "fido:29a1746ea844e1d99571cbf5533f0ff581191b16"

python compiles and installs without a problem, which makes me think that somehow your python build is corrupted, have you tried running a bitbake -c cleansstate python-core , and then rebuilding it again?
Comment 2 CB 2016-07-17 16:41:22 UTC
Hi Alejandro,

I made some trials and fully rebuild the project.
The problem remains. In your test, you used SUSE. Probably the issue comes from CENTOS7 and shared libraries.

Indeed, I am using a HOST running CENTOS7 with python 2.7.5 as a default version.

The issue comes during an execution of the internal script named run.do_install

Hereby, a screenshot of the script result showing a  "sharedmods" issue {/bin/sh: line 6: 13387 Illegal instruction)     (core dumped).}
---------------------------------------------------------------------------

if test $? -ne 0 ; then \
	echo "generate-posix-vars failed" ; \
	rm -f ./pybuilddir.txt ; \
	exit 1 ; \
fi
/bin/sh: line 6: 13387 Illegal instruction     (core dumped) CC='x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/sysroots/intel-corei7-64' LDSHARED='x86_64-poky-linux-gcc  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/sysroots/intel-corei7-64 -shared -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed' OPT='-DNDEBUG -g  -O3 -Wall -Wstrict-prototypes' _TCLTK_INCLUDES='' _TCLTK_LIBS='' _PYTHON_PROJECT_BASE=/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/work/corei7-64-poky-linux/python/2.7.9-r1/build _PYTHON_HOST_PLATFORM=linux2-x86_64 PYTHONPATH=/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/work/corei7-64-poky-linux/python/2.7.9-r1/build/build/lib.linux2-x86_64-2.7:/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/work/corei7-64-poky-linux/python/2.7.9-r1/Python-2.7.9/Lib:/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/work/corei7-64-poky-linux/python/2.7.9-r1/Python-2.7.9/Lib/plat-linux2 python2.7 /home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/work/corei7-64-poky-linux/python/2.7.9-r1/Python-2.7.9/setup.py $quiet build
make: *** [sharedmods] Error 132

If needed, I can make additional experiments.
Regards
Christophe
Comment 3 CB 2016-07-25 19:57:13 UTC
Dear Alejandro

It works correctly under ubuntu OS.....


Regards
Comment 4 Alejandro Hernandez 2016-07-27 16:46:13 UTC
Interesting...

I think I may have access to a CentOS server , I'll give it a try there to see if I can reproduce it.
Comment 5 CB 2016-07-28 17:01:49 UTC
(In reply to comment #4)
> Interesting...
> 
> I think I may have access to a CentOS server , I'll give it a try there to
> see if I can reproduce it.

Dear Alejandro,

My Yocto project works sucessfully on Virtual Machine booting Cento7 OS.

Anyways, under CENTO7 withount virtualization, the problem is confirmed.

So I will do more investigation and I will give you some feedback. 
(For information, Buildroot worked fine).


Regards
Christophe
Comment 6 Alejandro Hernandez 2016-07-28 17:23:30 UTC
Hey Christophe,

This seems really weird, I know it might be a lot to ask, but could you delete your TMPDIR which is directory under your build directory, and try again?, this will force a clean build directory, and this way we can make sure there's no build system polution (since it worked fine under VM).

From what I can tell from your logs, your tmp directory should be something like:

/home/elinux/localbin/minnowboard-turbot/kernel/linux/x86_64-linux/oe-core/build/out/

After doing this, your next build should take a little while longer (since its got to populate your TMPDIR again), but you should be fine as long as yous SSTATE directory is intact.

Let me know how it goes.
Comment 7 CB 2016-07-30 18:18:13 UTC
Hi Alejandro,

I made futher investigations.

I cleaned and/or removed the tmp directory but the yoctoproject still do not work correctly due to the "python" do_install fails.

To comp;ete my analysis, using beaglebone target (ARM) in the same host, yoctoproject works fine.

Using a toradex target (ARM) in the same host, yoctoproject works fine.

My conclusion at that momment (I am not an expert) is that 
on a X86_64 host machine, it seems that targeting x86_64 (minnowboard) do not work properly under CENTO7 . It works correctly under VM (running on x86 host machine).

I think that some parameters passed to do_configure process could be imcompatible when installing python under CENTOS& (x86_64).

If necessary, I can do some additional investigations.

Regards
Christophe
Comment 8 Alejandro Hernandez 2016-08-11 18:05:23 UTC
(In reply to comment #7)
> Hi Alejandro,
> 
> I made futher investigations.
> 
> I cleaned and/or removed the tmp directory but the yoctoproject still do not
> work correctly due to the "python" do_install fails.
> 
> To comp;ete my analysis, using beaglebone target (ARM) in the same host,
> yoctoproject works fine.
> 
> Using a toradex target (ARM) in the same host, yoctoproject works fine.
> 
> My conclusion at that momment (I am not an expert) is that 
> on a X86_64 host machine, it seems that targeting x86_64 (minnowboard) do
> not work properly under CENTO7 . It works correctly under VM (running on x86
> host machine).
> 
> I think that some parameters passed to do_configure process could be
> imcompatible when installing python under CENTOS& (x86_64).
> 
> If necessary, I can do some additional investigations.
> 
> Regards
> Christophe

Hey Christophe

Could you send me the logs of the lastest failed build?
please include the configure, compile and install log

This way I can analyze this further since I am not being able to reproduce this still.
Comment 9 CB 2016-08-12 20:24:30 UTC
Created attachment 3354 [details]
.../corei7-64-poky-linux/python/2.7.9-r1/temp logs

Hi Alejandro,

Please find the logs in the tar file.


If more investigation are needed, I am available.
Regards
Christophe
Comment 10 Alejandro Hernandez 2016-12-06 17:50:34 UTC
I simply can't reproduce the bug, I tried with CentOS7 with no luck either, I can only assume that this is particular to your build environment, maybe related to some changes you made.

$ bitbake python -c install
WARNING: Host distribution "CentOS-Linux-7.2.1511" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##############################################################################################################| ETA:  00:00:00
Loaded 1303 entries from dependency cache.
Parsing recipes: 100% |############################################################################################################| Time: 00:00:00
Parsing of 900 .bb files complete (899 cached, 1 parsed). 1303 targets, 44 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.26.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "CentOS-Linux-7.2.1511"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "intel-corei7-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.8.2"
TUNE_FEATURES     = "m64 corei7"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "fido:c53ddb2006f04051b00df3189fe8d35bb49ef3c7"
meta-intel        = "fido:29a1746ea844e1d99571cbf5533f0ff581191b16"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 388 tasks of which 380 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.