Skip to content

Fail to build on Mac M2 #32

@skmkt

Description

@skmkt

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 {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions