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

MacOS Apple Silicon Precompilation Error #309

Closed
storopoli opened this issue Dec 25, 2022 · 6 comments · Fixed by #315
Closed

MacOS Apple Silicon Precompilation Error #309

storopoli opened this issue Dec 25, 2022 · 6 comments · Fixed by #315

Comments

@storopoli
Copy link
Contributor

I am getting this error when trying to add Books.jl in a fresh environment:

pkg> precompile
Precompiling project...
  ✗ Books
  0 dependencies successfully precompiled in 3 seconds. 88 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Books [939d5c6b-51ae-42e7-97ca-7564d0d4ad91]

Failed to precompile Books [939d5c6b-51ae-42e7-97ca-7564d0d4ad91] to /Users/storopoli/.julia/compiled/v1.8/Books/jl_Wh6Qsr.
ERROR: LoadError: UndefVarError: pandoc_crossref_path not defined
Stacktrace:
 [1] include
   @ ./Base.jl:419 [inlined]
 [2] 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:1554
 [3] top-level scope
   @ stdin:1
in expression starting at /Users/storopoli/.julia/packages/Books/8Xi9l/src/Books.jl:1
in expression starting at stdin:1
@lazarusA
Copy link

ahhh, same here, but close, #307 take a look.

@kahaaga
Copy link

kahaaga commented Dec 28, 2022

I also have the identical problem on a MacBook Air (M1, 2020; MacOS Monterey). Fresh julia environment, identical error message to the above. I could not resolve the issue by opening Julia with Rosetta, as hinted at in #307.

If anyone has step-by-step instructions to make this work on an M1-mac, using any some of workaround, it would be greatly appreciated.

@lazarusA
Copy link

lazarusA commented Dec 28, 2022

@kahaaga deleting first completely your ~./julia directory and then installing Julia for macOS x86 (Intel or Rosetta) did work for me. I needed to get rid-off of some corruptions in the scratchspaces folder, and just to be sure I nuked the whole folder.

But, maybe a better solution will be to have support for M1, as hinted by #308

@kahaaga
Copy link

kahaaga commented Dec 28, 2022

@lazarusA Thank you so much! With a slight modification, that did the trick. For anyone else seeing this, what worked for me was

  1. Completely uninstalling all Julia versions on my system.
  2. Deleting the ~./julia folder.
  3. Downloading and installing, as suggested by @lazarusA, Julia macOS x86.
  4. Open Julia again (which should now automatically open in Rosetta; you can verify this by right-clicking the julia icon in the Applications folder and select "get info")
  5. Run using Pkg; Pkg.install("Books"); using Books.

For some reason, without step 1, I kept getting the same error. I don't understand why. Anyways, following the steps above, it now works.

@storopoli
Copy link
Contributor Author

I think this should be fixed with JuliaBinaryWrappers/pandoc_crossref_jll.jl being built for aarch64-apple-darwin.

Related: JuliaPackaging/Yggdrasil#2763

@ivaquero
Copy link

ivaquero commented Mar 1, 2023

The problem remains, because pandoc_crossref_jll.jl started to support aarch64-apple-darwin since v0.3.12+0, but Books.jl's dependency is v0.3.9+0.

@rikhuijzer could you please bump the versions of pandoc_crossref_jll.jl and other deps ?

rikhuijzer pushed a commit that referenced this issue Jan 17, 2024
Hello @rikhuijzer , we are trying to use Books.jl and would like for it to be able to build the site on Apple Silicon Machines. I did the following to make it work

1. Bump package version of `pandoc_jll` , `pandoc_corssref_jll`, `tectonic_jll`. 
2. Fixed [Lua script](https://github.com/JuliaBooks/Books.jl/blob/fb37b180728af070ecb7985e47b7a59577eb81c9/src/output-block.lua#L8C1-L8C1) for supporting pandoc >= 2.16

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

Successfully merging a pull request may close this issue.

4 participants