The Wayback Machine - https://web.archive.org/web/20210418121518/https://github.com/JuliaLang/julia/issues/36617
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

Darwin/ARM64 tracking issue #36617

Open
Keno opened this issue Jul 11, 2020 · 112 comments
Open

Darwin/ARM64 tracking issue #36617

Keno opened this issue Jul 11, 2020 · 112 comments

Comments

@Keno
Copy link
Member

@Keno Keno commented Jul 11, 2020

I figured it would be worth having a single issue to track all the known issues on Apple Silicon. I'll try to keep this list updated as things get fixed or people encounter additional issues.

      From worker 14:	While deleting: i8* %splitgep
      From worker 14:	An asserting value handle still pointed to this value!
      From worker 14:	UNREACHABLE executed at /Users/julia/julia/deps/srccache/llvm-10.0.0/lib/IR/Value.cpp:917!
      From worker 14:	
      From worker 14:	signal (6): Abort trap: 6
      From worker 14:	in expression starting at /Users/julia/julia/usr/share/julia/stdlib/v1.6/LinearAlgebra/test/diagonal.jl:11
  • Some sort of (intermittent) issue during precompile:
Generating REPL precompile statements... 22/28ERROR: LoadError: IOError: stream is closed or unusable
  • Test failure in worlds test:
