JuliaLang / julia

The Julia Programming Language

Home Page:https://julialang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Darwin/ARM64 tracking issue

Keno opened this issue · comments

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 (#39986)
  • 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
  • Segfault in SVD test #41440
  • Darwin/ARM64: Julia freezes on nested @threads loops

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.

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.

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...

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

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?)

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.

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.

Fails upstream too.

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

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

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.

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

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

  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

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

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.

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.

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.

@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.

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.

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

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

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

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

I wonder how well Julia will run on Rossetta 2.

Works ok, but at reduced perf of course.

Probably reduced performance, but the M1, 16GB is quite fast when compared to my 2015 13" MBP with an i5, even while on Rosetta.

I'm curious about Julia benchmarks even with Rosetta, and I might do them at some point in the coming weeks, but don't have a more recent computer to compare to.

I'll be curious to see if the tests all pass.

That's a great question! Running the tests now.

Ok, the results are available here:

https://gist.github.com/angeris/f1263dde142f85b0270de71428cfbef8

Essentially, only one test failed, and here is the output of that:

(libuv) kqueue(): Too many open files
stress                             (1) |    24.44 |   0.04 |  0.2 |      93.66 |  1419.20
Worker 2 failed running test misc:
Some tests did not pass: 1280997 passed, 1 failed, 0 errored, 0 broken.
misc: Test Failed at /Applications/Julia-1.5.app/Contents/Resources/julia/share/julia/test/misc.jl:474
  Expression: Libc.errno() == 0x00c0ffee
   Evaluated: 0 == 0x00c0ffee
