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

cannot build documentation and hence build fails #27993

Closed
j605 opened this issue Jul 8, 2018 · 8 comments · Fixed by #28005
Closed

cannot build documentation and hence build fails #27993

j605 opened this issue Jul 8, 2018 · 8 comments · Fixed by #28005

Comments

@j605
Copy link

j605 commented Jul 8, 2018

make docs results in

Building HTML documentation.
ERROR: LoadError: ArgumentError: Package Pkg not found in current path:
- Run `Pkg.add("Pkg")` to install the Pkg package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:816
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1034
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] exec_options(::Base.JLOptions) at ./client.jl:234
[6] _start() at ./client.jl:427
in expression starting at /home/jagan/srces/julia-git/src/julia/doc/make.jl:2
make[2]: *** [Makefile:38: html] Error 1
make[2]: Leaving directory '/home/jagan/srces/julia-git/src/julia/doc'
make[1]: *** [Makefile:88: docs] Error 2
make[1]: Leaving directory '/home/jagan/srces/julia-git/src/julia'
Make: *** [Makefile:50: /home/jagan/srces/julia-git/src/julia/doc/_build/html/en/index.html] Error 2 

This is also run as part of make install. make finished with a the julia binary in /home/jagan/srces/julia-git/src/julia/usr/bin/julia so only documentation fails to build.

@fredrikekre
Copy link
Member

What if you apply

diff --git a/doc/make.jl b/doc/make.jl
index bf21f2a..8bdecad 100644
--- a/doc/make.jl
+++ b/doc/make.jl
@@ -1,4 +1,6 @@
 # Install dependencies needed to build the documentation.
+@show LOAD_PATH
+push!(LOAD_PATH, "@stdlib")
 using Pkg
 empty!(DEPOT_PATH)
 pushfirst!(DEPOT_PATH, joinpath(@__DIR__, "deps"))

@j605
Copy link
Author

j605 commented Jul 9, 2018

It fails at a different place now,

Building HTML documentation.
LOAD_PATH = String[]
  Updating registry at `deps/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
ERROR: ArgumentError: Package OldPkg not found in current path:
 - Run `Pkg.add("OldPkg")` to install the OldPkg package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:816
 [2] top-level scope at none:2
 [3] eval at ./boot.jl:319 [inlined]
 [4] eval(::Expr) at ./client.jl:394
 [5] top-level scope at ./none:3 [inlined]
 [6] top-level scope at ./<missing>:0
ERROR: LoadError: Failed to precompile Documenter to /home/jagan/srces/julia-git/src/julia/doc/deps/compiled/v0.7/Documenter/sHGj.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:298 [inlined]
 [3] compilecache(::Base.PkgId) at ./loading.jl:1169
 [4] _require(::Base.PkgId) at ./loading.jl:942
 [5] require(::Base.PkgId) at ./loading.jl:838
 [6] require(::Module, ::Symbol) at ./loading.jl:833
 [7] include at ./boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at ./loading.jl:1034
 [9] include(::Module, ::String) at ./sysimg.jl:29
 [10] exec_options(::Base.JLOptions) at ./client.jl:234
 [11] _start() at ./client.jl:427
in expression starting at /home/jagan/srces/julia-git/src/julia/doc/make.jl:10
make[1]: *** [Makefile:38: html] Error 1
make: *** [Makefile:88: docs] Error 2

@j605
Copy link
Author

j605 commented Jul 10, 2018

@fredrikekre should I open a new issue for OldPkg not being found because the issue is not solved since make docs still doesn't work :(

@fredrikekre fredrikekre reopened this Jul 10, 2018
@fredrikekre
Copy link
Member

OldPkg should be found in the "@stdlib" entry in LOAD_PATH. Can you using OldPkg if you start julia?

@j605
Copy link
Author

j605 commented Jul 10, 2018

No it doesn't load.

julia> using OldPkg
ERROR: ArgumentError: Package OldPkg not found in current path:
 - Run `Pkg.add("OldPkg")` to install the OldPkg package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:816

@fredrikekre
Copy link
Member

What is LOAD_PATH here?

@j605
Copy link
Author

j605 commented Jul 10, 2018

First it was ., then I tried again after resetting it. Both times I had the same result.

@j605
Copy link
Author

j605 commented Jul 10, 2018

Having JULIA_LOAD_PATH=. or an empty string causes the error above whereas removing the variable using unset in bash or set -e in fish builds the documentation. This was discussed in the channel and the speculation is that the code is still tripping on the value set in JULIA_LOAD_PATH in a different place.

fredrikekre added a commit that referenced this issue Jul 10, 2018
do not pick up JULIA_LOAD_PATH when precompiling
Documenter in the doc build
fredrikekre added a commit that referenced this issue Jul 10, 2018
do not pick up JULIA_LOAD_PATH when precompiling
Documenter in the doc build
fredrikekre added a commit that referenced this issue Jul 10, 2018
StefanKarpinski added a commit that referenced this issue Jul 10, 2018
also remove no-longer-needed `import OldPkg` statements
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.

2 participants