Bug 9009

Summary: Failed to build pyephem on target with tools-sdk installed
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Phlip Balister <philip>
Component: devtools / tool chainAssignee: Alejandro Hernandez <alejandro.hernandez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Phlip Balister 2016-01-27 18:31:26 UTC
I'm trying to build http://rhodesmill.org/pyephem/ on an e310 so I can rnu shiny sdr.

Running python setup.py install led to a "strange" compile error. INvestigation showd that the --sysroot from the build machine was supplied the compiler.

Further poking around showed the source of the sysroot setting:

./armv7ahf-neon-oe-linux-gnueabi/python/2.7.9-r1/image/usr/lib/python2.7/_sysconfigdata.py

Removing the sysroot argument from the file led to a sucessful build and a working shiny sdr!
Comment 1 Alejandro Hernandez 2016-02-10 21:06:39 UTC
I am unable to reproduce this, first of all the recommended method for instaling packages would be using python-setuptools via easy_install or using python-pip, but even if I try to install it by: python setup.py install, I don't get the error you mention, the only difference is that unlike setuptools it doesn't handle dependencies.


root@qemux86:~# easy_install ephem-3.7.6.0.tar.gz 
Processing ephem-3.7.6.0.tar.gz
Writing /tmp/easy_install-MTb97u/ephem-3.7.6.0/setup.cfg

...

creating /usr/lib/python2.7/site-packages/ephem-3.7.6.0-py2.7-linux-i686.egg
Extracting ephem-3.7.6.0-py2.7-linux-i686.egg to /usr/lib/python2.7/site-packages
Adding ephem 3.7.6.0 to easy-install.pth file

Installed /usr/lib/python2.7/site-packages/ephem-3.7.6.0-py2.7-linux-i686.egg
Processing dependencies for ephem==3.7.6.0
Finished processing dependencies for ephem==3.7.6.0

...
Python 2.7.11 (default, Feb 10 2016, 16:51:59) 
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ephem
>>> mars = ephem.Mars()
>>> mars.compute()
>>> print mars.ra, mars.dec
15:10:47.41 -16:17:12.6


Like I said hte only difference if I install it using python setup.py install is that it later complains about libastro-3.7.6 not existing.


Is there anything else that you can mention? such as what is the "strange" compile error message you are seeing?
Comment 2 Phlip Balister 2016-02-10 23:29:37 UTC
Can you take a look at the _sysconfigdata.py in the final root file system? It has build machine paths in it. I'm not much of a python guru, so I do not know if this is a real problem.
Comment 3 Phlip Balister 2016-02-12 19:15:27 UTC
root@ettus-e3xx-sg1:~# vim /usr/lib/python2.7/_sysconfigdata.py

is the file that has build system contamination.
Comment 4 Phlip Balister 2016-02-12 21:31:07 UTC
Can you take a look at the _sysconfigdata.py in the final root file system? It has build machine paths in it. I'm not much of a python guru, so I do not know if this is a real problem.

Also, it looks like 6b918dc24d4ab6dcc3693f7f8a8653535edb58c0 fixed some of the builds system paths in the sysconfig file. Based on what i see in Jethro we can close this bug. I'm still concerned about leaking build system paths into images.
Comment 5 Stephen K Jolley 2016-03-29 18:25:38 UTC
It appears that the requested information has been provided.  Please ask again if that is not the case.
Comment 6 Phlip Balister 2016-04-14 21:07:15 UTC
Problem fixed. Watch the file for further trouble due to build system path contamination