[1/1] python-numpy: fix compile error for qemumips

Submitted by Qi.Chen@windriver.com on Feb. 26, 2014, 7:33 a.m.

Details

Message ID daee4480b735a557aaa314f9a1f9bf6fbb3f9a12.1393399942.git.Qi.Chen@windriver.com
State New
Headers show

Commit Message

Qi.Chen@windriver.com Feb. 26, 2014, 7:33 a.m.
When building python-numpy for qemumips, the following error appeared.

cp: cannot stat `xxx/python-numpy/1.7.0-r1/*config.h': No such file or directory

This is because for qemumips, there are no such files in SRC_URI. And
actually we don't need such files. So for qemumips, the `cp' command
is expected to fail.

The same problem appeared for qemumips64 and qemuppc.

This patch fixes this compiling error.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-devtools/python/python-numpy_1.7.0.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
index 3fa485e..43f5a40 100644
--- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb
+++ b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
@@ -45,7 +45,7 @@  do_compile_prepend_class-target() {
     BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
     ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
     true
-    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ || true
 }
 
 FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"

Comments

Ross Burton Feb. 26, 2014, 10:02 a.m.
On 26 February 2014 07:33, Chen Qi <Qi.Chen@windriver.com> wrote:
> This is because for qemumips, there are no such files in SRC_URI. And
> actually we don't need such files. So for qemumips, the `cp' command
> is expected to fail.

Those files contain the definitions of things like word size and byte
ordering, so unless I've misunderstood the build process for numpy
what's happening with this patch is that it's using the host
environment.

Ross
Qi.Chen@windriver.com Feb. 26, 2014, 10:22 a.m.
On 02/26/2014 06:02 PM, Burton, Ross wrote:
> On 26 February 2014 07:33, Chen Qi <Qi.Chen@windriver.com> wrote:
>> This is because for qemumips, there are no such files in SRC_URI. And
>> actually we don't need such files. So for qemumips, the `cp' command
>> is expected to fail.
> Those files contain the definitions of things like word size and byte
> ordering, so unless I've misunderstood the build process for numpy
> what's happening with this patch is that it's using the host
> environment.
>
> Ross
>
>

Those files are there already.
For archs like x86, we first replace them so that the build process 
doesn't fail (according to the comments in the recipe); but for 
mips/ppc, we don't need to do so, the build just succeeds.

chenqi@pek-hostel-vm07:~/poky/build-qemumips64 [0] $ ls 
tmp/work/mips64-poky-linux/python-numpy/1.7.0-r1/numpy-1.7.0/build/src.linux-i686-2.7/numpy/core/include/numpy/
config.h  __multiarray_api.c  __multiarray_api.h multiarray_api.txt  
_numpyconfig.h  __ufunc_api.c  __ufunc_api.h ufunc_api.txt  
__umath_generated.c

Best Regards,
Chen Qi
Richard Purdie Feb. 26, 2014, 10:44 a.m.
On Wed, 2014-02-26 at 18:22 +0800, ChenQi wrote:
> On 02/26/2014 06:02 PM, Burton, Ross wrote:
> > On 26 February 2014 07:33, Chen Qi <Qi.Chen@windriver.com> wrote:
> >> This is because for qemumips, there are no such files in SRC_URI. And
> >> actually we don't need such files. So for qemumips, the `cp' command
> >> is expected to fail.
> > Those files contain the definitions of things like word size and byte
> > ordering, so unless I've misunderstood the build process for numpy
> > what's happening with this patch is that it's using the host
> > environment.
> >
> > Ross
> >
> >
> 
> Those files are there already.
> For archs like x86, we first replace them so that the build process 
> doesn't fail (according to the comments in the recipe); but for 
> mips/ppc, we don't need to do so, the build just succeeds.
> 
> chenqi@pek-hostel-vm07:~/poky/build-qemumips64 [0] $ ls 
> tmp/work/mips64-poky-linux/python-numpy/1.7.0-r1/numpy-1.7.0/build/src.linux-i686-2.7/numpy/core/include/numpy/
> config.h  __multiarray_api.c  __multiarray_api.h multiarray_api.txt  
> _numpyconfig.h  __ufunc_api.c  __ufunc_api.h ufunc_api.txt  
> __umath_generated.c

Ross' point stands, its just using the values from the host (build)
system. If your build system was mips it might stand a chance of
working, I suspect you're building on x86 though and x86 != mips.

Cheers,

Richard
Qi.Chen@windriver.com Feb. 27, 2014, 3:25 a.m.
On 02/26/2014 06:44 PM, Richard Purdie wrote:
> On Wed, 2014-02-26 at 18:22 +0800, ChenQi wrote:
>> On 02/26/2014 06:02 PM, Burton, Ross wrote:
>>> On 26 February 2014 07:33, Chen Qi <Qi.Chen@windriver.com> wrote:
>>>> This is because for qemumips, there are no such files in SRC_URI. And
>>>> actually we don't need such files. So for qemumips, the `cp' command
>>>> is expected to fail.
>>> Those files contain the definitions of things like word size and byte
>>> ordering, so unless I've misunderstood the build process for numpy
>>> what's happening with this patch is that it's using the host
>>> environment.
>>>
>>> Ross
>>>
>>>
>> Those files are there already.
>> For archs like x86, we first replace them so that the build process
>> doesn't fail (according to the comments in the recipe); but for
>> mips/ppc, we don't need to do so, the build just succeeds.
>>
>> chenqi@pek-hostel-vm07:~/poky/build-qemumips64 [0] $ ls
>> tmp/work/mips64-poky-linux/python-numpy/1.7.0-r1/numpy-1.7.0/build/src.linux-i686-2.7/numpy/core/include/numpy/
>> config.h  __multiarray_api.c  __multiarray_api.h multiarray_api.txt
>> _numpyconfig.h  __ufunc_api.c  __ufunc_api.h ufunc_api.txt
>> __umath_generated.c
> Ross' point stands, its just using the values from the host (build)
> system. If your build system was mips it might stand a chance of
> working, I suspect you're building on x86 though and x86 != mips.
>
> Cheers,
>
> Richard
>
>
>

Ross & Richard,

Thanks for making it clear.
Yesterday, I built it and tested it on target. As some basic tests 
passed, I thought everything was OK.
Now I've checked those files, and obviously I've made a mistake.
I'll rework on this one.

Best Regards,
Chen Qi