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

Failed to compile on M1 Mac #13

Open
plavin opened this issue Dec 27, 2021 · 12 comments
Open

Failed to compile on M1 Mac #13

plavin opened this issue Dec 27, 2021 · 12 comments
Labels

Comments

@plavin
Copy link

plavin commented Dec 27, 2021

When installing TikzPictures.jl, this package fails to build. Below is the (slightly abridged) output from import Pkg; Pkg.precompile(). I'm on a 2020 M1 MacBook Air running macOS 11.4 Big Sur.

I was able to install tectonic separately using homebrew, so perhaps there is a way for this project to support it without too much effort.

ERROR: LoadError: Failed to precompile Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f] to /Users/plavin3/.julia/compiled/v1.7/Tectonic/jl_hxNb1w.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /Users/plavin3/.julia/packages/TikzPictures/Kichj/src/TikzPictures.jl:1

Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f]

Failed to precompile Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f] to /Users/plavin3/.julia/compiled/v1.7/Tectonic/jl_BmOu0i.
ERROR: LoadError: Cannot locate artifact 'tectonic_bin' for aarch64-apple-darwin-libgfortran5-cxx11-julia_version+1.7.1 in '/Users/plavin3/.julia/packages/Tectonic/IR51S/Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] artifact_slash_lookup(name::String, artifact_dict::Dict{String, Any}, artifacts_toml::String, platform::Base.BinaryPlatforms.Platform)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:608
  [3] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any, platform::Nothing)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:678
  [4] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:641
  [5] include
    @ ./Base.jl:418 [inlined]
  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:373 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [10] top-level scope
    @ none:1
in expression starting at /Users/plavin3/.julia/packages/Tectonic/IR51S/src/Tectonic.jl:35
in expression starting at /Users/plavin3/.julia/packages/Tectonic/IR51S/src/Tectonic.jl:1

Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1362
 [3] precompile
   @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1013 [inlined]
 [4] #precompile#220
   @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011 [inlined]
 [5] precompile()
   @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011
 [6] top-level scope
   @ REPL[7]:1
@Malte311
Copy link

I have the same issue with a M1 Pro chip (2021 MacBook Pro) running macOS 12.1 Monterey.

@MichaelHatherly
Copy link
Owner

I assume this is with the https://julialang-s3.julialang.org/bin/mac/aarch64/1.7/julia-1.7.1-macaarch64.dmg binary right? Until upstream starts building a native M1 binary for tectonic you'll need to be using the Intel/Rosetta julia binary unfortunately, which I'm pretty sure should work fine on an M1.

@jpfairbanks
Copy link

This is still an issue on julia 1.8. What needs to get fixed upstream?

@jpfairbanks
Copy link

I was also able to build tectonic on M1 via homebrew. Would it be possible to have Tectonic.jl use a homebrew installed version of Tectonic until upstream is fixed?

@MichaelHatherly
Copy link
Owner

There is a https://github.com/JuliaBinaryWrappers/tectonic_jll.jl now, which does have a macOS ARM build, so you may want to directly use that one for the time being.

Tectonic.jl also bundles a biber binary with it, which I've not yet got around to looking into apple silicon support, hence why I'm not yet just pulling in tectonic_jll for the tectonic binary.

@kleinschmidt
Copy link

There is a biber universal binary download (on sourceforge though): https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/current/binaries/MacOS/biber-darwin_universal.tar.gz/download so it may be jll wrappable...

@ararslan
Copy link

ararslan commented Oct 5, 2022

It appears biber supports macOS ARM natively: https://github.com/plk/biber/blob/dev/dist/darwin_arm64/build.sh. The build scripts for the various platforms look simple enough if someone wanted to contribute biber to Yggdrasil. Could be worth opening an issue there.

@kleinschmidt
Copy link

I'll do that! We'd love to be able to use Tectonic.jl on our M1 macs...

@iabraham
Copy link

iabraham commented Mar 3, 2023

Any progress on this issue?

@MichaelHatherly
Copy link
Owner

Just blocked on JuliaPackaging/Yggdrasil#5633 and someone with the time/need for this on that arch.

@nskh
Copy link

nskh commented Jun 30, 2023

Hello, are there any updates on this issue? There's a plotting module I'd like to use that requires PGFPlots which calls out to Tectonic, but this dependency is blocking me. Thanks!

@MichaelHatherly
Copy link
Owner

If you don't need biber support then use the JLL version instead.

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

No branches or pull requests

8 participants