Closed adamjstewart closed 8 months ago
Hello! Thanks for reporting this. I don't have access to an Apple M2 atm, but spack install sleef@master
on x86 seems functional (with same OS and compiler version). Will let you know if I'm able to reproduce on M2.
In the meantime would you be able to provide crash backtrace (.crash)? Maybe a list of dependencies (full spack install log, with steps prior cmake)? What version of XCode are you using? Does updating help?
Here is the version I used
$> /usr/bin/xcodebuild -version
Xcode 15.0.1
Build version 15A507
In the meantime would you be able to provide crash backtrace (.crash)?
Here are all files mentioned in the error message: clang-2023-10-31-131600.000.ips.txt clang-2023-10-31-131600.0002.ips.txt clang-2023-10-31-131600.0003.ips.txt clang-2023-10-31-131600.0004.ips.txt clang-2023-10-31-131600.ips.txt sleefsimdsp-5a4b1a.c.txt sleefsimdsp-5a4b1a.sh.txt
Maybe a list of dependencies (full spack install log, with steps prior cmake)?
> spack spec sleef@master
Input spec
--------------------------------
- sleef@master
Concretized
--------------------------------
- sleef@master%apple-clang@15.0.0~ipo build_system=cmake build_type=Release generator=ninja arch=darwin-sonoma-m2
[+] ^cmake@3.27.6%apple-clang@15.0.0~doc+ncurses+ownlibs build_system=generic build_type=Release arch=darwin-sonoma-m2
[+] ^curl@8.1.2%apple-clang@15.0.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=secure_transport arch=darwin-sonoma-m2
[+] ^gnuconfig@2022-09-17%apple-clang@15.0.0 build_system=generic arch=darwin-sonoma-m2
[+] ^nghttp2@1.52.0%apple-clang@15.0.0 build_system=autotools arch=darwin-sonoma-m2
[+] ^pkgconf@1.9.5%apple-clang@15.0.0 build_system=autotools arch=darwin-sonoma-m2
[+] ^ncurses@6.4%apple-clang@15.0.0~symlinks+termlib abi=none build_system=autotools arch=darwin-sonoma-m2
[+] ^zlib-ng@2.1.3%apple-clang@15.0.0+compat+opt build_system=autotools patches=299b958,86c3f5b,ae9077a,b692621 arch=darwin-sonoma-m2
[+] ^ninja@1.11.1%apple-clang@15.0.0+re2c build_system=generic arch=darwin-sonoma-m2
[-] ^python@3.11.4%apple-clang@15.0.0+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis+optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=darwin-sonoma-m2
[e] ^apple-libuuid@1353.100.2%apple-clang@15.0.0 build_system=bundle arch=darwin-sonoma-m2
[+] ^bzip2@1.0.8%apple-clang@15.0.0~debug~pic+shared build_system=generic arch=darwin-sonoma-m2
[+] ^diffutils@3.9%apple-clang@15.0.0 build_system=autotools arch=darwin-sonoma-m2
[+] ^expat@2.5.0%apple-clang@15.0.0~libbsd build_system=autotools arch=darwin-sonoma-m2
[+] ^gdbm@1.23%apple-clang@15.0.0 build_system=autotools arch=darwin-sonoma-m2
[-] ^gettext@0.21.1%apple-clang@15.0.0+bzip2+curses+git~libunistring+libxml2+tar+xz build_system=autotools arch=darwin-sonoma-m2
[+] ^libiconv@1.17%apple-clang@15.0.0 build_system=autotools libs=shared,static arch=darwin-sonoma-m2
[+] ^libxml2@2.10.3%apple-clang@15.0.0+pic~python+shared build_system=autotools arch=darwin-sonoma-m2
[+] ^tar@1.34%apple-clang@15.0.0 build_system=autotools zip=pigz arch=darwin-sonoma-m2
[+] ^pigz@2.7%apple-clang@15.0.0 build_system=makefile arch=darwin-sonoma-m2
[+] ^zstd@1.5.5%apple-clang@15.0.0+programs build_system=makefile compression=none libs=shared,static arch=darwin-sonoma-m2
[+] ^libffi@3.4.4%apple-clang@15.0.0 build_system=autotools arch=darwin-sonoma-m2
[+] ^libxcrypt@4.4.35%apple-clang@15.0.0~obsolete_api build_system=autotools patches=4885da3 arch=darwin-sonoma-m2
[+] ^perl@5.38.0%apple-clang@15.0.0+cpanm+opcode+open+shared+threads build_system=generic patches=714e4d1 arch=darwin-sonoma-m2
[+] ^berkeley-db@18.1.40%apple-clang@15.0.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=darwin-sonoma-m2
[+] ^openssl@3.1.3%apple-clang@15.0.0~docs+shared build_system=generic certs=mozilla arch=darwin-sonoma-m2
[+] ^ca-certificates-mozilla@2023-05-30%apple-clang@15.0.0 build_system=generic arch=darwin-sonoma-m2
[+] ^readline@8.2%apple-clang@15.0.0 build_system=autotools patches=bbf97f1 arch=darwin-sonoma-m2
[+] ^sqlite@3.42.0%apple-clang@15.0.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=darwin-sonoma-m2
[+] ^xz@5.4.1%apple-clang@15.0.0~pic build_system=autotools libs=shared,static arch=darwin-sonoma-m2
[+] ^re2c@2.2%apple-clang@15.0.0 build_system=generic arch=darwin-sonoma-m2
What version of XCode are you using?
> /usr/bin/xcodebuild -version
Xcode 15.0.1
Build version 15A507
Does updating help?
Already up-to-date.
Thanks! There seems to be quite a few bugs flagged on Sonoma lately, so since this looks like a compiler error I would recommend filing a report to Apple Clang directly (as suggested by the error message). You will increase your chances to get a fix soon. In the meantime we will try to reproduce and maybe find a workaround.
Filed a report.
Finally got a reply from Apple 3 months later:
We’ve seen this issue with sleef before. The problem is you're trying to build with SVE on Darwin, which isn’t supported. Even if you could successfully build it, it won’t run because no Mac has SVE hardware.
Is there a CMake flag to disable SVE?
Hello! Sorry for the late reply. You might have found your answer already but yes there is a flag to disable SVE, simply pass -DSLEEF_DISABLE_SVE=ON
to cmake. We can try to integrate that to the build system.
Thanks, this worked great to build the master branch.
Unfortunately it doesn't work to build e0a003ee838b75d11763aa9c3ef17bf71a725bff, which is the version used by PyTorch. Maybe this flag didn't exist at the time? Was there a different flag available?
Ah, looks like it was previously called DISABLE_SVE
, let me try that.
Yes, this worked great! I'll keep this issue open until your CMake configuration is able to auto-detect whether or not SVE is supported.
Cheers! Will try to sort that out ASAP.
Merged #512. Let me know if this is good for you, and please close issue! Cheers for the precious help on this!
Confirmed that the build works out of the box now (barring my other issues #458 and #475). Thanks for the fix!
I'm seeing a segfault when building from the master branch:
See the full build log: spack-build-out.txt
I'm on macOS Sonoma 14.0 (Apple M2 Pro, arm64) using Apple Clang 15.0.0.