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

Julia fails to build on M1, MacOS 12.0 Beta6 #42184

Closed
jeremiahpslewis opened this issue Sep 9, 2021 · 7 comments · Fixed by #42293
Closed

Julia fails to build on M1, MacOS 12.0 Beta6 #42184

jeremiahpslewis opened this issue Sep 9, 2021 · 7 comments · Fixed by #42293
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

Comments

@jeremiahpslewis
Copy link
Sponsor Contributor

jeremiahpslewis commented Sep 9, 2021

Commit hash: bea33d61de0200ac026dd637864356a15bda2d91; though the issue has been going on for days / prev commits; on 11.x, had no trouble successfully building in the past.

>  versioninfo()

Platform Info:
  OS: macOS (arm64-apple-darwin20.5.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

Build output (on a clean repo; make cleanall does not resolve the issue):

...
ordering.jl
sort.jl
fastmath.jl
Enums.jl
gmp.jl
ryu/Ryu.jl
ryu/utils.jl

signal (10): Bus error: 10
in expression starting at ryu/utils.jl:347
__gmpn_mul_1 at /Users/jeremiahlewis/git/julia/usr/lib/libgmp.10.dylib (unknown line)
Allocations: 22116735 (Pool: 22110768; Big: 5967); GC: 27
/bin/sh: line 1: 10971 Bus error: 10           JULIA_BINDIR=/Users/jeremiahlewis/git/julia/usr/bin WINEPATH="/Users/jeremiahlewis/git/julia/usr/bin;$WINEPATH" /Users/jeremiahlewis/git/julia/usr/bin/julia -g1 -O0 -C "apple-a12" --output-ji /Users/jeremiahlewis/git/julia/usr/lib/julia/sys.ji.tmp --startup-file=no --warn-overwrite=yes --sysimage /Users/jeremiahlewis/git/julia/usr/lib/julia/corecompiler.ji sysimg.jl ./
*** This error might be fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: *** [/Users/jeremiahlewis/git/julia/usr/lib/julia/sys.ji] Error 1
make: *** [julia-sysimg-ji] Error 2
@mryodo
Copy link

mryodo commented Sep 10, 2021

Same behaviour for me (either with 1.7.0 from source or the latest commit on master).
You may want to check if this workaround okay for you (for me it does not help, but still)
Also maybe related to #42176

@clason
Copy link

clason commented Sep 10, 2021

Are you using the beta Developer Tools, too (clang 13)? I suspect that rather than the OS beta is the issue. (You can keep using the released, clang 12, Tools under Monterey just fine.)

@mryodo
Copy link

mryodo commented Sep 10, 2021

thanks for the reply!
for me it is not the case, i'm already on clang 12:

❯ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@jeremiahpslewis
Copy link
Sponsor Contributor Author

Same for me.

@mryodo
Copy link

mryodo commented Sep 13, 2021

Has anybody found any workarounds, at least temporary?
Can not find any version of clang that julia builds!

@mryodo
Copy link

mryodo commented Sep 15, 2021

maybe a relevant info: v1.6.2 works fine under rosetta with clang@12.0.5
so that's the native version that fails...

@domschl
Copy link

domschl commented Sep 17, 2021

The GMP library Julia is using needs a patch for ARM64 since Beta-6:

https://gmplib.org/repo/gmp/raw-rev/5f32dbc41afc

See also homebrew: https://github.com/Homebrew/homebrew-core/pull/84728/files

@vchuravy vchuravy added system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips backport 1.7 external dependencies Involves LLVM, OpenBLAS, or other linked libraries and removed backport 1.7 labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependencies Involves LLVM, OpenBLAS, or other linked libraries system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants