Closed suy closed 1 year ago
Just fixed by hand editing the python script, as the first python on my path is still Python 2. Just changing the shebang temporarily to python3 does the trick.
Yeah, I'm using Arch where python means python3. ;)
I don't understand this tricks for generating the website. :-) I know AsciiDoctor well (and I'm glad that you use it!), but I think this is just related to Hugo or the custom build.
That's odd. What version of hugo are you using? For reference, this is how CI does it: https://github.com/foonathan/lexy/blob/94499645d7866fc95cf54c06324db2bdc66e66f2/.github/workflows/website.yml#L14-L31
I was using the hugo package from the (not-so-new) linux distro. After getting the latest version from Github releases, I get a different error now (I was building with ninja lexy_docs
before, but using cmake --build
like in the snippet from the CI yields the same):
[0/2] Re-checking globbed directories...
[5/5] cd /home/alex/projects/3rdparty/lexy/docs && /home/alex/local/bin/hugo --minify
FAILED: docs/CMakeFiles/lexy_docs /home/alex/projects/3rdparty/lexy/build/docs/CMakeFiles/lexy_docs
cd /home/alex/projects/3rdparty/lexy/docs && /home/alex/local/bin/hugo --minify
Start building sites …
hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended linux/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: /usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a) with executable asciidoctor (Gem::GemNotFoundException)
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: from /home/alex/local/gems/bin/asciidoctor:23:in `<main>'
ERROR 2022/12/13 17:36:58 asciidoctor rendering benchmark_json.adoc: failed to execute binary "asciidoctor" with args [-a source-highlighter=pygments --no-header-footer -]: /usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a) with executable asciidoctor (Gem::GemNotFoundException)
from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
from /home/alex/local/gems/bin/asciidoctor:23:in `<main>'
The last lines are repeated many times. Invoking asciidoctor
by itself on any adoc
file works fine. I just have set GEM_HOME to ~/local/gems
to have all this extra packages in a separate directory without root access. I'm not sure if Hugo does some sanitizing to the environment, or if it's a way of invoking the asciidoctor
program detecting it from system Ruby that doesn't work.
Anyway, it's probably not too important, as maybe it's an upstream issue in Hugo or Ruby, and my setup maybe it's not so common, so feel free to close the issue. :)
Thank you!
Anyway, it's probably not too important, as maybe it's an upstream issue in Hugo or Ruby, and my setup maybe it's not so common, so feel free to close the issue. :)
Ok :D
While trying to check locally the #102 PR, I tried to build the docs locally following the instructions, but had some issues.
First:
I just fixed by hand editing the python script, as the first
python
on my path is still Python 2. Just changing the shebang temporarily topython3
does the trick. But then I got this one, which is just beyond what I can easily understand:I don't understand this tricks for generating the website. :-) I know AsciiDoctor well (and I'm glad that you use it!), but I think this is just related to Hugo or the custom build.
Thank you very much for Lexy. <3