Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

scipy as native package #5

Open
yohboy opened this issue Mar 30, 2020 · 10 comments
Open

scipy as native package #5

yohboy opened this issue Mar 30, 2020 · 10 comments

Comments

@yohboy
Copy link

yohboy commented Mar 30, 2020

Hi, I'm trying to build scikit learn for my device and scikit uses scipy. Your layer helps me a lot to cross compile scipy, however, when trying to build scikit learn, I still got some errors such as 'no scipy module' ... I believe I need to build scipy as native package too, and then I can cross compile scikit too.
Did you try to build scikit ? Or maybe do you have any idea how to build scipy as native package ? Just adding BBCLASSEXTEND+="native" gives me some complications.

@gpanders
Copy link
Owner

Unfortunately, I did not try to build scikit (or native scipy) as that is not a requirement on the project for which I had to build scipy.

This recipe is at a point that satisfies my project requirements, so I will not personally be making any further changes to it (except to fix bugs I might come across). However, this repository serves as a community effort for all OpenEmbedded scipy solutions, so I am happy to accept contributions and pull requests. If you do get scikit/native scipy to work, please consider contributing your changes!

@jerrylogansquare
Copy link

jerrylogansquare commented Jul 31, 2020

Thanks to this repo i was able to get scipy and scikit-learn working on NXP LS1043A (aarch64 cross compile), i'll put some info here soon.

@jerrylogansquare
Copy link

jerrylogansquare commented Sep 3, 2020

`
SRC_URI += "file://OEToolchainConfig.cmake \

        file://environment.d-cmake.sh \

        file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \

        file://0001-FortranCInterface-Fix-broken-search-for-test-exe-whe.patch \

        file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \

        "

`

I had to add this FortranCInterface patch for meta/recipes-devtools/cmake/cmake-native_3.15.3.bb

@jwinarske
Copy link

@gpanders
Copy link
Owner

gpanders commented Dec 8, 2020 via email

@jwinarske
Copy link

I missed your dunfell branch!

@nandra
Copy link

nandra commented Jan 21, 2021

Hi. I'm also trying to use dunfell branch to build scikit and for taht scipy-native should be build. But I'm getting following problem:

building 'dfftpack' library
| compiling Fortran sources
| Fortran f77 compiler: /home/ubuntu/projects/test/build/tmp/hosttools/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops -march=armv8-a+crc
| Fortran f90 compiler: gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops -march=armv8-a+crc
| Fortran fix compiler: gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops -march=armv8-a+crc
| creating /home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/build/temp.linux-x86_64-3.8
| creating /home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/build/temp.linux-x86_64-3.8/scipy
| creating /home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/build/temp.linux-x86_64-3.8/scipy/fftpack
| creating /home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/build/temp.linux-x86_64-3.8/scipy/fftpack/src
| creating /home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/build/temp.linux-x86_64-3.8/scipy/fftpack/src/dfftpack
| compile options: '-I/home/ubuntu/projects/test/build/tmp/work/x86_64-linux/python3-scipy-native/1.3.3-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/numpy/core/include -c'
| gfortran:f77: scipy/fftpack/src/dfftpack/dcosqi.f
| gfortran:f77: scipy/fftpack/src/dfftpack/dcosqb.f
| gfortran:f77: scipy/fftpack/src/dfftpack/dcost.f
| f951: Error: bad value (‘armv8-a+crc’) for ‘-march=’ switch

Does anybody have a fix for that issue (seems that not correct arch is propagated to x86_64 build)? Thanks.

@nandra
Copy link

nandra commented Jan 21, 2021

Thanks to this repo i was able to get scipy and scikit-learn working on NXP LS1043A (aarch64 cross compile), i'll put some info here soon.

Do you have somewhere your work pushed for sharing? Thanks.

@nandra
Copy link

nandra commented Jan 22, 2021

OK after combining this layer + https://github.com/tuxable-ltd/meta-scikit-learn I have scikit learn on dunfell compiled. I need to check if it will on target (my target is 64 bit) and then I'll share. Thanks.

@nandra
Copy link

nandra commented Jan 25, 2021

Please see #15

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants