Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compiling SciPy fails while importing numpy.distutils.core #8226

Closed
Westranger opened this issue Dec 18, 2017 · 7 comments
Closed

Cross compiling SciPy fails while importing numpy.distutils.core #8226

Westranger opened this issue Dec 18, 2017 · 7 comments
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS

Comments

@Westranger
Copy link

Westranger commented Dec 18, 2017

I'm trying to build SciPy with Bitbake for Yocto(Rocko) with the following recipe:

SUMMARY = "Scientific Library for Python"
SECTION = "devel/python"
HOMEPAGE = "https://pypi.python.org/pypi/scipy"

LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d0db8f4148a3d5534cfb93be78f9287c"

PYPI_PACKAGE="scipy"

SRC_URI[md5sum] = "53fa34bd3733a9a4216842b6000f7316"
SRC_URI[sha256sum] = "87ea1f11a0e9ec08c264dc64551d501fa307289460705f6fccd84cbfc7926d10"

inherit pypi setuptools distutils

RDEPENDS_${PN} += "python-core python-numpy-native python-distutils"
DEPENDS += "python-numpy"

but it fails with the following error

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: python-scipy-1.0.0-r0 do_compile: python setup.py build execution failed.
ERROR: python-scipy-1.0.0-r0 do_compile: Function failed: do_compile (log file is located at /home/somewhere_in_my_home_folder/build_dir/tmp/work/core2-64-idp-linux/python-scipy/1.0.0-r0/temp/log.do_compile.2788)
ERROR: Logfile of failure stored in: /home/somewhere_in_my_home_folder/build_dir/tmp/work/core2-64-idp-linux/python-scipy/1.0.0-r0/temp/log.do_compile.2788
Log data follows:
| DEBUG: Executing shell function do_compile
| Traceback (most recent call last):
|   File "setup.py", line 418, in <module>
|     setup_package()
|   File "setup.py", line 398, in setup_package
|     from numpy.distutils.core import setup
| ImportError: No module named numpy.distutils.core
| ERROR: python setup.py build execution failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/somewhere_in_my_home_folder/build_dir/tmp/work/core2-64-idp-linux/python-scipy/1.0.0-r0/temp/log.do_compile.2788)
ERROR: Task (/home/somewhere_in_my_home_folder/recipes-ros/python-scipy/python-scipy_1.0.0.bb:do_compile) failed with exit code '1'

I looked into the setup.py from scipy and to me it looks that numpy can be imported but not the numpy.distutils.core module
The numpy version is the default recipe which comes with Rocko. I also posted my problem on SO which let me here.

@ilayn
Copy link
Member

ilayn commented Dec 18, 2017

Hi @Westranger this is more of a NumPy issue with bootstrapping. You can start from this thread

@Westranger
Copy link
Author

Hi @ilayn I don't understand. I'm just downloading scipy from git hub an run the setup.py and then this error occours, but numpy is defenitliy correctly installed. It works on my machine properly, but when I run the bitbake recipe it does not. I also debugged the recive and internally everything looks to be in place.

@ilayn
Copy link
Member

ilayn commented Dec 18, 2017

Have a look at the comment under the thread I've linked above.

@Westranger
Copy link
Author

I looked into the "there is no standard solution" link and also into the answers. This means that I need to fool the setup proccess. So I need to modify the setup.py from scipy ? I already tried adding the code from the most upvoted answer but it does not work. How can I debug such a process ?

@ilayn
Copy link
Member

ilayn commented Dec 19, 2017

I have a semi-answer but I'm not sure about the NumPy side so I don't want to confuse you further.

Let's summon some other residents with build expertise instead @pv @rgommers @xoviat @matthew-brett and whoever else feels like it.

@ghost
Copy link

ghost commented Dec 31, 2017

Bitbake is required to provide all dependencies specified in pyproject.toml before calling setup.py. Bitbake failed to do so, and as such, this is a bitbake bug.

Note that pip also has this bug, but the pip maintainers rejected my attempts to fix the problem.

@rgommers rgommers added the Build issues Issues with building from source, including different choices of architecture, compilers and OS label Jan 19, 2018
@rgommers
Copy link
Member

not a scipy issue, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS
Projects
None yet
Development

No branches or pull requests

3 participants