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

Debugging read the docs build flow could be easier #2650

Open
valentinThomazic opened this issue Dec 4, 2024 · 8 comments
Open

Debugging read the docs build flow could be easier #2650

valentinThomazic opened this issue Dec 4, 2024 · 8 comments
Assignees
Labels
Component:Doc For issues in the Documentation (e.g. for README.md files) CV32A65X Part: Embedded configuration

Comments

@valentinThomazic
Copy link
Contributor

The build of read the docs has been broken for about a month because of an incorrect configuration and the local build (running make -C docs was also broken during a week.

The local build has been fixed by #2641
The read the docs build still needs fixing (in progress : #2641 #2643).

Currently, the only way I have found to debug efficiently is to fork the cva6 repo and to setup read the docs on the fork.

There is an option in Read the Docs enabling the build on each pull request as a Github action. This would not only make debugging easier but would also prevent merging commits that break the documentation build while providing a preview of what is to be merged when the build is successful.

Here is the (read the docs) documentation about this feature: feature feature configuration

Of course, it is up to OpenHW Group to decide wether they want to do that or not, since this would trigger more builds.

@valentinThomazic
Copy link
Contributor Author

@MikeOpenHWGroup would you mind taking a look at this issue ?

@MikeOpenHWGroup MikeOpenHWGroup added the Component:Doc For issues in the Documentation (e.g. for README.md files) label Dec 4, 2024
@MikeOpenHWGroup
Copy link
Member

It seems the problem was caused by pull-request #2558, which included this update to .readthedocs.yaml.

Hi @JeanRochCoulon, I am not currently set-up to support the CVA6 RTD flow. Someone with the GitHub handle slgth created the PR above. @valentinThomazic suggested slgth is a person named Simon from Thales SIX, but as they are not a member of this repo I cannot assign this Issue to them.

@JeanRochCoulon
Copy link
Contributor

Simondoes not work anymore on cva6 project, maybe @ASintzoff can have a look from next Monday (oOo currently).

@JeanRochCoulon
Copy link
Contributor

@MikeOpenHWGroup In the meantime, the option pointed by @valentinThomazic can highly prevent such a issue generation. Would it be possible to enable it in ReadTheDocs ?

@JeanRochCoulon JeanRochCoulon added the CV32A65X Part: Embedded configuration label Jan 2, 2025
@MikeOpenHWGroup
Copy link
Member

This looks like an ugly problem. There seems to be a very large number of packages required to build the CVA6 documentation.

The ReadTheDocs build reports this error:

<internal:/home/docs/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- asciidoctor-lists (LoadError)

This is very similar (not identical) to the error I get when attempting to build the documentation on my Ubuntu 22.04 Desktop machine:

<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- asciidoctor-lists (LoadError)
Did you mean?  asciidoctor/list
               asciidoctor/cli
               asciidoctor/load

Has anyone gotten this to build successfully on an Ubuntu system?

@JeanRochCoulon
Copy link
Contributor

Hi Mike,
After discussion with @cathales, the library asciidoctor-lists need to be installed to make Ruby work.
This can be done by executing "gem install asciidoctor-lists" for Ubuntu systems. Can you try on your own?
If it works, this installation should be done on ReadThedocs severs, using Gemfile (as requirements file for python) can be a solution.

@ASintzoff
Copy link
Contributor

I think the root cause is that asciidoctor-lists gem is not part of dependencies/Gemfile in riscv-isa-manual repository.

I just create an issue (riscv/riscv-isa-manual#1811) and a pull request (riscv/riscv-isa-manual#1812).

Hopefully the pull request will be merged and after that, we will need to update the riscv-isa-manual submodule.

@MikeOpenHWGroup
Copy link
Member

MikeOpenHWGroup commented Jan 17, 2025

Thanks for the clue about installing asciidoctor-lists. I was unable to translate the error messages into that simple command. So, after installing asciidoctor-lists it was simply a question of installing all the other dependencies and I can now build the documentation on my desktop Ubuntu 22.04 machine.

The number of dependencies is large:

$ sudo apt-get install ruby
$ sudo apt install ruby-dev
$ sudo gem install asciidoctor-lists
$ sudo npm install -g bytefield-svg
$ sudo npm i wavedrom-cli -g
$ sudo apt install openjdk-17-jdk
$ pip install rstcloth
$ pip install mako
$ pip install mdutils

There are a number of requirements.txt files in the CVA6 repo, but none of them mention all of these. They are specified in the riscv-isa-manual repo (in dependencies/apt_packages.txt and dependencies/Gemfile), but these are not easy to find, and some of these are pretty significant (e.g. ruby and java) so I would recommend we create our own, comprehensive requirements.txt file and not depend on risv-isa-config to do it for us.

In any case, I can now build the documentation locally:

$ cd ~/GitHubRepos/openhwgroup/cva6/master/docs
$ make
$ firefox _build/index.html &

This "works" in that there are no errors and the documentation appears to build correctly. However, there is a very large set of warnings which you can see in the attached logfile.

make.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc For issues in the Documentation (e.g. for README.md files) CV32A65X Part: Embedded configuration
Projects
None yet
Development

No branches or pull requests

4 participants