Stacktrace:
 [1] record(::Test.DefaultTestSet, ::Union{Test.Error, Test.Fail}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:775
 [2] (::var"#23#32")() at /Applications/Julia-1.5.app/Contents/Resources/julia/share/julia/test/runtests.jl:342
 [3] cd(::var"#23#32", ::String) at ./file.jl:104
 [4] top-level scope at /Applications/Julia-1.5.app/Contents/Resources/julia/share/julia/test/runtests.jl:75
 [5] include(::Function, ::Module, ::String) at ./Base.jl:380
 [6] include(::Module, ::String) at ./Base.jl:368
 [7] exec_options(::Base.JLOptions) at ./client.jl:296
 [8] _start() at ./client.jl:506

I'm not quite sure what is causing this "too many open files" (which appears to be a separate issue) but it may also be worth checking?

EDIT: The complete output is available here. As a side note, the timing results are probably not super useful since I have a few other things open and running.

Did anyone manage to build Julia on macOS 11 arm64? I tried the master branch, which fails due to LLVM problems and then I tried release 1.5.3 which fails, too:

/usr/local/src/julia % make OPENBLAS_USE_THREAD=0 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C scratch/openblas-33f76a6c378681ac2af76b20e55ff682191a1937/ CC=clang -stdlib=libc++ -mmacosx-version-min=10.8 FC=gfortran -mmacosx-version-min=10.8 LD=ld RANLIB=ranlib TARGET=ARMV7 BINARY= USE_THREAD=0 NO_AFFINITY=1 CFLAGS= -O2 FFLAGS= -O2 -fPIC  LDFLAGS= -Wl,-rpath,'@loader_path/' MAKE_NB_JOBS=0
ar: creating archive ../libopenblas_armv7-r0.3.9.a
memory.c:1987:62: warning: format specifies type 'unsigned long' but the argument has type 'void *'
      [-Wformat]
       printf("error code=%d,\trelease->address=%lx\n",errsv,release->address);
                                                ~~~          ^~~~~~~~~~~~~~~~
1 warning generated.
make[3]: *** No rule to make target `../kernel/arm64/amin.S', needed by `samin_k.o'.  Stop.
make[2]: *** [libs] Error 1
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[1]: *** [scratch/openblas-33f76a6c378681ac2af76b20e55ff682191a1937/build-compiled] Error 1
make: *** [julia-deps] Error 2

@jheinen it seems like julia is not ready yet. For x86 it's enough to just install gcc via homebrew and gcc10 can now be installed on arm.

I get some strange errors which I'm not sure how to fix on CC src/runtime_ccall.o step.

output
julia → make
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   561  100   561    0     0    655      0 --:--:-- --:--:-- --:--:--   654
100 1409k  100 1409k    0     0   255k      0  0:00:05  0:00:05 --:--:--  332k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   509  100   509    0     0    757      0 --:--:-- --:--:-- --:--:--   756
100 1068k  100 1068k    0     0   293k      0  0:00:03  0:00:03 --:--:--  483k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    730      0 --:--:-- --:--:-- --:--:--   729
100  471k  100  471k    0     0   241k      0  0:00:01  0:00:01 --:--:-- 1258k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   511  100   511    0     0    788      0 --:--:-- --:--:-- --:--:--   787
100 32323  100 32323    0     0  23662      0  0:00:01  0:00:01 --:--:-- 23662
WARNING: sha512 checksum for LibOSXUnwind.v0.0.6+1.aarch64-apple-darwin.tar.gz not found in deps/checksums/, autogenerating...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   503  100   503    0     0    734      0 --:--:-- --:--:-- --:--:--   733
100  165k  100  165k    0     0  92847      0  0:00:01  0:00:01 --:--:--  342k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    746      0 --:--:-- --:--:-- --:--:--   745
100  8460  100  8460    0     0   6768      0  0:00:01  0:00:01 --:--:--  6768
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   503  100   503    0     0    553      0 --:--:-- --:--:-- --:--:--   553
100 39.9M  100 39.9M    0     0  1572k      0  0:00:25  0:00:25 --:--:-- 2728k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   501  100   501    0     0    691      0 --:--:-- --:--:-- --:--:--   691
100 1472k  100 1472k    0     0   437k      0  0:00:03  0:00:03 --:--:--  754k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   531  100   531    0     0    699      0 --:--:-- --:--:-- --:--:--   698
100 6165k  100 6165k    0     0   446k      0  0:00:13  0:00:13 --:--:--  497k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   493  100   493    0     0    711      0 --:--:-- --:--:-- --:--:--   711
100  447k  100  447k    0     0   229k      0  0:00:01  0:00:01 --:--:--  395k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   503  100   503    0     0    689      0 --:--:-- --:--:-- --:--:--   689
100 1450k  100 1450k    0     0   483k      0  0:00:03  0:00:03 --:--:-- 1000k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   501  100   501    0     0    700      0 --:--:-- --:--:-- --:--:--   699
100  212k  100  212k    0     0   122k      0  0:00:01  0:00:01 --:--:--  675k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   503  100   503    0     0    717      0 --:--:-- --:--:-- --:--:--   718
100  442k  100  442k    0     0   226k      0  0:00:01  0:00:01 --:--:--  391k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   503  100   503    0     0    730      0 --:--:-- --:--:-- --:--:--   730
100  692k  100  692k    0     0   300k      0  0:00:02  0:00:02 --:--:--  465k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   501  100   501    0     0    632      0 --:--:-- --:--:-- --:--:--   631
100  676k  100  676k    0     0   290k      0  0:00:02  0:00:02 --:--:--  768k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   459  100   459    0     0    639      0 --:--:-- --:--:-- --:--:--   639
100  216k  100  216k    0     0   119k      0  0:00:01  0:00:01 --:--:--  244k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   495  100   495    0     0    676      0 --:--:-- --:--:-- --:--:--   675
100  366k  100  366k    0     0   112k      0  0:00:03  0:00:03 --:--:--  172k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    591      0 --:--:-- --:--:-- --:--:--   590
100  178k  100  178k    0     0  96422      0  0:00:01  0:00:01 --:--:--  861k
ar: creating archive libutf8proc.a
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    664      0 --:--:-- --:--:-- --:--:--   663
100  135k  100  135k    0     0  84907      0  0:00:01  0:00:01 --:--:--  276k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   499  100   499    0     0    709      0 --:--:-- --:--:-- --:--:--   708
100  616k  100  616k    0     0   296k      0  0:00:02  0:00:02 --:--:--  847k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    764      0 --:--:-- --:--:-- --:--:--   763
100  4183  100  4183    0     0   3428      0  0:00:01  0:00:01 --:--:-- 4084k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    705      0 --:--:-- --:--:-- --:--:--   704
100  368k  100  368k    0     0   193k      0  0:00:01  0:00:01 --:--:--  588k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    737      0 --:--:-- --:--:-- --:--:--   736
100 18915  100 18915    0     0  15241      0  0:00:01  0:00:01 --:--:-- 18.0M
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    711      0 --:--:-- --:--:-- --:--:--   711
100 28737  100 28737    0     0  20323      0  0:00:01  0:00:01 --:--:-- 57704
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    757      0 --:--:-- --:--:-- --:--:--   756
100 20449  100 20449    0     0  14991      0  0:00:01  0:00:01 --:--:-- 14991
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    742      0 --:--:-- --:--:-- --:--:--   742
100  9128  100  9128    0     0   7232      0  0:00:01  0:00:01 --:--:-- 45640
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    741      0 --:--:-- --:--:-- --:--:--   740
100 31354  100 31354    0     0  23139      0  0:00:01  0:00:01 --:--:-- 23139
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    738      0 --:--:-- --:--:-- --:--:--   737
100 12559  100 12559    0     0  10285      0  0:00:01  0:00:01 --:--:-- 11.9M
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   377  100   377    0     0    749      0 --:--:-- --:--:-- --:--:--   749
100   164  100   164    0     0    189      0 --:--:-- --:--:-- --:--:--   189
100  5671  100  5671    0     0   4465      0  0:00:01  0:00:01 --:--:-- 16202
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   369  100   369    0     0    729      0 --:--:-- --:--:-- --:--:--   729
100   160  100   160    0     0    179      0 --:--:-- --:--:-- --:--:--   597
100 10808  100 10808    0     0   8503      0  0:00:01  0:00:01 --:--:--  8503
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   387  100   387    0     0    754      0 --:--:-- --:--:-- --:--:--   752
100   169  100   169    0     0    186      0 --:--:-- --:--:-- --:--:--   186
100  5863  100  5863    0     0   4616      0  0:00:01  0:00:01 --:--:--  4616
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   385  100   385    0     0    753      0 --:--:-- --:--:-- --:--:--   753
100   168  100   168    0     0    187      0 --:--:-- --:--:-- --:--:--   187
100  4672  100  4672    0     0   3699      0  0:00:01  0:00:01 --:--:-- 17563
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   387  100   387    0     0    751      0 --:--:-- --:--:-- --:--:--   751
100   169  100   169    0     0    191      0 --:--:-- --:--:-- --:--:--  1069
100 11446  100 11446    0     0   9134      0  0:00:01  0:00:01 --:--:--  9134
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   385  100   385    0     0    754      0 --:--:-- --:--:-- --:--:--   753
100   168  100   168    0     0    191      0 --:--:-- --:--:-- --:--:--   191
100  4672  100  4672    0     0   3776      0  0:00:01  0:00:01 --:--:--  3776
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   377  100   377    0     0    739      0 --:--:-- --:--:-- --:--:--   737
100   164  100   164    0     0    188      0 --:--:-- --:--:-- --:--:--   188
100  5687  100  5687    0     0   4564      0  0:00:01  0:00:01 --:--:-- 5553k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   387  100   387    0     0    767      0 --:--:-- --:--:-- --:--:--   767
100   169  100   169    0     0    192      0 --:--:-- --:--:-- --:--:--  165k
100  5863  100  5863    0     0   4747      0  0:00:01  0:00:01 --:--:--  4747
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   373  100   373    0     0    731      0 --:--:-- --:--:-- --:--:--   731
100   162    0   162    0     0    180      0 --:--:-- --:--:-- --:--:--   504
100  5591  100  5591    0     0   4409      0  0:00:01  0:00:01 --:--:--  4409
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   387  100   387    0     0    750      0 --:--:-- --:--:-- --:--:--   748
100   169  100   169    0     0    187      0 --:--:-- --:--:-- --:--:--   187
100  4698  100  4698    0     0   3050      0  0:00:01  0:00:01 --:--:-- 4587k
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   391  100   391    0     0    765      0 --:--:-- --:--:-- --:--:--   765
100   171  100   171    0     0    193      0 --:--:-- --:--:-- --:--:--  1036
100 19091  100 19091    0     0  15032      0  0:00:01  0:00:01 --:--:-- 15032
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   389  100   389    0     0    761      0 --:--:-- --:--:-- --:--:--   759
100   170  100   170    0     0    192      0 --:--:-- --:--:-- --:--:--   192
100  5911  100  5911    0     0   4654      0  0:00:01  0:00:01 --:--:--  4654
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   379  100   379    0     0    740      0 --:--:-- --:--:-- --:--:--   738
100   165    0   165    0     0    185      0 --:--:-- --:--:-- --:--:--   185
100  5703  100  5703    0     0   4462      0  0:00:01  0:00:01 --:--:-- 32039
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   381  100   381    0     0    750      0 --:--:-- --:--:-- --:--:--   750
100   166  100   166    0     0    188      0 --:--:-- --:--:-- --:--:--  162k
100  4594  100  4594    0     0   3620      0  0:00:01  0:00:01 --:--:--  3620
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   401  100   401    0     0    742      0 --:--:-- --:--:-- --:--:--   741
100   176  100   176    0     0    192      0 --:--:-- --:--:-- --:--:--   192
100  6151  100  6151    0     0   4539      0  0:00:01  0:00:01 --:--:--  4539
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   375  100   375    0     0    733      0 --:--:-- --:--:-- --:--:--   732
100   163  100   163    0     0    184      0 --:--:-- --:--:-- --:--:--   184
100  5639  100  5639    0     0   4461      0  0:00:01  0:00:01 --:--:-- 32595
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   405  100   405    0     0    748      0 --:--:-- --:--:-- --:--:--   748
100   178  100   178    0     0    187      0 --:--:-- --:--:-- --:--:--  173k
100   376  100   376    0     0    285      0  0:00:01  0:00:01 --:--:--   285
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   453  100   453    0     0    884      0 --:--:-- --:--:-- --:--:--   883
100   202  100   202    0     0    227      0 --:--:-- --:--:-- --:--:--   227
100 22679  100 22679    0     0  17662      0  0:00:01  0:00:01 --:--:-- 17662
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   393  100   393    0     0    764      0 --:--:-- --:--:-- --:--:--   763
100   172  100   172    0     0    191      0 --:--:-- --:--:-- --:--:--   191
100  3725  100  3725    0     0   2905      0  0:00:01  0:00:01 --:--:-- 3637k
Creating usr/etc/julia/startup.jl
Copying in usr/share/man/man1/julia.1
/Users/valent/Library/julia/contrib/install.sh 755 /Users/valent/Library/julia/contrib/julia-config.jl /Users/valent/Library/julia/usr/share/julia/
  PERL base/pcre_h.jl
  PERL base/errno_h.jl
  PERL base/build_h.jl.phony
  PERL base/features_h.jl
  PERL base/features_h.jl
  PERL base/features_h.jl
  PERL base/file_constants.jl
  PERL base/uv_constants.jl
  PERL base/version_git.jl.phony
  CC cli/loader_exe.o
  CC cli/loader_lib.o
  CC cli/loader_trampolines.o
  LINK usr/lib/libjulia.1.7.dylib
  LINK usr/bin/julia
  CC src/support/hashing.o
  CC src/support/timefuncs.o
  CC src/support/ptrhash.o
  CC src/support/operators.o
  CC src/support/utf8.o
  CC src/support/ios.o
  CC src/support/htable.o
  CC src/support/bitvector.o
  CC src/support/int2str.o
  CC src/support/libsupportinit.o
  CC src/support/arraylist.o
  CC src/support/strtod.o
  LINK src/support/libsupport.a
  CC src/flisp/flisp.o
  CC src/flisp/builtins.o
  CC src/flisp/string.o
  CC src/flisp/equalhash.o
  CC src/flisp/table.o
  CC src/flisp/iostream.o
  CC src/flisp/julia_extensions.o
  LINK src/flisp/libflisp.a
  CC src/flisp/flmain.o
  LINK src/flisp/flisp
  FLISP src/julia_flisp.boot
  FLISP src/julia_flisp.boot.inc
  CC src/jloptions.o
  CC src/runtime_ccall.o
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:18:
/Users/valent/Library/julia/usr/include/llvm/ADT/None.h:22:6: warning: scoped enumerations are
    a C++11 extension [-Wc++11-extensions]
enum class NoneType { None = 1 };
   ^
/Users/valent/Library/julia/usr/include/llvm/ADT/None.h:23:23: warning: use of enumeration in a
    nested name specifier is a C++11 extension [-Wc++11-extensions]
const NoneType None = NoneType::None;
                    ^
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:20:
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:31:23: warning: alias
    declarations are a C++11 extension [-Wc++11-extensions]
using UnderlyingT = std::remove_reference_t<T>;
                    ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:31:28: error: no template
    named 'remove_reference_t' in namespace 'std'; did you mean 'remove_reference'?
using UnderlyingT = std::remove_reference_t<T>;
                    ~~~~~^~~~~~~~~~~~~~~~~~
                         remove_reference
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:1109:50: note: 
    'remove_reference' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference        {typedef _LIBC...
                                               ^
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:20:
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:39:50: warning: 'long long'
    is a C++11 extension [-Wc++11-long-long]
     std::is_convertible<UnderlyingT, unsigned long long>::value);
                                               ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:44:59: warning: alias
    declarations are a C++11 extension [-Wc++11-extensions]
struct add_lvalue_reference_if_not_pointer { using type = T &; };
                                                        ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:48:13: error: no template
    named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
  T, std::enable_if_t<std::is_pointer<T>::value>> {
     ~~~~~^~~~~~~~~~~
          enable_if
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:538:63: note: 
    'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                            ^
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:20:
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:48:53: error: expected
    expression
  T, std::enable_if_t<std::is_pointer<T>::value>> {
                                                  ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:50:2: error: expected a type
};
^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:55:46: warning: alias
    declarations are a C++11 extension [-Wc++11-extensions]
struct add_const_past_pointer { using type = const T; };
                                           ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:58:39: error: no template
    named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
struct add_const_past_pointer<T, std::enable_if_t<std::is_pointer<T>::value>> {
                               ~~~~~^~~~~~~~~~~
                                    enable_if
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:538:63: note: 
    'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                            ^
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:20:
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:58:79: error: expected
    expression
struct add_const_past_pointer<T, std::enable_if_t<std::is_pointer<T>::value>> {
                                                                            ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:60:2: error: expected a type
};
^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:64:16: warning: alias
    declarations are a C++11 extension [-Wc++11-extensions]
using type = const T &;
             ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:68:40: error: no template
    named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
                                std::enable_if_t<std::is_pointer<T>::value>> {
                                ~~~~~^~~~~~~~~~~
                                     enable_if
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:538:63: note: 
    'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
                                                            ^
In file included from /Users/valent/Library/julia/src/runtime_ccall.cpp:6:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMap.h:16:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringMapEntry.h:18:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/StringRef.h:12:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/STLExtras.h:19:
In file included from /Users/valent/Library/julia/usr/include/llvm/ADT/Optional.h:20:
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:68:80: error: expected
    expression
                                std::enable_if_t<std::is_pointer<T>::value>> {
                                                                             ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:70:2: error: expected a type
};
^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:76:45: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  copy_construction_triviality_helper() = default;
                                          ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:77:87: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  copy_construction_triviality_helper(const copy_construction_triviality_helper&) = default;
                                                                                    ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:78:46: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  ~copy_construction_triviality_helper() = default;
                                           ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:83:45: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  move_construction_triviality_helper() = default;
                                          ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:84:76: warning: rvalue
    references are a C++11 extension [-Wc++11-extensions]
  move_construction_triviality_helper(move_construction_triviality_helper&&) = default;
                                                                         ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:84:82: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  move_construction_triviality_helper(move_construction_triviality_helper&&) = default;
                                                                               ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:85:46: warning: defaulted
    function definitions are a C++11 extension [-Wc++11-extensions]
  ~move_construction_triviality_helper() = default;
                                           ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:100:64: error: a space is
    required between consecutive right angle brackets (use '> >')
        ::llvm::detail::copy_construction_triviality_helper<T>> {};
                                                             ^~
                                                             > >
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:104:42: warning: rvalue
    references are a C++11 extension [-Wc++11-extensions]
struct is_trivially_copy_constructible<T &&> : std::false_type {};
                                       ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:111:64: error: a space is
    required between consecutive right angle brackets (use '> >')
        ::llvm::detail::move_construction_triviality_helper<T>> {};
                                                             ^~
                                                             > >
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:115:42: warning: rvalue
    references are a C++11 extension [-Wc++11-extensions]
struct is_trivially_move_constructible<T &&> : std::true_type {};
                                       ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:121:12: warning: 'auto' type
    specifier is a C++11 extension [-Wc++11-extensions]
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), st...
         ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:121:12: error: 'auto' not
    allowed in function return type
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), st...
         ^~~~
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:121:24: error: expected ';'
    at end of declaration list
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), st...
                     ^
                     ;
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:123:12: error: unknown type
    name 'constexpr'
  static constexpr bool value = decltype(get((T*)nullptr))::value;
         ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:129:12: warning: 'auto' type
    specifier is a C++11 extension [-Wc++11-extensions]
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::tr...
         ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:129:12: error: 'auto' not
    allowed in function return type
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::tr...
         ^~~~
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:129:24: error: expected ';'
    at end of declaration list
  static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::tr...
                     ^
                     ;
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:131:12: error: unknown type
    name 'constexpr'
  static constexpr bool value = decltype(get((T*)nullptr))::value;
         ^
/Users/valent/Library/julia/usr/include/llvm/Support/type_traits.h:143:10: error: unknown type
    name 'constexpr'
static constexpr bool has_trivial_copy_constructor =
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
18 warnings and 20 errors generated.
make[1]: *** [runtime_ccall.o] Error 1
make: *** [julia-src-release] Error 2

So you get the same result that I got. I installed GCC 11 from scratch. I could built all GR dependencies from source, even Qt 5.15.2. So, I thought it would only be a small step to get Julia up and running.

With two patches I managed to build Julia, but I can't run it:

    JULIA usr/lib/julia/corecompiler.ji
ERROR: Unable to load dependent library /opt/src/julia/usr/lib/libgcc_s.2.dylib
Message:dlopen(/opt/src/julia/usr/lib/libgcc_s.2.dylib, 10): no suitable image found.  Did find:
	/opt/src/julia/usr/lib/libgcc_s.2.dylib: code signature in (/opt/src/julia/usr/lib/libgcc_s.2.dylib) not valid for use in process using Library Validation: Trying to load an unsigned library
make[1]: *** [/opt/src/julia/usr/lib/julia/corecompiler.ji] Error 1
make: *** [julia-sysimg-ji] Error 2

Any ideas?

commented

hi, i install the julia in m1 using Rosetta, there is a issue when using add:

pkg> add FFTW
Updating registry at ~/.julia/registries/General
######################################################################## 100.0%
tar: truncated gzip input
tar: Error exit delayed from previous errors.
┌ Warning: could not download https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/5b130d8c1b9f23da50fad7280efdd76529fa0228
└ @ Pkg.Types /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Types.jl:1123
ERROR: SystemError: opening file "/var/folders/y2/d_wnz2hs61z4twjv56ww0bc80000gn/T/jl_0XxCJq/Registry.toml": No such file or directory
Stacktrace:
[1] systemerror(::String, ::Int32; extrainfo::Nothing) at ./error.jl:168
......
[28] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1144
[29] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at ./task.jl:356

Has anyone solved this problem?
Thanks!

@jiaqiwang969 I also encounter this issue. I think it is an issue from the PkgServer, but not Julia itself.
Currently, I solve this issue by changing the mirror of the PkgServer by setting

julia> ENV["JULIA_PKG_SERVER"] = "https://mirrors.bfsu.edu.cn/julia"

Then everything goes well for me.

How can I find out what the problem is. The macOS build on arm64 (Apple M1) always hangs here:

    JULIA usr/lib/julia/corecompiler.ji
    JULIA usr/lib/julia/sys.ji
coreio.jl
exports.jl
essentials.jl
ctypes.jl
gcutils.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
expr.jl
pair.jl
traits.jl
range.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refvalue.jl
refpointer.jl
checked.jl
indices.jl
array.jl
abstractarray.jl
subarray.jl
views.jl
baseext.jl
ntuple.jl
abstractdict.jl
iddict.jl
idset.jl
iterators.jl
namedtuple.jl
./build_h.jl
./version_git.jl
hashing.jl
rounding.jl
div.jl
float.jl
twiceprecision.jl
complex.jl
rational.jl
multinverses.jl
abstractarraymath.jl
arraymath.jl
simdloop.jl
reduce.jl
reshapedarray.jl
reinterpretarray.jl
bitarray.jl
bitset.jl
multimedia.jl
some.jl
dict.jl
abstractset.jl
set.jl
char.jl
strings/basic.jl
strings/string.jl
strings/substring.jl
osutils.jl
c.jl
io.jl
iobuffer.jl
intfuncs.jl
strings/strings.jl
strings/search.jl
strings/unicode.jl
strings/util.jl
strings/io.jl
regex.jl
pcre.jl
./pcre_h.jl
parse.jl
shell.jl

BTW: I code-signed the BB libraries using my Apple developer account. Does someone know how to obtain (and use) the original certificate?

I think @vtjnash or @Keno may be better people to suggest what to do. But I would just start the compilation in gdb and then hit ctrl-c where it is stuck to try see what's going on. And maybe even build a smaller minimal system image to start with.

That hang is one of the known issues, but I forget which one - probably either the PCRE or the libunwind one.

Looks like PCRE2 10.36 is out. I'll try to get that integrated

The upstream bug reported related to PCRE2 is still open though, and the release announcement suggests that it's still a problem

You'll need to carry the patch for it. I think @staticfloat may have even already picked it up.

I have not. PCRE2 10.36 still doesn't contain the fix; see here for discussion: https://bugs.exim.org/show_bug.cgi?id=2618#c23

Ok, somebody just needs to pick up that upstream fix then. I had built a version of 10.36rc1 with the patch applied and it built cleanly and worked, so I'm imagining it should be easy to do for the final 10.36 release.

Thanks for the hint. I checked out 1a8f196, but the problem still exists:

JULIA_BINDIR=/opt/src/julia/usr/bin /opt/src/julia/usr/bin/julia -g1 -O0 -C "apple-a12" --output-ji /opt/src/julia/usr/lib/julia/sys.ji.tmp --startup-file=no --warn-overwrite=yes --sysimage /opt/src/julia/usr/lib/julia/corecompiler.ji sysimg.jl ./

Julia seems to enter an endless loop when processing shell.jl and consumes 100% CPU.

I'm probably doing something wrong. The build still uses PCRE2.v10.35.0+0.aarch64-apple-darwin.tar.gz.

Try:

make -C deps uninstall

and remove the usr dir in the julia build directory.

I removed everything (also the srccache directory) but the build still downloads (and uses) deps/srccache/PCRE2.v10.35.0+0.aarch64-apple-darwin.tar.gz .
I'm on 1a8f196 (HEAD -> cv/pcre2-10.36, origin/cv/pcre2-10.36) Update PCRE2 to 10.36

The PR does not include a BB bump yet. You can build it from source or wait for that to be included.

ah - ok. I'll wait for the BB version then ...

I built and installed pcre2 v10.36 from source, enabled USE_SYSTEM_PCRE=1 in Make.user, and now I'm running into the following problem:

...
./pcre_h.jl
parse.jl
shell.jl
show.jl
compiler/ssair/show.jl
arrayshow.jl
methodshow.jl
cartesian.jl
multidimensional.jl
permuteddimsarray.jl
broadcast.jl
missing.jl
version.jl
error during bootstrap:
LoadError("sysimg.jl", 3, LoadError("Base.jl", 226, LoadError("version.jl", 245, ArgumentError("invalid version string: "))))

Hello,
could someone please make a short summary for this issue, if possible?, mainly, what is holding this back to move forward and if is realistic to have it working in the near future. Thank you.

could someone please make a short summary for this issue, if possible?

The description at the top mentioned lists the current outstanding issues to fix which are holding back Julia supporting Apple Silicon.

mainly, what is holding this back to move forward and if is realistic to have it working in the near future

With some hot fixes I have Julia running directly on Apple Silicon. There are some issues running the tests and those need to be worked through before you'll see a Julia release with official support. If you're willing to compile Julia yourself I would guess support will be available in about a month.

@omus: What's the trick to get Julia running directly on Apple Silicon? I made two hot fixes to get it compiled, but run into the above mentioned "version" issue now. Could you provide a patch file?

I've pushed my hot fixes to cv/arm-hotfix which should allow you to complete a build of Julia using BB. For those running into "Trying to load an unsigned library" you can work around this by using ls -1 usr/lib/*.dylib | xargs -I{} codesign --sign - {} to adhoc sign the unsigned libraries and then re-run make.

It definitely has to be mentioned that this is not a production ready version of Julia and it should only be used to work through the issues on Apple Silicon.

@omus : Thanks a lot. Works perfect for me. Just want to make some tests and performance comparisons to have GR.jl ready when Apple M1 is officially supported.

For those that don't have gfortran installed; you can force a BB triplet by setting BB_TRIPLET_LIBGFORTRAN_CXXABI, so the steps I had to take to get Curtis' branch building on a fairly vanilla M1 setup:

$ git checkout cv/arm-hotfix
$ make BB_TRIPLET_LIBGFORTRAN_CXXABI=aarch64-apple-darwin-libgfortran5-cxx11 -j9

Once it hits bootstrap, it will error with an error such as:

libgcc_s.2.dylib: code signature in (libgcc_s.2.dylib) not valid for use in process using Library Validation: Trying to load an unsigned library

To fix that, use Curtis' handy one-liner and build again:

$ ls -1 usr/lib/*.dylib | xargs -I{} codesign --sign - {}
$ make BB_TRIPLET_LIBGFORTRAN_CXXABI=aarch64-apple-darwin-libgfortran5-cxx11 -j9

Et Voilà! You have yourself a semi-functional Julia build! Feel free to ignore the dozens of places the build system is yelling at you that gfortran is not a recognized command, and that python is complaining about missing arguments.... this is all due to the fact that we try to guess which libgfortran ABI we should be using by what version of gfortran is installed, but since we don't actually need to use gfortran during a normal BB build, we should support a more graceful fallback (like automatically assuming you want the latest libgfortran version, and just using that in the rest of the build).

Have we started including M1 macOS in the list of supported platforms for BB already? IIRC, it was available as experimental some time ago.

No, it's still listed as experimental. @Keno have you heard anything about the GCC version we use being merged into a more mainline branch of GCC? That's the main reason I have it hidden behind the experimental flag.

There is also the fact that having those architectures makes the Artifacts.toml incompatible with Julia 1.5-, I don't think we really want to enable them by default in the near future

X-ref some build improvements: #39338

This makes it unnecessary to set the BB triplet above; now make just works nicely.

@omus : Thanks a lot. Works perfect for me. Just want to make some tests and performance comparisons to have GR.jl ready when Apple M1 is officially supported.

Hello @jheinen do you mind sharing the complete workflow that you did in order to have Julia running?(suppose I have just opened a new M1), I tried to read your previous attempts, but everything looks a little bit scrambled.

This is my complete workflow:

  • build curl-7.74.0 and install it in /usr/local (see attached CMake config)
  • git clone https://github.com/JuiaLang/julia
  • cd julia
  • echo "USE_SYSTEM_CURL=1" >Make.user
  • patch -p1 <mypatch.diff
  • env CXXFLAGS=-std=c++14 make
  • ls -1 usr/lib/*.dylib | xargs -I{} codesign --sign - {}
  • env CXXFLAGS=-std=c++14 make
  • ln -s /usr/local/lib/libcurl.4.dylib usr/lib/
  • env CXXFLAGS=-std=c++14 make
  • finally, to be able to install packages, I had to replace usr/bin/7z with the x86_64 version (the arm64 version crashes)

With the above workflow, I was able to install a minimal set of packages (GR, PackageCompiler, LaTeXStrings) and could run most of the GR examples. There are still some error messages (Error: curl_easy_setopt: 48), but the setup worked for my performance tests.

mypatch.diff:

diff --git a/base/version.jl b/base/version.jl
index 86343dcdda..01615c499a 100644
--- a/base/version.jl
+++ b/base/version.jl
@@ -247,7 +247,8 @@ const libllvm_version = if endswith(libllvm_version_string, "jl")
     # (LLVM does never report a prerelease version anyway)
     VersionNumber(libllvm_version_string[1:end-2])
 else
-    VersionNumber(libllvm_version_string)
+    # VersionNumber(libllvm_version_string)
+    VersionNumber("11.0.0")
 end
 
 libllvm_path() = ccall(:jl_get_libllvm, Any, ())
diff --git a/src/signals-mach.c b/src/signals-mach.c
index 3737bab100..50da3e5b29 100644
--- a/src/signals-mach.c
+++ b/src/signals-mach.c
@@ -279,8 +279,8 @@ kern_return_t catch_exception_raise(mach_port_t            exception_port,
         }
 #endif
         else {
-            if (!(exc_state.__err & WRITE_FAULT))
-                return KERN_INVALID_ARGUMENT; // rethrow the SEGV since it wasn't an error with writing to read-only memory
+            //cjhif (!(exc_state.__err & WRITE_FAULT))
+            //cjh    return KERN_INVALID_ARGUMENT; // rethrow the SEGV since it wasn't an error with writing to read-only memory
             excpt = jl_readonlymemory_exception;
         }
         jl_throw_in_thread(tid, thread, excpt);
diff --git a/src/stackwalk.c b/src/stackwalk.c
index 4b0e832664..f3e63e17ee 100644
--- a/src/stackwalk.c
+++ b/src/stackwalk.c
@@ -552,8 +552,8 @@ NOINLINE size_t rec_backtrace_ctx_dwarf(jl_bt_element_t *bt_data, size_t maxsize
 {
     size_t bt_size = 0;
     bt_cursor_t cursor;
-    if (unw_init_local_dwarf(&cursor, context) != UNW_ESUCCESS)
-        return 0;
+    //cjhif (unw_init_local_dwarf(&cursor, context) != UNW_ESUCCESS)
+    //cjh    return 0;
     jl_unw_stepn(&cursor, bt_data, &bt_size, NULL, maxsize, 0, &pgcstack, 1);
     return bt_size;
 }

CMake config for curl:

 BUILD_CURL_EXE                   ON                                                               
 BUILD_SHARED_LIBS                ON                                                               
 BUILD_TESTING                    ON                                                               
 CMAKE_BUILD_TYPE                                                                                  
 CMAKE_EXECUTABLE_FORMAT          MACHO                                                            
 CMAKE_INSTALL_PREFIX             /usr/local                                                       
 CMAKE_LBER_LIB                   lber                                                             
 CMAKE_LDAP_INCLUDE_DIR                                                                            
 CMAKE_LDAP_LIB                   ldap                                                             
 CMAKE_OSX_ARCHITECTURES                                                                           
 CMAKE_OSX_DEPLOYMENT_TARGET                                                                       
 CMAKE_OSX_SYSROOT                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platf
 CMAKE_USE_BEARSSL                OFF                                                              
 CMAKE_USE_MBEDTLS                OFF                                                              
 CMAKE_USE_NSS                    OFF                                                              
 CMAKE_USE_OPENSSL                ON                                                               
 CMAKE_USE_SECTRANSP              ON                                                               
 CMAKE_USE_WOLFSSL                OFF                                                              
 COREFOUNDATION_FRAMEWORK         /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platf
 CURL_BROTLI                      OFF                                                              
 CURL_CA_BUNDLE_SET               ON                                                               
 CURL_CA_FALLBACK                 OFF                                                              
 CURL_CA_PATH_SET                 ON                                                               
 CURL_LTO                         OFF                                                              
 CURL_WERROR                      OFF                                                              
 CURL_ZLIB                        AUTO                                                             
 CURL_ZSTD                        OFF                                                              
 ENABLE_ARES                      OFF                                                              
 ENABLE_CURLDEBUG                 OFF                                                              
 ENABLE_DEBUG                     OFF                                                              
 ENABLE_THREADED_RESOLVER         ON                                                               
 ENABLE_UNIX_SOCKETS              ON                                                               
 PICKY_COMPILER                   ON                                                               
 SECURITY_FRAMEWORK               /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platf
 USE_NGHTTP2                      OFF                                                              
 USE_NGTCP2                       OFF                                                              
 USE_QUICHE                       OFF                                                              

Something I noticed that's worth mentioning here is that when running Julia on Rosetta 2, exiting Julia from the REPL doesn't kill the process. A Julia process would still be running behind the scenes using up resources and battery unless I force quit the process. If you know of a better place to report this (to Apple?), please point me to it.

@mohamed82008 : If the exit problem (only) occurs when using GR, you might set export GKS_NO_EXIT_HANDLER=1 before starting Julia.

@jheinen no it's pretty general.

I thought it was related to GR and tried to fix it. Seemed to me like a recursion in signal / exit handlers ....

Since #39625 was merged building has gotten a bit easier:

git clone https://github.com/JuiaLang/julia
cd julia
git apply m1.patch
make CXXFLAGS=-std=c++14 -j8

m1.patch:

diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl
index f5de8eac94..954d547c33 100644
--- a/contrib/generate_precompile.jl
+++ b/contrib/generate_precompile.jl
@@ -156,7 +156,7 @@ Pkg = get(Base.loaded_modules,

 if Pkg !== nothing
     # TODO: Split Pkg precompile script into REPL and script part
-    repl_script *= Pkg.precompile_script
+    # repl_script *= Pkg.precompile_script
 end

 FileWatching = get(Base.loaded_modules,
@@ -375,7 +375,7 @@ function generate_precompile_statements()
     if have_repl
         # Seems like a reasonable number right now, adjust as needed
         # comment out if debugging script
-        @assert n_succeeded > 1200
+        # @assert n_succeeded > 1200
     end

     tot_time = time_ns() - start_time
diff --git a/src/signals-mach.c b/src/signals-mach.c
index 3737bab100..0fd8fc8617 100644
--- a/src/signals-mach.c
+++ b/src/signals-mach.c
@@ -279,8 +279,8 @@ kern_return_t catch_exception_raise(mach_port_t            exception_port,
         }
 #endif
         else {
-            if (!(exc_state.__err & WRITE_FAULT))
-                return KERN_INVALID_ARGUMENT; // rethrow the SEGV since it wasn't an error with writing to read-only memory
+            // if (!(exc_state.__err & WRITE_FAULT))
+            //     return KERN_INVALID_ARGUMENT; // rethrow the SEGV since it wasn't an error with writing to read-only memory
             excpt = jl_readonlymemory_exception;
         }
         jl_throw_in_thread(tid, thread, excpt);
diff --git a/src/stackwalk.c b/src/stackwalk.c
index c6c0cb9d26..a826fecc1f 100644
--- a/src/stackwalk.c
+++ b/src/stackwalk.c
@@ -552,8 +552,8 @@ NOINLINE size_t rec_backtrace_ctx_dwarf(jl_bt_element_t *bt_data, size_t maxsize
 {
     size_t bt_size = 0;
     bt_cursor_t cursor;
-    if (unw_init_local_dwarf(&cursor, context) != UNW_ESUCCESS)
-        return 0;
+    // if (unw_init_local_dwarf(&cursor, context) != UNW_ESUCCESS)
+    //     return 0;
     jl_unw_stepn(&cursor, bt_data, &bt_size, NULL, maxsize, 0, &pgcstack, 1);
     return bt_size;
 }

Notes:

  • The patch to contrib/generate_precompile.jl works around hanging that can occur at Generating REPL precompile statements... 23/30 (Pkg.add("TestPkg"))
  • The -std=c++14 flag will no longer be needed once #39707 is merged

Thanks for a nice instruction. I still encountered the following problem.

...
iobuffer.jl
intfuncs.jl
strings/strings.jl
strings/search.jl
strings/unicode.jl
strings/util.jl
strings/io.jl
regex.jl
pcre.jl
./pcre_h.jl
parse.jl
shell.jl
error during bootstrap:
LoadError(at "sysimg.jl" line 3: LoadError(at "Base.jl" line 206: LoadError(at "shell.jl" line 255: LoadError(at "shell.jl" line 335: ErrorException("PCRE JIT error: no more memory")))))

I know @staticfloat has run into the same issue but unfortunately I've not been able to reproduce. Maybe try make -C deps distclean-pcre; make USE_BINARYBUILDER_PCRE=0 CXXFLAGS=-std=c++14 -j8 to see if building PCRE from source works any better.

@omus Thanks! However, the same error persists.

Same for me. Even my old setup (s.o.) doesn't work anymore !?

It's the first that I've tried to compile Julia in my M1 MacBook Air. I've applied @omus's patch and compile with std=c++14 but it failed with both native clang++ and homebrew's LLVM clang++.

I could successfully build the current Julia master branch (Version 1.7.0-DEV.581) with a locally built libpcre2 and libcurl. Also, 7z is still broken and has to be copied manually.

On macOS we've switched to using LLVM's libunwind (#39127) so commenting out unw_init_local_dwarf should no longer be necessary. Dynamic unwinding isn't working yet so plenty of test cases involving stack traces fail but LLVM libunwind does include support Apple silicon so we're one step closer.

I could successfully build the current Julia master branch (Version 1.7.0-DEV.581) with a locally built libpcre2 and libcurl. Also, 7z is still broken and has to be copied manually.

Very interesting. I'm not seeing any of those failures. Would you mind posting the failures you're seeing for libcurl and 7z? BB support for libcurl should have been addressed as of #39625

7z crashed when I tried to install/update packages with the #master build. At the moment I am happy to have something running. I will try it again later in a second installation and post any errors here.

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.

But there's still one weird thing. If I use the above installation from another user account, 7z fails (and I will have to replace it):

(@v1.7) pkg> up
    Updating registry at `~/.julia/registries/General`
┌ Warning: Your registry may be outdated. We recommend that you run the following command: using Pkg; Pkg.Registry.rm("General"); Pkg.Registry.add("General")
└ @ Pkg.Registry /opt/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Registry/Registry.jl:156
┌ Error: could not download https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/18dcca7564ae533065e0198435a078dc229e3ce6
│   exception =
│    failed process: Process(setenv(`/opt/julia/usr/bin/7z x /var/folders/n1/qkr8qs756p93z27qlcyk9w0m0000gn/T/jl_8jrPFg-download.gz -so`,["CLICOLOR=1", "XPC_FLAGS=0x0", "PATH=/opt/julia/usr/bin:.:/usr/local/bin:/usr/local/qt5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/gcc/bin", "PWD=/Users/jheinen", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "SHELL=/bin/zsh", "DYLD_FALLBACK_LIBRARY_PATH=/opt/julia/usr/bin/../lib/julia:/opt/julia/usr/bin/../lib:/Users/jheinen/lib:/usr/local/lib:/lib:/usr/lib", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"  …  "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.MjbJFTT4jo/Listeners", "_=/opt/julia/usr/bin/julia", "GKS_NO_EXIT_HANDLER=1", "USER=jheinen", "SECURITYSESSIONID=186a5", "TERM=xterm-color", "LESSCHARSET=utf-8", "TERM_PROGRAM_VERSION=440", "HOME=/Users/jheinen", "OPENBLAS_MAIN_FREE=1"]), ProcessSignaled(9)) [0]

@jheinen Thanks for your help. I succeeded in building Julia, but failed in building GR with the following error. I already replaced 7z with an x86_64 version.

    Building GR → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/aaebdf5588281c2902f499b49e67953f2b409c9c/build.log`
ERROR: Error building `GR`: 
tar: Error opening archive: Failed to open 'downloads/gr-0.54.0-Darwin-aarch64.tar.gz'
[ Info: Downloading pre-compiled GR 0.54.0 Darwin binary
[ Info: Using insecure connection
[ Info: Cannot download GR run-time
ERROR: LoadError: failed process: Process(`tar xzf downloads/gr-0.54.0-Darwin-aarch64.tar.gz`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:440
in expression starting at /Users/***/.julia/packages/GR/G9I5v/deps/build.jl:98

@MGYamada : There is now an inofficial build for gr-0.54.0-Darwin-aarch64.tar.gz on our download server. The ARM64 build is not yet configured in our CI/CD, so I created/copied it manually.

I could also provide a universal build for the GR run-time, but I didn't make a final decision about the future deployment yet.

What about using homebrew p7zip (for me it runs native in ARM)

Homebrew's p7zip works fine for me.

We should file an issue upstream, or if adopt homebrew patches. Or is it a case that needs a new version? Might as well get those PRs going!

Recent developments on PCRE JIT error: no more memory: #39719 (comment)

Sorry to disturb guys but I am EAGER to use Julia on my Mac M1. I cannot compile. I've tried everything that most people posted here several git patches and Make.user. I get this error when running the compiled binary:

❯ ./julia
ERROR: Unable to load dependent library /Users/storopoli/Desktop/julia/usr/lib/libjulia-internal.1.dylib
Message:dlopen(/Users/storopoli/Desktop/julia/usr/lib/libjulia-internal.1.dylib, 10): image not found

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, 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

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.

Thanks for the clarification. I did not know that.

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

@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.

@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....

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.

Rmath_jll is now installing in ARM !

Rmath_jll is now installing in ARM !

I doubt it works though 🤔

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

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

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

(@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