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:
/opt/hostedtoolcache/julia/1.6.1/x64/lib/julia/libcurl.so.4
/opt/hostedtoolcache/julia/1.6.1/x64/lib/julia/libcurl.so.4.7.0
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.6.0
/usr/local/julia1.6.1/lib/julia/libcurl.so.4
/usr/local/julia1.6.1/lib/julia/libcurl.so.4.7.0
Hence, Julia installed a version of libcurl that is different that the one already installed. Thus a workflow like this should fix the problem:
name: Documentation
on:
push:
branches: [master]
tags: '*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.6' # Build documentation on Julia 1.6
- name: Install julia dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Fix curl mismatch # (https://stackoverflow.com/questions/30017397/error-curl-usr-local-lib-libcurl-so-4-no-version-information-available-requ)
run: |
julia_libcurl="$(dirname "$(which julia)")/../lib/julia/libcurl.so.4"
sudo rm $julia_libcurl
sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4 $julia_libcurl
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ --color=yes docs/make.jl
When I run the above, I am able to linkcheck without issue.
To limit the amount of hardcoding needed, we can instead run:
sys_libcurl="$(find /usr/lib/x86_64-linux-gnu -maxdepth 1 -name "libcurl.so.*" | sort -n | tail -1)"
julia_lib="$(dirname "$(which julia)")/../lib/julia"
julia_libcurl="$(find $julia_lib -maxdepth 1 -name "libcurl.so.[0-9]" | sort -n | tail -1)"
sudo rm $julia_libcurl
sudo ln -s $sys_libcurl $julia_libcurl
This will search for the right libcurl.so.x versions instead of hard coding libcurl.so.4.
Someone with a better knowledge of the innerworkings could probably come up with a less hacky solution, but this is the best I could come up with.