When I build my docs locally, they run the link checks without issue with linkcheck = true. However, when I build the docs via GitHub Actions on ubuntu-latest I get Warning: linkcheck requires curl. which indicates it cannot find an installation curl. To ensure that curl is installed, I added a curl installation step before building the docs which shows that curl is indeed installed, but still is not being recognized by Documenter.
I added the following shell command to my workflow in the “Check curl” section:
> julia -e 'println(success(`curl --version`)); println(Sys.which("curl"))'
Which yields:
true
/usr/bin/curl
However, with the documentation build I still get:
> julia --project=docs/ --color=yes docs/make.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
┌ Warning: linkcheck requires `curl`.
â”” @ Documenter.DocChecks ~/.julia/packages/Documenter/bFHi4/src/DocChecks.jl:185
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.
┌ Info: Deployment criteria for deploying preview build from GitHub Actions:
│ - ✔ ENV["GITHUB_REPOSITORY"]="pulsipher/InfiniteOpt.jl" occurs in repo="github.com/pulsipher/InfiniteOpt.jl"
│ - ✔ ENV["GITHUB_REF"] corresponds to a PR number
│ - ✔ `push_preview` keyword argument to deploydocs is `true`
│ - ✔ ENV["GITHUB_ACTOR"] exists and is non-empty
│ - ✔ ENV["DOCUMENTER_KEY"] exists and is non-empty
â”” Deploying: âś”
.
.
.
Ok when I switch to Julia 1.6 I got this more helpful error message:
curl: /opt/hostedtoolcache/julia/1.6.1/x64/bin/../lib/julia/libcurl.so.4: no version information available (required by curl)
Which relates to this stack exchange. When I run locate libcurl.so.4 on GitHub Actions using ubuntu-latest (after installing the documentation julia dependencies) I get:
I checked at various points in the build and it appears that LD_LIBRARY_PATH is never set by anything. It appears the extra libcurl is introduced when julia-actions/setup-julia@latest is included and that causes the curl: /opt/hostedtoolcache/julia/1.6.1/x64/bin/../lib/julia/libcurl.so.4: no version information available (required by curl) problem when documenter uses curl to linkcheck. I have only been able to remedy the problem with the hacky bash script shown above.
@fredrikekre You were exactly right. I tried to figure out a minimum working example (GitHub - pulsipher/JuliaCurlTest) and figured out the problem lies with Ipopt.jl. I can replicate the error using the following script (let’s call it curl.jl):
Interesting. Would be nice if Ipopt didn’t do that, but perhaps it is necessary for some reason. In any case it might be possible to guard against this in Documenter perhaps.