JuliaPackaging/BinaryBuilderBase.jl

`UndefVarError: RegistrySpec not defined` when trying to `run_wizard`

Closed this issue ยท 11 comments

[Pkg.Types.RegistrySpec(uuid = "23338594-aafe-5451-b93e-139f81909106")];

julia> versioninfo()
Julia Version 1.7.0-beta3
Commit e76c9dad42 (2021-07-07 08:12 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin20.5.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.0 (ORCJIT, cyclone)
Environment:
  JULIA_NUM_THREADS = 4
  JULIA_PKG_SERVER = [private registry url]

It looks like Pkg.Types.RegistrySpec is actually Pkg.RegistrySpec for me.

I've tried this on the following:

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake-avx512)
Environment:
  JULIA_NUM_THREADS = 8

and did not hit the issue, because it looks like Pkg.Types exports RegistrySpec in 1.6.1

I see this also. Partial RCA: JuliaLang/Pkg.jl#2183

Since this reaches into the internal API, these calls may need to be cased and aliased by Julia version number.

This is likely fixed by #129, but BinaryBuilder just doesn't work correctly in v1.7+ (and will probably never work in v1.7), reason why #129 is stalling

what do you mean BB will never work on 1.7?

I mean what I said ๐Ÿ™‚ The main issue being that Julia v1.7 is not able to install specific versions of JLL packages which are also standard libraries, which is very important for us (unless this had been fixed in Pkg, I don't really follow it)

Trying to wrap my head around this issue. Does this mean currently any package that depend on BinaryBuilder will not work in Julia 1.7? Is there any way to manually do what BinaryBuilder does to create new binaries for additional platforms?

Does this mean currently any package that depend on BinaryBuilder will not work in Julia 1.7?

Yes, but I'm not sure that's a problem in practice since there are exactly 0 packages depending on BinaryBuilder.

Is there any way to manually do what BinaryBuilder does to create new binaries for additional platforms?

What do you mean exactly? I have a copy of Julia v1.6 (and 1.5, and 1.4, and 1.3, and so on) around to keep using BinaryBuilder

@giordano to be clear, are you saying that for Julia 1.7 and beyond, the installation and use of BinaryBuilder will be unsupported? Is this due to a design change with Julia or a bug in Pkg?

It's surprising because Julialang themselves had a blog posting just two years ago about how Pkg + BinaryBuilder are going to work so well together: https://julialang.org/blog/2019/11/artifacts/

@giordano to be clear, are you saying that for Julia 1.7 and beyond, the installation and use of BinaryBuilder will be unsupported?

I'm moderately sure we won't be able to make BinaryBuilder fully work with v1.7. Hopefully v1.8

Is this due to a design change with Julia or a bug in Pkg?

Not really a bug anywhere, but BinaryBuilder needs to hook into some Pkg internal functions which aren't part of the API, and which got changed between v1.6 and v1.7. I've been trying since March to fix the issues, but lately I've faced even more errors. Unfortunately I'm not very familiar with Pkg internals and without anyone else helping me out, during my spare time I can't do much. For this reason the registry now simply reflects the fact that BinaryBuilder doesn't work in v1.7 and can't be installed there.

It's surprising because Julialang themselves had a blog posting just two years ago about how Pkg + BinaryBuilder are going to work so well together: julialang.org/blog/2019/11/artifacts

It works well with Julia v1.6! And in Yggdrasil we still use Julia v1.6.0, so that will still work. Besides, what should work well are the packages generated by BinaryBuilder, and they also still work.

I'm just a bit surprised why there is so much interest in being able to install BinaryBuilder. Don't get me wrong, I'm happy people are looking into it, but unless you were planning to start using BinaryBuilder right now to build new packages (it doesn't look like any of you contributed to Yggdrasil before), I don't see why you need to install BinaryBuilder at all ๐Ÿ™‚

@giordano my main motivation is to get some of the packages that are not currently compatible with Apple M1 macs working and I'm digging deeper into the Julia Pkg system than I have before. Not ready to submit a PR to Yggdrasil yet but close. Thank you for explaining all this and I appreciate your work to maintain it which enables developers to build great packages!

To build packages for the aarch64-apple-darwin architectures there is this issue which explains what has to be done: JuliaPackaging/Yggdrasil#2763. Also, note that in principle you can just submit a PR without building anything locally (even though that would be extremely useful for local debugging in case something doesn't work)