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

generate_precompile script is requiring network access #40185

Closed
nico202 opened this issue Mar 25, 2021 · 11 comments
Closed

generate_precompile script is requiring network access #40185

nico202 opened this issue Mar 25, 2021 · 11 comments
Labels
domain:building Build system, or building Julia or its dependencies domain:packages Package management and loading kind:regression Regression in behavior compared to a previous version

Comments

@nico202
Copy link
Contributor

nico202 commented Mar 25, 2021

Hi, when building the latest release tarball, I get

Generating REPL precompile statements... 29/29
Executing precompile statements... 1148/1148
ERROR: LoadError: AssertionError: n_succeeded > 1200

Any idea on why the total number of precompile statements is less than expected?

Thanks

@Sacha0
Copy link
Member

Sacha0 commented Mar 25, 2021

You may be able to see more by toggling debug_output in contrib/generate_precompile.jl and rebuilding:

debug_output = devnull # or stdout

@KristofferC
Copy link
Sponsor Member

KristofferC commented Mar 25, 2021

Yeah, it can be two things:

  • We are naturally very close to that assertion threshold and should lower it.
  • Something is going bad during the precompile generation and it isn't running what it should be running. Doing what @Sacha0 suggested should identify this.

@nico202
Copy link
Contributor Author

nico202 commented Mar 25, 2021

Thanks, I rebuilt following @Sacha0 suggestion. It seems that the only thing going bad is the Pkg.add part (because the build happens in an environment with no internet connection, so cloning registry from "https://github.com/JuliaRegistries/General.git" fails). This leads to Pkg.develop to fail, and then Pkg.add.

I think I'll just lower the threshold for the guix package...
Thanks

@KristofferC
Copy link
Sponsor Member

Pkg.add part (because the build happens in an environment with no internet connection, so cloning registry from "https://github.com/JuliaRegistries/General.git" fails).

Oh, hm. That is a mistake from our side, that shouldn't run (exactly because it shouldn't require internet access to run that part).

@nico202
Copy link
Contributor Author

nico202 commented Mar 25, 2021

Wait, I got the error wrong. It also complained about certificates, so I added nss-certs (mozilla CA certificates) to the build environment and now it did work (Executing precompile statements... 1323/1323)
Thanks! And congrats for the release

@nico202 nico202 closed this as completed Mar 25, 2021
@vtjnash
Copy link
Sponsor Member

vtjnash commented Mar 25, 2021

I thought we had issue before about avoiding network access in generate_precompile. This might be a regression?

@vtjnash vtjnash reopened this Mar 25, 2021
@vtjnash vtjnash changed the title v1.6.0 tarball build failing (number of precompile statements < 1200) generate_precompile script is requiring network access Mar 25, 2021
@vtjnash vtjnash added domain:building Build system, or building Julia or its dependencies domain:packages Package management and loading kind:regression Regression in behavior compared to a previous version sockets and removed sockets labels Mar 25, 2021
@Sacha0
Copy link
Member

Sacha0 commented Mar 25, 2021

IIRC generate_precompile builds a mock registry to avoid going to network, but the cert issue that nico202 mentioned breaks that mock setup, and downstream operations subsequently try to go to network. (We ran into the same issue :).) So I think all is well, it's just the cert issue.

@KristofferC
Copy link
Sponsor Member

Yep, I tried it myself without internet connection and it worked fine.

@ghost
Copy link

ghost commented Mar 26, 2021

Encountered the same issue with Nix and it was addressed by adding cacert as a build input.

@nico202
Copy link
Contributor Author

nico202 commented Mar 26, 2021

OT: @ninjin
Have you encountered errors like this:

/../lib/julia/libjulia-internal.so.1
Message:libLLVM-11.so: cannot open shared object file: No such file or directory

when running the built julia? I could fix this by wrapping the binary with LD_LIBRARY_PATH, but I guess it would be better to set the proper RPATH at build time

(I'm writing the package for guix)

@ghost
Copy link

ghost commented Mar 27, 2021

@nico202 Not yet as I suspect you have gotten slightly further than me. This is probably not a good place for discussion, feel free to either drop me an e-mail or by all means join me in #nix over on the Julia Slack as I suspect there is plenty of knowledge/experience to be shared between Nix/Guix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies domain:packages Package management and loading kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

4 participants