Error creating system image on Mac with Apple M1
- Dominant language
- Python
- Stars
- 893
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
I recently bought a new MacBook Pro with an M1 chip and I am working to transition my projects from my old mac to my new one.
On one of my projects I had need to [create a custom system image](https://pyjulia.readthedocs.io/en/latest/sysimage.html) because I use conda to manage my python environments. The following command worked fine on my old (non-M1) Mac
```
python3 -m julia.sysimage sys.dylib
```
but on my new M1-base Mac I am getting errors
```
/Library/Developer/CommandLineTools/usr/bin/python3: Error while finding module specification for 'julia-py.sysimage' (ModuleNotFoundError: No module named 'julia-py')
(ilqgames_jl) ro27711@582709-MITLL:~/Projects/MAST/ilqgames.jl (master)
$ python3 -m julia.sysimage sys.dylib
Activating new project at `/var/folders/d8/93mjk3sn5jv6sb8gjhm9gcbw0000gn/T/tmp.pyjulia.sysimage.s26ma20l/compiler_env`
[ Info: Installing PackageCompiler...
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/private/var/folders/d8/93mjk3sn5jv6sb8gjhm9gcbw0000gn/T/tmp.pyjulia.sysimage.s26ma20l/compiler_env/Project.toml`
⌃ [9b87118b] + PackageCompiler v1.7.7
Updating `/private/var/folders/d8/93mjk3sn5jv6sb8gjhm9gcbw0000gn/T/tmp.pyjulia.sysimage.s26ma20l/compiler_env/Manifest.toml`
⌃ [9b87118b] + PackageCompiler v1.7.7
⌅ [05181044] + RelocatableFolders v0.1.3
[6c6a2e73] + Scratch v1.1.1
[0dad84c5] + ArgTools v1.1.1
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[f43a241f] + Downloads v1.6.0
[7b1f6079] + FileWatching
[b77e0a4c] + InteractiveUtils
[4af54fe1] + LazyArtifacts
[b27032c2] + LibCURL v0.6.3
[76f85450] + LibGit2
[8f399da3] + Libdl
[56ddb016] + Logging
[d6f4376e] + Markdown
[ca575930] + NetworkOptions v1.2.0
[44cfe95a] + Pkg v1.8.0
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA v0.7.0
[9e88b42a] + Serialization
[6462fe0b] + Sockets
[fa267f1f] + TOML v1.0.0
[a4e569a6] + Tar v1.10.0
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[deac9b47] + LibCURL_jll v7.84.0+0
[29816b5a] + LibSSH2_jll v1.10.2+0
[c8ffd9c3] + MbedTLS_jll v2.28.0+0
[14a3606d] + MozillaCACerts_jll v2022.2.1
[83775a58] + Zlib_jll v1.2.12+3
[8e850ede] + nghttp2_jll v1.48.0+0
[3f19e933] + p7zip_jll v17.4.0+0
Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ cannot be upgraded. To see why use `status --outdated -m`
┌ Error: build.log for PackageCompiler [9b87118b-4619-50d2-8e1e-99f35a4d4d9d] not found
└ @ Main ~/Library/Python/3.8/lib/python/site-packages/julia/install-packagecompiler.jl:19
[ Info: Loading PackageCompiler...
[ Info: PackageCompiler is successfully installed at /var/folders/d8/93mjk3sn5jv6sb8gjhm9gcbw0000gn/T/tmp.pyjulia.sysimage.s26ma20l/compiler_env
Traceback (most recent call last):
File "/Users/ro27711/Library/Python/3.8/bin/julia-py", line 8, in
sys.exit(main())
File "/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/julia_py.py", line 151, in main
julia_py(**vars(parse_args(args, **kwargs)))
File "/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/julia_py.py", line 41, in julia_py
api = LibJulia.from_juliainfo(juliainfo)
File "/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/libjulia.py", line 203, in from_juliainfo
return cls(
File "/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/libjulia.py", line 226, in __init__
self.libjulia = ctypes.PyDLL(libjulia_path, ctypes.RTLD_GLOBAL)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Applications/Julia-1.8.app/Contents/Resources/julia/lib/libjulia.1.8.dylib, 0x000A): tried: '/Applications/Julia-1.8.app/Contents/Resources/julia/lib/libjulia.1.8.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
Command '['/Users/ro27711/Library/Python/3.8/bin/julia-py', '--julia', 'julia', '--compiled-modules=no', '--color=yes', '/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/compile.jl', '/var/folders/d8/93mjk3sn5jv6sb8gjhm9gcbw0000gn/T/tmp.pyjulia.sysimage.s26ma20l/compiler_env', '/Users/ro27711/Library/Python/3.8/lib/python/site-packages/julia/precompile.jl', '/Users/ro27711/Projects/MAST/ilqgames.jl/sys.dylib', '']' returned non-zero exit status 1.
```
Anyone run into something similar?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.