macOS "building for macOS-x86_64 but attempting to link with file built for unknown-arm64"
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 346
- PR merge metrics
- No merged PRs in 30d
Description
I was recently working on an erasure coding project that was based on this ISA-L library. Everything was going fine, and I was just debugging for a while and then I left the project for about one day. Then the next day when I got back to it I ran into the error listed below. I hadn't made any changes to the code or to my Mac that I know of between the time I was off.
So I tried to start simple so I cloned the original ISA-L library again and tried to build again. Then, when I ran `make` I got the same errors again.
I'm running on macOS Monterey 12.5 with the M1 Apple chip.
Here is the full display of the error message:
```
/Library/Developer/CommandLineTools/usr/bin/make --no-print-directory all-am
CCLD libisal.la
ld: warning: -undefined dynamic_lookup is incompatible with dyld share cache
ld: warning: ignoring file raid/.libs/raid_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file erasure_code/.libs/ec_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file crc/.libs/crc_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/hufftables_c.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file crc/.libs/crc64_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/igzip.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/adler32_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/encode_df.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/igzip_icf_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/flatten_ll.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/igzip_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/igzip_icf_body.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/huff_codes.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file mem/.libs/mem_zero_detect_base.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file igzip/.libs/igzip_inflate.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: -undefined dynamic_lookup cannot be used to find '_ec_encode_data_base' in dylib in dyld shared cache for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libisal.la] Error 1
make: *** [all] Error 2
```
I have tried multiple solutions online, but none of them seem to work. Does anybody know how to fix this issue?
Contributor guide
Assessment
This issue has not been assessed yet.