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

Fail to build on Mac M2 #32

Open
skmkt opened this issue Apr 15, 2024 · 0 comments
Open

Fail to build on Mac M2 #32

skmkt opened this issue Apr 15, 2024 · 0 comments

Comments

@skmkt
Copy link

skmkt commented Apr 15, 2024

Build step

mkdir build
cd build
cmake ..
make

Error log

/src/cpu/loongarch_utils.h:17:10: fatal error: 'sys/auxv.h' file not found
#include <sys/auxv.h>
         ^~~~~~~~~~~~
1 error generated.

Possible fix

diff --git a/src/cpu/loongarch_utils.h b/src/cpu/loongarch_utils.h
index b69694d..571e83f 100644
--- a/src/cpu/loongarch_utils.h
+++ b/src/cpu/loongarch_utils.h
@@ -14,7 +14,9 @@
 #include <cstddef>
 #include <cstdint>
 #include <cstdio>
+#if !defined(__APPLE__)
 #include <sys/auxv.h>
+#endif

 namespace megpeak {
 enum class SIMDType {
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

1 participant