worlds                             (4) |         failed at 2020-11-13T00:31:04.270
On worker 4:
BoundsError: attempt to access 3-element BitVector at index [0:3]
  • Test failure in numbers test (related to SIGFPE handling) (#39894):
Worker 6 terminated.
numbers                            (6) |         failed at 2020-11-13T00:31:34.703
ProcessExitedException(6)
  • Segfault in complex test:
    complex (2) | started at 2020-11-13T00:39:12.332
      From worker 2:	
      From worker 2:	signal (11): Segmentation fault: 11
      From worker 2:	in expression starting at /Users/julia/julia23/test/complex.jl:30
      From worker 2:	jl_method_error_bare at /Users/julia/julia23/usr/lib/libjulia.1.6.dylib (unknown line)
      From worker 2:	jl_method_error at /Users/julia/julia23/usr/lib/libjulia.1.6.dylib (unknown line)
      From worker 2:	jl_apply_generic at /Users/julia/julia23/usr/lib/libjulia.1.6.dylib (unknown line)
      From worker 2:	do_call at /Users/julia/julia23/usr/lib/libjulia.1.6.dylib (unknown line)
  • Test failures in complex test (filed as #38419)
  • Several tests run forever:
LinearAlgebra/triangular (running for 61 minutes)
LinearAlgebra/addmul (running for 55 minutes)
bitarray (running for 53 minutes)
iterators (running for 52 minutes)
ccall (running for 39 minutes)
loading (running for 39 minutes)
sorting (running for 24 minutes)
  • Test failure in inference
compiler/inference                 (5) |         failed at 2020-11-13T01:24:18.980
Test Failed at /Users/julia/julia23/test/compiler/inference.jl:944
  Expression: break_21369()
    Expected: ErrorException
      Thrown: BoundsError
  • Build system hacks since we don't have a native GCC toolchain built (#38421)
  • Some sort of segfault in debug build (filed as #39818):
signal (11): Segmentation fault: 11
in expression starting at REPL[1]:1
jfptr_LinearIndices_7740 at /Users/julia/julia-master/usr/lib/julia/sys-debug.dylib (unknown line)
_jl_invoke at /Users/julia/julia-master/src/gf.c:2223
jl_apply_generic at /Users/julia/julia-master/src/gf.c:2424
ssa_substitute_op! at ./compiler/ssair/inlining.jl:1432
ssa_substitute! at ./compiler/ssair/inlining.jl:1406 [inlined]
ir_inline_item! at ./compiler/ssair/inlining.jl:369
batch_inline! at ./compiler/ssair/inlining.jl:553
signal (11): Segmentation fault: 11
in expression starting at none:0
<= at ./int.jl:444 [inlined]
>= at ./operators.jl:409 [inlined]
unitrange_last at ./range.jl:359 [inlined]
UnitRange at ./range.jl:354 [inlined]
  • Unwinding from JIT frames doesn't work
  • Integer printing is broken under make debug (#39823)
julia> typemin(Int32)
2147483648
  • LLVM Assertion failure in iterators/bitarray test
      From worker 4:	Assertion failed: (isInt<33>(Addend) && "Invalid page reloc value."), function encodeAddend, file /Users/julia/julia-master/deps/srccache/llvm-11.0.1/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h, line 210.
      From worker 4:	
      From worker 4:	signal (6): Abort trap: 6
      From worker 4:	in expression starting at /Users/julia/julia-master/test/iterators.jl:343
      From worker 4:	__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
      From worker 4:	Allocations: 962963350 (Pool: 962516480; Big: 446870); GC: 662
Worker 4 terminated.
iterators                          (4) |         failed at 2021-02-25T16:52:13.534
  • Artifacts test needs updating (#39829)
  • LibCURL tests fail:
LibCURL                           (24) |         failed at 2021-02-25T17:03:28.235
Error During Test at /Users/julia/julia-master/usr/share/julia/stdlib/v1.7/LibCURL/test/runtests.jl:34
  Got exception outside of a @test
  SSL peer handshake failed, the server most likely requires a client certificate to connect while requesting https://github.com/JuliaWeb/LibCURL.jl/blob/master/README.md
Test Failed at /Users/julia/julia-master/usr/share/julia/stdlib/v1.7/LibCURL/test/ssl.jl:32
  Expression: res == CURLE_OK
   Evaluated: 0x00000023 == 0x00000000
@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

Is the compiler enabling all the features available by default?

In another word, does it pass

# ifdef __ARM_FEATURE_CRC32
by default? Or do we have to do a +crc one way or another ourselves.
@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

Here's what's enabled by default:

#define __ARM64_ARCH_8__ 1
#define __ARM_64BIT_STATE 1
#define __ARM_ACLE 200
#define __ARM_ALIGN_MAX_STACK_PWR 4
#define __ARM_ARCH 8
#define __ARM_ARCH_ISA_A64 1
#define __ARM_ARCH_PROFILE 'A'
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CRYPTO 1
#define __ARM_FEATURE_DIRECTED_ROUNDING 1
#define __ARM_FEATURE_DIV 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_LDREX 0xF
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_UNALIGNED 1
#define __ARM_FP 0xE
#define __ARM_FP16_ARGS 1
#define __ARM_FP16_FORMAT_IEEE 1
#define __ARM_NEON 1
#define __ARM_NEON_FP 0xE
#define __ARM_NEON__ 1
#define __ARM_PCS_AAPCS64 1
#define __ARM_SIZEOF_MINIMAL_ENUM 4
#define __ARM_SIZEOF_WCHAR_T 4

Since I doubt there'll be a mac without crc32, we should just add that to the default feature flags in our Makefile. For everything else we can do runtime detection with sysctl.

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

I'm surprised that it enables crypto but not crc.... Yeah, I don't think it's worth doing a runtime detection here.

And from #36592 (comment) it doesn't seem to provide all the features that LLVM may use

The features detectable currently appears to be

hw.optional.neon_fp16: fullfp16
hw.optional.armv8_1_atomics: lse
hw.optional.armv8_crc32: crc
hw.optional.armv8_2_fhm: fp16fml
__ARM_FEATURE_CRYPTO (compile time): aes, sha2

The ones that should be supported on that CPU (all requirement from armv8.3-a) are jsconv, complxnum, rcpc, ccpp, rdm. Some of the floating point ones are quite intereting.

Also intereting that since fp16fml is reported the featureset is closer to that of a13 than a12. (that or the LLVM feature set for a12 is wrong...)


Anyway, this is probably a low priority item...

@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

Looks like they're just shipping an old LLVM, e.g. if I try to build jsconv (just to see whether it would run) fatal error: error in backend: Cannot select: intrinsic %llvm.aarch64.fjcvtzs

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

Huh, which LLVM version do they have? Over at

JL_FEATURE_DEF(jsconv, 13, 0) // HWCAP_JSCVT. Required in ARMv8.3
I was assuming as long as the feature is available in AArch64.td it's usable... Is that not the case? (and/or is that a mac only problem?)
@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

Huh, which LLVM version do they have

I don't know. It claims to be LLVM 12, but Apple lies about versions. I'm building upstream clang now to try it out.

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

It also seems that although the feature was added in https://reviews.llvm.org/D54633 which is in LLVM 8.0 the intrinsic wasn't added until https://reviews.llvm.org/D64495 much later. Does that error mean that it's a recognized intrinsic but just isn't supported by the backend? I guess just writing inline assembly shoud be good enough for testing.

@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

Fails upstream too.

@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

Works with raw llc and +mattr though, so I'm gonna say it does exist.

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

... I thought the error you got is a backend one..... (so llc should behave the same as clang = = ....., unless clang emits the wrong IR...)

@Keno
Copy link
Member Author

@Keno Keno commented Jul 11, 2020

I manually added the correct mattr to llc. I also managed to get it to work with -mcpu=apple-a12 at the clang level (appears to default to apple-a7). I filed an issue with Apple to get a better error message as well as bumping the default.

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 11, 2020

Ah, OK. So you didn't set the target when running with clang.

@Keno
Copy link
Member Author

@Keno Keno commented Jul 12, 2020

I tried, but mattr=armv8.3-a+jsconv didn't seem to do it.

@yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Jul 18, 2020

  From worker 14:	While deleting: i8* %splitgep
  From worker 14:	An asserting value handle still pointed to this value!
  From worker 14:	UNREACHABLE executed at /Users/julia/julia/deps/srccache/llvm-10.0.0/lib/IR/Value.cpp:917!

Ah, this is where I've seen this issue... It's not Darwin or ARM/AArch64 specific and it's fixed by https://reviews.llvm.org/D84031

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Jul 19, 2020

Can we get a BB shard going without the Fortran compiler, and see how much of the BB ecosystem can be built?

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Aug 7, 2020

Just thinking out aloud here. The major use of Fortran in the julia build is to build LAPACK (part of the openblas build). We could have a Fortran to Julia translator and move LAPACK to Julia. Of course BB has a bunch of other fortran libraries, and there's lot of commercial software packages that need fortran compilers.

@certik
Copy link
Contributor

@certik certik commented Aug 14, 2020

We could have a Fortran to Julia translator and move LAPACK to Julia.

If anyone is interested in helping, I'll be happy to add and maintain Fortran to Julia translator in LFortran. We already have LLVM and C++ backends. It took us quite some time to get to this point, as a lot of infrastructure had to be figured out and implemented, but we now have a foundation of a production C++ implementation of the compiler and are making rapid progress in adding features. As an example of what works already, this Fortran code:

https://gitlab.com/lfortran/lfortran/-/blob/7384b0ff81eaa2043281e48ae5158d34fcbf26f6/integration_tests/arrays_04.f90

gets correctly translated to this C++ code (and it compiles and runs):

https://gitlab.com/lfortran/lfortran/-/blob/master/tests/reference/cpp-arrays_04-ae9bd17.stdout

The C++ translator itself is implemented here: https://gitlab.com/lfortran/lfortran/-/blob/7384b0ff81eaa2043281e48ae5158d34fcbf26f6/src/lfortran/codegen/asr_to_cpp.cpp, as you can see it is a simple visitor pattern over the Abstract Semantic Representation (ASR) which contains all the types and everything is figured out and ready for LLVM or C++ translation.

I don't like making predictions how long it will take us to be able to compile Lapack, but I am hoping it is in the range of months now.

Assuming we could translate Lapack to C++ (or Julia also) automatically and correctly and quickly in a few months, what would be the workflow?

I can imagine two workflows in the future:

  • You translate once and just maintain the resulting code in C++ (or Julia). We will try to ensure the translator produces a nice readable and maintainable C++ code.

  • You keep Lapack in Fortran, but translate each new version to C++ or Julia. That way when upstream makes some changes, you will get them.

Regarding speed and performance of the translated code, that is currently unclear to me whether there can be some obstacle that would prevent it to match the performance of the original Fortran code. But we will find out, and I would think it should be possible to translate in a way to keep the performance.

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Aug 14, 2020

LAPACK will keep moving upstream. So we have to keep running the translator on any new version - perhaps could even be integrated into BinaryBuilder. Performance shouldn't be a major problem - since 90% of the performance is anyways from calling the BLAS. The main problem will be testing correctness. Presumably the LAPACK tests translated + Julia tests may be sufficient to get started.

@certik
Copy link
Contributor

@certik certik commented Aug 14, 2020

@ViralBShah that makes sense. Regarding correctness: my goal is for people to use LFortran as a regular Fortran compiler via LLVM, which will ensure that the parsing -> AST -> ASR -> LLVM is all correct. The ASR -> C++ backend is thus starting from a well tested starting point (ASR) that has been exercised well via the LLVM route, so there will be bugs, but they will be well isolated, and engineering-wise I think this can be delivered and made robust. The ASR -> Julia backend would be similar.

I am very excited about this, and I will keep you updated. As I said, it will take us probably months to get something initially usable, and then it takes time to mature everything, so I don't want to give you false hope that it can fix your immediate problem; but I will work towards this, I think it will become very useful to a lot of people once it matures.

@Keno
Copy link
Member Author

@Keno Keno commented Aug 14, 2020

I think for actively developed upstream projects, we'd rather just use lfortran as a straight LLVM compiler. The automatic translation part mostly makes sense where people want to do new development in Julia.

@claui
Copy link

@claui claui commented Sep 4, 2020

Just learned that there’s some ongoing effort at porting the GCC backend: https://github.com/iains/gcc-darwin-arm64

@Keno
Copy link
Member Author

@Keno Keno commented Sep 4, 2020

Yep, we're on top of it (JuliaPackaging/Yggdrasil#1626), thanks!

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Nov 11, 2020

Should LLVM9 process ARM64 relocations incorrectly be marked done, since the linked PR is merged?

@Keno
Copy link
Member Author

@Keno Keno commented Nov 13, 2020

I've updated the tracking list with all items I currently know about.

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Nov 13, 2020

I wonder how well Julia will run on Rossetta 2.

@Keno
Copy link
Member Author

@Keno Keno commented Nov 13, 2020

Works ok, but at reduced perf of course.

@storopoli
Copy link

@storopoli storopoli commented Feb 23, 2021

@staticfloat, well that worked! But know I cannot add Pkgs:

              _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.0-DEV.605 (2021-02-23)
 _/ |\__'_|_|_|\__'_|  |  sf/apple_silicon_latest/e23ea66764 (fork: 6 commits, 0 days)
|__/                   |

(@v1.7) pkg> up
  Installing known registries into `~/.julia`
     Cloning registry from "https://github.com/JuliaRegistries/General.git"
       Added registry `General` to `~/.julia/registries/General`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/.julia/environments/v1.7/Project.toml`
  No Changes to `~/.julia/environments/v1.7/Manifest.toml`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/.julia/environments/v1.7/Project.toml`
  No Changes to `~/.julia/environments/v1.7/Manifest.toml`

(@v1.7) pkg> add Distributions
   Resolving package versions...
ERROR: KeyError: key UUID("2f01184e-e22b-5df5-ae63-d93ebab69eaf") not found
Stacktrace:
  [1] getindex
    @ ./dict.jl:482 [inlined]
  [2] deps_graph(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, uuid_to_name::Dict{Base.UUID, String}, reqs::Dict{Base.UUID, Pkg.Versions.VersionSpec}, fixed::Dict{Base.UUID, Pkg.Resolve.Fixed}, julia_version::VersionNumber)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:415
  [3] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:341
  [4] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1159
  [5] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1130
  [6] _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1165
  [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1181
  [8] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/API.jl:270
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/API.jl:146
 [10] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/API.jl:143
 [11] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/REPLMode/REPLMode.jl:407
 [12] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/REPLMode/REPLMode.jl:385
 [13] do_cmd
    @ ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/REPLMode/REPLMode.jl:376 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode ~/Desktop/julia/usr/share/julia/stdlib/v1.7/Pkg/src/REPLMode/REPLMode.jl:549
 [15] #invokelatest#2
    @ ./essentials.jl:714 [inlined]
 [16] invokelatest
    @ ./essentials.jl:712 [inlined]
 [17] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/Desktop/julia/usr/share/julia/stdlib/v1.7/REPL/src/LineEdit.jl:2441
 [18] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/Desktop/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:1126
 [19] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:406

Edit: if it helps I cannot add Pkg to use Pkg.add("Pkg") to add Pkg😱 (meta nightmare):

julia> import Pkg
ERROR: ArgumentError: Package Pkg not found in current path:
- Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.

Stacktrace:
 [1] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:871
@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Feb 23, 2021

Do note that even once you can add packages, there is work to be done to build binaries for arm64/mac on BinaryBuilder. All the tooling is in place - but probably needs to be updated and various builds need to be kicked off.

@storopoli
Copy link

@storopoli storopoli commented Feb 23, 2021

Thanks for the clarification. I did not know that.

@alecloudenback
Copy link
Contributor

@alecloudenback alecloudenback commented Feb 24, 2021

FWIW I built with @staticfloat's branch and was able to install packages.

@staticfloat
Copy link
Member

@staticfloat staticfloat commented Feb 24, 2021

@storopoli you can try again with the latest push to that branch (just re-run the snippet I posted) which should get pure-Julia versions of packages installing just fine. Things that rely on 3rd-party binary dependencies (including, unfortunately, Distributions, which relies upon StatsFuns which relies on Rmath_jll) may or may not work at the moment, this is going to be one of those organic things where over the next few weeks the number of packages that work on Apple silicon will continually expand.

@mohamed82008
Copy link
Contributor

@mohamed82008 mohamed82008 commented Feb 24, 2021

@staticfloat I tried your branch and I am getting:

make[1]: *** [/Users/mohd/Programs/julia-darwin/usr/lib/julia/libpcre2-8.dylib] Error 1
make: *** [julia-base] Error 2
make: *** Waiting for unfinished jobs....
@jheinen
Copy link

@jheinen jheinen commented Feb 24, 2021

Hey there @storopoli; here's what is working for me right now:

$ git fetch; git checkout sf/apple_silicon_latest && git reset --hard origin sf/apple_silicon_latest && git clean -fdx
$ make -j9

If something about that doesn't work, please open a new issue and ping me via @staticfloat.

@staticfloat : Works perfect! Thanks a lot.

Will tag an official GR aarch64 release in the next days. The develop version is already available.

@storopoli
Copy link

@storopoli storopoli commented Feb 24, 2021

Rmath_jll is now installing in ARM !

@giordano
Copy link
Contributor

@giordano giordano commented Feb 24, 2021

Rmath_jll is now installing in ARM !

I doubt it works though 🤔

@storopoli
Copy link

@storopoli storopoli commented Feb 24, 2021

How do I test it? I only knows that it is a dependency for Distributions alongside with StatsFuns (which does not install yet).

@ViralBShah
Copy link
Member

@ViralBShah ViralBShah commented Feb 24, 2021

Run tests in a package that depends on Rmat_jll. Like tests in Rmath.jl.

@Keno
Copy link
Member Author

@Keno Keno commented Feb 24, 2021

It's never been built for this platform, so it's guaranteed to fail.

@storopoli
Copy link

@storopoli storopoli commented Feb 24, 2021

(@v1.7) pkg> test Rmath
     Testing Rmath
      Status `/private/var/folders/b3/ljynthyj3ybc9hscwx_wgr440000gp/T/jl_CQe6tP/Project.toml`
  [79098fc4] Rmath v0.6.1
  [f50d1b31] Rmath_jll v0.2.2+1
  [9a3f8284] Random `@stdlib/Random`
  [10745b16] Statistics `@stdlib/Statistics`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/b3/ljynthyj3ybc9hscwx_wgr440000gp/T/jl_CQe6tP/Manifest.toml`
  [79098fc4] Rmath v0.6.1
  [f50d1b31] Rmath_jll v0.2.2+1
  [0dad84c5] ArgTools `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [f43a241f] Downloads `@stdlib/Downloads`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [ca575930] NetworkOptions `@stdlib/NetworkOptions`
  [44cfe95a] Pkg `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [fa267f1f] TOML `@stdlib/TOML`
  [a4e569a6] Tar `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [deac9b47] LibCURL_jll `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll `@stdlib/MozillaCACerts_jll`
  [83775a58] Zlib_jll `@stdlib/Zlib_jll`
  [8e850ede] nghttp2_jll `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll `@stdlib/p7zip_jll`
     Testing Running tests...
ERROR: LoadError: InitError: UndefVarError: libRmath not defined
during initialization of module Rmath
in expression starting at /Users/storopoli/.julia/packages/Rmath/lo1Ao/test/runtests.jl:1
ERROR: Package Rmath errored during testing
@Keno
Copy link
Member Author

@Keno Keno commented Feb 25, 2021

For those following along at home, master bootstraps fine as of yesterday. We are still tracking a number of issues though even before looking towards the package ecosystem. I'm keeping the list at the top of the issue updated.

@panxiaoguang
Copy link

@panxiaoguang panxiaoguang commented Mar 5, 2021

can anyone give me an instruction about how to buld julia on M1 mac? for example, how to install dependence with HomeBrew, and how to complie julia source? I wan't to try julia on my new M1, but I can't find a tutor on the internet

@Keno
Copy link
Member Author

@Keno Keno commented Mar 5, 2021

git clone https://github.com/JuliaLang/julia and make should be enough at this point.

@panxiaoguang
Copy link

@panxiaoguang panxiaoguang commented Mar 5, 2021

git clone https://github.com/JuliaLang/julia and make should be enough at this point.

Thank you very much!

@awadell1
Copy link

@awadell1 awadell1 commented Mar 25, 2021

Has anyone had success compiling v1.6 for apple silicon? I'm getting the write_fault error on v1.6.0 and an undefined symbol error if I cherry_pick 6bfdb8e (Apply WRITE_FAULT workaround) from sf/apple_silicon_latest. Cherry-picking 3da93f3 (Bump p7zip_jll to get coddesigned 7z binary) gives me a sha512 checksum failure on LibGit2.v1.2.3.

I can build master locally (With warnings but it does produce a binary). Any suggestion on where to go from here?

with v1.6.0

❯ make         
    PERL base/build_h.jl.phony
    PERL base/version_git.jl.phony
    CC cli/loader_exe.o
    CC cli/loader_lib.o
    LINK usr/lib/libjulia.1.6.dylib
    LINK usr/bin/julia
    CC src/jloptions.o
    CC src/runtime_ccall.o
    CC src/rtutils.o
    CC src/codegen.o
In file included from /Users/alexwadell/Documents/EEG/julia/src/codegen.cpp:57:
/Users/alexwadell/Documents/EEG/julia/usr/include/llvm/ADT/Statistic.h:38:9: warning: 'LLVM_ENABLE_STATS' macro
      redefined [-Wmacro-redefined]
#define LLVM_ENABLE_STATS 1
        ^
./llvm-version.h:24:9: note: previous definition is here
#define LLVM_ENABLE_STATS 0
        ^
1 warning generated.
    CC src/llvm-ptls.o
    CC src/jltypes.o
    CC src/gf.o
    CC src/typemap.o
    CC src/smallintset.o
    CC src/ast.o
    CC src/builtins.o
    CC src/module.o
    CC src/interpreter.o
    CC src/symbol.o
    CC src/dlload.o
    CC src/sys.o
    CC src/init.o
    CC src/task.o
    CC src/array.o
    CC src/dump.o
    CC src/staticdata.o
    CC src/toplevel.o
    CC src/jl_uv.o
    CC src/datatype.o
    CC src/simplevector.o
    CC src/runtime_intrinsics.o
    CC src/precompile.o
    CC src/threading.o
    CC src/partr.o
    CC src/stackwalk.o
    CC src/gc.o
    CC src/gc-debug.o
    CC src/gc-pages.o
    CC src/gc-stacks.o
    CC src/method.o
    CC src/jlapi.o
    CC src/signal-handling.o
In file included from /Users/alexwadell/Documents/EEG/julia/src/signal-handling.c:126:
In file included from ./signals-unix.c:228:
./signals-mach.c:282:29: error: no member named '__err' in 'struct __darwin_arm_exception_state64'; did you mean
      '__esr'?
            if (!(exc_state.__err & WRITE_FAULT))
                            ^~~~~
                            __esr
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:60:13: note: '__esr' declared here
        __uint32_t __esr;       /* Exception syndrome */
                   ^
In file included from /Users/alexwadell/Documents/EEG/julia/src/signal-handling.c:126:
In file included from ./signals-unix.c:228:
./signals-mach.c:282:37: error: use of undeclared identifier 'WRITE_FAULT'
            if (!(exc_state.__err & WRITE_FAULT))
                                    ^
2 errors generated.
make[1]: *** [signal-handling.o] Error 1
make: *** [julia-src-release] Error 2

With v1.6.0 + 6bfdb8e

❯ make -j   
    CC cli/loader_lib.o
    CC cli/loader_exe.o
    CC cli/loader_trampolines.o
    LINK usr/lib/libjulia.1.6.dylib
    LINK usr/bin/julia
    FLISP src/julia_flisp.boot
    CC usr/lib/libccalltest.dylib
    PERL base/errno_h.jl
    CC usr/lib/libllvmcalltest.dylib
    PERL base/pcre_h.jl
    PERL base/file_constants.jl
    PERL base/uv_constants.jl
    PERL base/features_h.jl
    PERL base/features_h.jl
    PERL base/features_h.jl
    PERL base/build_h.jl.phony
    PERL base/version_git.jl.phony
    FLISP src/julia_flisp.boot.inc
    CC src/jloptions.o
    CC src/runtime_ccall.o
    CC src/rtutils.o
    CC src/llvm-ptls.o
    CC src/codegen.o
    CC src/gf.o
    CC src/jltypes.o
    CC src/typemap.o
    CC src/smallintset.o
    CC src/ast.o
    CC src/builtins.o
    CC src/module.o
    CC src/interpreter.o
    CC src/symbol.o
    CC src/dlload.o
    CC src/init.o
    CC src/task.o
    CC src/sys.o
    CC src/array.o
    CC src/dump.o
    CC src/jl_uv.o
    CC src/simplevector.o
    CC src/staticdata.o
    CC src/runtime_intrinsics.o
    CC src/precompile.o
    CC src/toplevel.o
    CC src/datatype.o
    CC src/threading.o
    CC src/partr.o
    CC src/stackwalk.o
    CC src/gc.o
    CC src/gc-debug.o
    CC src/gc-pages.o
    CC src/method.o
    CC src/gc-stacks.o
    CC src/signal-handling.o
    CC src/safepoint.o
    CC src/jlapi.o
    CC src/timing.o
    CC src/subtype.o
    CC src/crc32c.o
    CC src/APInt-C.o
    CC src/processor.o
    CC src/ircode.o
    CC src/aotcompile.o
    CC src/jitlayers.o
    CC src/debuginfo.o
    CC src/disasm.o
    CC src/llvm-simdloop.o
    CC src/llvm-muladd.o
    CC src/llvm-final-gc-lowering.o
    CC src/llvm-pass-helpers.o
    CC src/llvm-late-gc-lowering.o
    CC src/llvm-lower-handlers.o
    CC src/llvm-gc-invariant-verifier.o
    CC src/llvm-propagate-addrspaces.o
    CC src/llvm-multiversioning.o
    CC src/llvm-alloc-opt.o
    CC src/cgmemmgr.o
    CC src/llvm-julia-licm.o
    CC src/llvm-remove-ni.o
    CC src/llvm-api.o
    CC src/llvm-demote-float16.o
    CC src/llvm-remove-addrspaces.o
/Users/alexwadell/Documents/EEG/julia/src/signal-handling.c:107:15: warning: unused function 'jl_safe_read_mem'
      [-Wunused-function]
static size_t jl_safe_read_mem(const volatile char *ptr, char *out, size_t len)
              ^
'++crc' is not a recognized feature for this target (ignoring feature)
'++crc' is not a recognized feature for this target (ignoring feature)
1 warning generated.
In file included from /Users/alexwadell/Documents/EEG/julia/src/processor.cpp:845:
./processor_arm.cpp:1819:40: warning: value size does not match register size specified by the constraint and modifier
      [-Wasm-operand-widths]
    asm volatile("mrs %0, fpcr" : "=r"(fpcr));
                                       ^
./processor_arm.cpp:1819:23: note: use constraint modifier "w"
    asm volatile("mrs %0, fpcr" : "=r"(fpcr));
                      ^~
                      %w0
./processor_arm.cpp:1825:40: warning: value size does not match register size specified by the constraint and modifier
      [-Wasm-operand-widths]
    asm volatile("msr fpcr, %0" :: "r"(fpcr));
                                       ^
./processor_arm.cpp:1825:29: note: use constraint modifier "w"
    asm volatile("msr fpcr, %0" :: "r"(fpcr));
                            ^~
                            %w0
In file included from /Users/alexwadell/Documents/EEG/julia/src/codegen.cpp:57:
/Users/alexwadell/Documents/EEG/julia/usr/include/llvm/ADT/Statistic.h:38:9: warning: 'LLVM_ENABLE_STATS' macro
      redefined [-Wmacro-redefined]
#define LLVM_ENABLE_STATS 1
        ^
./llvm-version.h:24:9: note: previous definition is here
#define LLVM_ENABLE_STATS 0
        ^
2 warnings generated.
1 warning generated.
    LINK usr/lib/libjulia-internal.1.6.dylib
Undefined symbols for architecture arm64:
  "_unw_init_local_dwarf", referenced from:
      _rec_backtrace_ctx_dwarf in stackwalk.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/alexwadell/Documents/EEG/julia/usr/lib/libjulia-internal.1.6.dylib] Error 1
make: *** [julia-src-release] Error 2

With v1.6.0 + 6bfdb8e + 3da93f3

❯ make -j   
    CC cli/loader_exe.o
    CC cli/loader_lib.o
    CC cli/loader_trampolines.o
===============================================================================
  ERROR: sha512 checksum failure on LibGit2.v1.2.3+0.aarch64-apple-darwin.tar.gz, should be:
      cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce
      47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
  But `sha512sum /Users/alexwadell/Documents/EEG/julia/deps/srccache/LibGit2.v1.2.3+0.aarch64-apple-darwin.tar.gz | awk '{ print $1; }'` results in:
      aff23e9d56827be54d8f515489eed92d9cb4d9a1b69c12bbee44fa1343ebc906
      b38b082c11e6ecb227d256de5cba19b2f3a03c022b88809a33c225c34db08f7c
  This can happen due to bad downloads or network proxies, please check your
  network proxy/firewall settings and delete
  /Users/alexwadell/Documents/EEG/julia/deps/srccache/LibGit2.v1.2.3+0.aarch64-apple-darwin.tar.gz
  to force a redownload when you are ready
===============================================================================
make[1]: *** [/Users/alexwadell/Documents/EEG/julia/usr/manifest/libgit2] Error 2
make: *** [julia-deps] Error 2
make: *** Waiting for unfinished jobs....
    LINK usr/lib/libjulia.1.6.dylib
    LINK usr/bin/julia
@storopoli
Copy link

@storopoli storopoli commented Mar 26, 2021

@awadell1 I think that the only way to build Julia in ARM is to use the master branch from the repository

@cadojo
Copy link

@cadojo cadojo commented Apr 2, 2021

I'm working off an M1 MacBook Air. Thanks to all for the progress on this! This comment has two points:

  1. On the latest master branch (commit 82dc40264d94581c6977dab01ec545c3cd4bb4ec) I can build Julia, and I can install pretty much every package I use. All packages precompile, except those that depend on GR. I can build GR, but using GR or using Plots results in the following error: ERROR: InitError: UndefVarError: libGR_path not defined . I wanted to update here in case this was useful information. And that brings me to my second point...
  2. Let me know if this isn't the place for bug updates like this! I was debating between posting here, and this Discourse thread.

Thanks again. Full ]add GR; using GR log is below.

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.0-DEV.796 (2021-04-01)
 _/ |\__'_|_|_|\__'_|  |  Commit 82dc40264d (0 days old master)
|__/                   |

(@v1.7) pkg> add GR
  Installing known registries into `~/.julia`
     Cloning registry from "https://github.com/JuliaRegistries/General.git"
       Added registry `General` to `~/.julia/registries/General`
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
   Installed Xorg_libXext_jll ───────────── v1.3.4+4
   Installed x264_jll ───────────────────── v2020.7.14+2
   Installed Libglvnd_jll ───────────────── v1.3.0+3
   Installed Xorg_libpthread_stubs_jll ──── v0.1.0+3
   Installed Ogg_jll ────────────────────── v1.3.4+2
   Installed Opus_jll ───────────────────── v1.3.1+3
   Installed Qt5Base_jll ────────────────── v5.15.2+0
   Installed JLLWrappers ────────────────── v1.2.0
   Installed libfdk_aac_jll ─────────────── v0.1.6+4
   Installed JpegTurbo_jll ──────────────── v2.0.1+3
   Installed LAME_jll ───────────────────── v3.100.0+3
   Installed Xorg_xkeyboard_config_jll ──── v2.27.0+4
   Installed Pixman_jll ─────────────────── v0.40.0+0
   Installed LibVPX_jll ─────────────────── v1.9.0+1
   Installed MbedTLS ────────────────────── v1.0.3
   Installed URIs ───────────────────────── v1.2.0
   Installed PCRE_jll ───────────────────── v8.42.0+4
   Installed Expat_jll ──────────────────── v2.2.7+6
   Installed FreeType2_jll ──────────────── v2.10.1+5
   Installed Wayland_jll ────────────────── v1.17.0+4
   Installed Xorg_libXau_jll ────────────── v1.0.9+4
   Installed Xorg_libxkbfile_jll ────────── v1.1.0+4
   Installed libpng_jll ─────────────────── v1.6.37+6
   Installed HTTP ───────────────────────── v0.9.5
   Installed Xorg_xcb_util_wm_jll ───────── v0.4.1+1
   Installed Libiconv_jll ───────────────── v1.16.0+7
   Installed Cairo_jll ──────────────────── v1.16.0+6
   Installed Fontconfig_jll ─────────────── v2.13.1+14
   Installed Xorg_libXdmcp_jll ──────────── v1.1.3+4
   Installed Glib_jll ───────────────────── v2.59.0+4
   Installed Parsers ────────────────────── v1.1.0
   Installed OpenSSL_jll ────────────────── v1.1.1+6
   Installed Xorg_libXrandr_jll ─────────── v1.5.2+4
   Installed Xorg_xtrans_jll ────────────── v1.4.0+3
   Installed FriBidi_jll ────────────────── v1.0.5+6
   Installed GLFW_jll ───────────────────── v3.3.3+0
   Installed Libuuid_jll ────────────────── v2.34.0+7
   Installed JSON ───────────────────────── v0.21.1
   Installed libass_jll ─────────────────── v0.14.0+4
   Installed Xorg_libX11_jll ────────────── v1.6.9+4
   Installed Xorg_xcb_util_renderutil_jll ─ v0.3.9+1
   Installed XML2_jll ───────────────────── v2.9.11+0
   Installed Xorg_libXcursor_jll ────────── v1.2.0+4
   Installed Xorg_libXfixes_jll ─────────── v5.0.3+4
   Installed Xorg_xcb_util_image_jll ────── v0.4.0+1
   Installed Libtiff_jll ────────────────── v4.1.0+2
   Installed Gettext_jll ────────────────── v0.20.1+7
   Installed GR_jll ─────────────────────── v0.57.0+0
   Installed libvorbis_jll ──────────────── v1.3.6+6
   Installed Bzip2_jll ──────────────────── v1.0.6+5
   Installed XSLT_jll ───────────────────── v1.1.33+4
   Installed Libgcrypt_jll ──────────────── v1.8.5+4
   Installed Xorg_xcb_util_jll ──────────── v0.4.0+1
   Installed xkbcommon_jll ──────────────── v0.9.1+5
   Installed Libmount_jll ───────────────── v2.34.0+3
   Installed Wayland_protocols_jll ──────── v1.18.0+4
   Installed Xorg_libXrender_jll ────────── v0.9.10+4
   Installed x265_jll ───────────────────── v3.0.0+3
   Installed Libffi_jll ─────────────────── v3.2.1+4
   Installed Xorg_libXinerama_jll ───────── v1.1.4+4
   Installed Libgpg_error_jll ───────────── v1.36.0+3
   Installed Zstd_jll ───────────────────── v1.4.8+0
   Installed FFMPEG_jll ─────────────────── v4.3.1+4
   Installed IniFile ────────────────────── v0.5.0
   Installed Xorg_libXi_jll ─────────────── v1.7.10+4
   Installed LZO_jll ────────────────────── v2.10.0+3
   Installed Xorg_xkbcomp_jll ───────────── v1.4.2+4
   Installed Xorg_xcb_util_keysyms_jll ──── v0.4.0+1
   Installed Xorg_libxcb_jll ────────────── v1.13.0+3
   Installed GR ─────────────────────────── v0.57.0
  Downloaded artifact: XML2
  Downloaded artifact: Wayland_protocols
    Updating `~/.julia/environments/v1.7/Project.toml`
  [28b8d3ca] + GR v0.57.0
    Updating `~/.julia/environments/v1.7/Manifest.toml`
  [28b8d3ca] + GR v0.57.0
  [cd3eb016] + HTTP v0.9.5
  [83e8ac13] + IniFile v0.5.0
  [692b3bcd] + JLLWrappers v1.2.0
  [682c06a0] + JSON v0.21.1
  [739be429] + MbedTLS v1.0.3
  [69de0a69] + Parsers v1.1.0
  [5c2747f8] + URIs v1.2.0
  [6e34b625] + Bzip2_jll v1.0.6+5
  [83423d85] + Cairo_jll v1.16.0+6
  [2e619515] + Expat_jll v2.2.7+6
  [b22a6f82] + FFMPEG_jll v4.3.1+4
  [a3f928ae] + Fontconfig_jll v2.13.1+14
  [d7e528f0] + FreeType2_jll v2.10.1+5
  [559328eb] + FriBidi_jll v1.0.5+6
  [0656b61e] + GLFW_jll v3.3.3+0
  [d2c73de3] + GR_jll v0.57.0+0
  [78b55507] + Gettext_jll v0.20.1+7
  [7746bdde] + Glib_jll v2.59.0+4
  [aacddb02] + JpegTurbo_jll v2.0.1+3
  [c1c5ebd0] + LAME_jll v3.100.0+3
  [dd4b983a] + LZO_jll v2.10.0+3
  [dd192d2f] + LibVPX_jll v1.9.0+1
  [e9f186c6] + Libffi_jll v3.2.1+4
  [d4300ac3] + Libgcrypt_jll v1.8.5+4
  [7e76a0d4] + Libglvnd_jll v1.3.0+3
  [7add5ba3] + Libgpg_error_jll v1.36.0+3
  [94ce4f54] + Libiconv_jll v1.16.0+7
  [4b2f31a3] + Libmount_jll v2.34.0+3
  [89763e89] + Libtiff_jll v4.1.0+2
  [38a345b3] + Libuuid_jll v2.34.0+7
  [e7412a2a] + Ogg_jll v1.3.4+2
  [458c3c95] + OpenSSL_jll v1.1.1+6
  [91d4177d] + Opus_jll v1.3.1+3
  [2f80f16e] + PCRE_jll v8.42.0+4
  [30392449] + Pixman_jll v0.40.0+0
  [ea2cea3b] + Qt5Base_jll v5.15.2+0
  [a2964d1f] + Wayland_jll v1.17.0+4
  [2381bf8a] + Wayland_protocols_jll v1.18.0+4
  [02c8fc9c] + XML2_jll v2.9.11+0
  [aed1982a] + XSLT_jll v1.1.33+4
  [4f6342f7] + Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] + Xorg_libXau_jll v1.0.9+4
  [935fb764] + Xorg_libXcursor_jll v1.2.0+4
  [a3789734] + Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] + Xorg_libXext_jll v1.3.4+4
  [d091e8ba] + Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] + Xorg_libXi_jll v1.7.10+4
  [d1454406] + Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] + Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] + Xorg_libXrender_jll v0.9.10+4
  [14d82f49] + Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] + Xorg_libxcb_jll v1.13.0+3
  [cc61e674] + Xorg_libxkbfile_jll v1.1.0+4
  [12413925] + Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] + Xorg_xcb_util_jll v0.4.0+1
  [975044d2] + Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] + Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] + Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] + Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] + Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] + Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] + Zstd_jll v1.4.8+0
  [0ac62f75] + libass_jll v0.14.0+4
  [f638f0a6] + libfdk_aac_jll v0.1.6+4
  [b53b4c65] + libpng_jll v1.6.37+6
  [f27f6e37] + libvorbis_jll v1.3.6+6
  [1270edf5] + x264_jll v2020.7.14+2
  [dfaa095f] + x265_jll v3.0.0+3
  [d8fb68d0] + xkbcommon_jll v0.9.1+5
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [4536629a] + OpenBLAS_jll
  [83775a58] + Zlib_jll
  [8e850b90] + libblastrampoline_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll
    Building GR → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/31746d748c4ac35480d6f76517854e4066f4a8be/build.log`
Precompiling project...
  76 dependencies successfully precompiled in 15 seconds

julia> using GR
ERROR: InitError: UndefVarError: libGR_path not defined
during initialization of module GR

P.S. 76 dependencies successfully precompiled in 15 seconds say it with me, we love parallel precompilation!

@giordano
Copy link
Contributor

@giordano giordano commented Apr 2, 2021

@cadojo #36617 (comment)

Things that rely on 3rd-party binary dependencies (including, unfortunately, Distributions, which relies upon StatsFuns which relies on Rmath_jll) may or may not work at the moment, this is going to be one of those organic things where over the next few weeks the number of packages that work on Apple silicon will continually expand.

This will take time

@storopoli
Copy link

@storopoli storopoli commented Apr 2, 2021

Last version on Plots.jl broke my ARM M1 because of a failed to build updated GR. So my quick fix was:

]add Plots@1.11.1
@mcabbott
Copy link
Contributor

@mcabbott mcabbott commented Apr 3, 2021

FWIW, quite a few packages can be made to work easily by installing their binary dependency yourself, possibly using Homebrew, https://brew.sh.

For example, brew install nlopt, then ] dev NLopt and edit .julia/dev/NLopt/src/NLopt.jl:

# using NLopt_jll
const libnlopt = "/opt/homebrew/lib/libnlopt.dylib"
@chriselrod
Copy link
Contributor

@chriselrod chriselrod commented Apr 6, 2021

Should I file a separate issue?

julia> using SharedArrays

julia> SharedArray{Float64}(0)
0-element SharedVector{Float64}:


julia> SharedArray{Float64}(1)
System max size of single shmem segment(MB) : 4
System max size of all shmem segments(MB) : 16
Requested size(MB) : 0
Please ensure requested size is within system limits.
If not, increase system limits and try again.
ERROR: SystemError: shm_open() failed for /jl006840nyAd39ZoCOUGp54GDHlL: Permission denied
Stacktrace:
 [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
   @ Base ./error.jl:168

julia> versioninfo()
Julia Version 1.7.0-DEV.852
Commit 79e198b29f (2021-04-06 19:35 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin20.3.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, cyclone)
Environment:
  JULIA_NUM_THREADS = auto

The limit seems to be 4MB, much larger than I requested here?

@staticfloat
Copy link
Member

@staticfloat staticfloat commented Apr 6, 2021

yes, I think you should open a separate issue. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet