交叉编译scipy for open-embedded

时间:2017-12-12 10:56:05

标签: python scipy yocto bitbake openembedded

我正在尝试编译 - 编译scipy for open-embedded但是bitbake构建失败并出现错误

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'

我已经花了几个小时搜索有效的食谱,但没有任何成功。我发现这个错误的唯一方法是here

我的食谱看起来像这样

DESCRIPTION = "SciPy"
SECTION = "devel/python"
LICENSE = "CLOSED"

PYPI_PACKAGE = "scipy"
inherit pypi setuptools distutils

DEPENDS_${PN} = "python-numpy python-setuptools python-distutils"
RDEPENDS_${PN} = "python-numpy python-setuptools python-distutils"

S = "${WORKDIR}/scipy-1.0.0"

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

关于如何交叉编译scipy oder关于如何修复此错误的任何想法?

编辑1:

我改变了我的食谱

DESCRIPTION = "SciPy"
SECTION = "devel/python"
LICENSE = "CLOSED"

PYPI_PACKAGE = "scipy"

DEPENDS_${PN} = "python-numpy python-setuptools python-distutils"
RDEPENDS_${PN} = "python-numpy python-setuptools python-distutils"

S = "${WORKDIR}/scipy-1.0.0"

PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"

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

FILES_python-scipy+="/usr/lib/* /usr/lib/python2.7/*"
FILES_python-scipy-dev+="/usr/share/pkgconfig   /usr/lib/pkgconfig   /usr/lib/python2.7/site-packages/*.la "
FILES_python-scipy-staticdev+="/usr/lib/python2.7/site-packages/*.a "

inherit pypi ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}

但现在我在构建主图像时遇到错误

No package python-scipy available.
Error: Unable to find a match

1 个答案:

答案 0 :(得分:0)

这种食谱应该足以使SciPy发挥作用:

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 python-distutils"
DEPENDS += "python-numpy"

如果失败,您可以尝试替换 DEPENDS += "python-numpy" DEPENDS += "python-numpy-native"。如果它仍然失败,您应该在SciPy github上创建问题或尝试修补安装文件,您可以看到示例here