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

Error when building on asahi linux (arm linux distribution for macbook air M1) #74

Open
arthuradriaens-code opened this issue Sep 26, 2024 · 2 comments

Comments

@arthuradriaens-code
Copy link

arthuradriaens-code commented Sep 26, 2024

When building from source using make, the following error occurs:

[ 7%] Building CXX object basiclinalg/CMakeFiles/ngbla.dir/ngblas.cpp.o In file included from /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:1, from /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd.hpp:32, from /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/ngcore.hpp:16, from /home/aadriaens/Programs/ngsolve/ngsolve-src/ngstd/ngstd.hpp:33, from /home/aadriaens/Programs/ngsolve/ngsolve-src/basiclinalg/bla.hpp:5, from /home/aadriaens/Programs/ngsolve/ngsolve-src/basiclinalg/ngblas.cpp:3: /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h: In function ‘void ngcore::FMAComplex(SIMD<double, 2>, SIMD<double, 2>, SIMD<double, 2>&)’: /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27541:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_rot90_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27541 | vcmlaq_rot90_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:163:49: note: van hieruit opgeroepen 163 | c = vcmlaq_rot90_f64(tmp, a.Data(), b.Data()); // += i*aim * b | ^ /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27488:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27488 | vcmlaq_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:162:26: note: van hieruit opgeroepen 162 | auto tmp = vcmlaq_f64(c.Data(), a.Data(), b.Data()); // are * b | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27488:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27488 | vcmlaq_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:162:26: note: van hieruit opgeroepen 162 | auto tmp = vcmlaq_f64(c.Data(), a.Data(), b.Data()); // are * b | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27541:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_rot90_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27541 | vcmlaq_rot90_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:163:49: note: van hieruit opgeroepen 163 | c = vcmlaq_rot90_f64(tmp, a.Data(), b.Data()); // += i*aim * b | ^ /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27488:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27488 | vcmlaq_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:162:26: note: van hieruit opgeroepen 162 | auto tmp = vcmlaq_f64(c.Data(), a.Data(), b.Data()); // are * b | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/aarch64-redhat-linux/14/include/arm_neon.h:27541:1: fout: inlining failed in call to ‘always_inline’ ‘float64x2_t vcmlaq_rot90_f64(float64x2_t, float64x2_t, float64x2_t)’: target specific option mismatch 27541 | vcmlaq_rot90_f64 (float64x2_t __r, float64x2_t __a, float64x2_t __b) | ^~~~~~~~~~~~~~~~ /home/aadriaens/Programs/ngsolve/ngsolve-install/include/core/simd_arm64.hpp:163:49: note: van hieruit opgeroepen 163 | c = vcmlaq_rot90_f64(tmp, a.Data(), b.Data()); // += i*aim * b | ^ make[5]: *** [basiclinalg/CMakeFiles/ngbla.dir/build.make:216: basiclinalg/CMakeFiles/ngbla.dir/ngblas.cpp.o] Fout 1 make[4]: *** [CMakeFiles/Makefile2:567: basiclinalg/CMakeFiles/ngbla.dir/all] Fout 2 make[3]: *** [Makefile:146: all] Fout 2 make[2]: *** [CMakeFiles/ngsolve.dir/build.make:89: dependencies/src/ngsolve-stamp/ngsolve-build] Fout 2 make[1]: *** [CMakeFiles/Makefile2:225: CMakeFiles/ngsolve.dir/all] Fout 2 make: *** [Makefile:156: all] Fout 2

is this an issue with ngbla, my arm cpp compiler or my build flags (the only modification to the cmake command I did was to add -DBUILD_OCC=ON)? I'm quite lost on the error description.

Thanks in advance and kind regards

@mhochsteger
Copy link
Member

Hm, seems some intrinsics in the simd functions cannot be inlined.
Does it compile if you remove ((__always_inline__)) from lines 70-73 in ngsolve/external_dependencies/netgen/libsrc/core/ngcore_api.hpp?

@arthuradriaens-code
Copy link
Author

Hello, sorry for the late reply

When I do this I get the error
[ 30%] Built target suitesparse [ 34%] Performing build step for 'netgen_project' make[3]: *** Geen doelen opgegeven en geen Makefile gevonden. Gestopt. make[2]: *** [CMakeFiles/netgen_project.dir/build.make:86: dependencies/src/netgen_project-stamp/netgen_project-build] Fout 2 make[1]: *** [CMakeFiles/Makefile2:146: CMakeFiles/netgen_project.dir/all] Fout 2 make[1]: *** Wachten op onvoltooide taken... [ 34%] Built target check_submodules_start make: *** [Makefile:156: all] Fout 2
Note suitesparse builts succesfully, the first error report translates to "no goals dictated and no make file found" even though the cmake command was ran and a Makefile is present.

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

No branches or pull requests

2 participants