riscv-non-isa / riscv-asm-manual

RISC-V Assembly Programmer's Manual
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
1.41k stars 235 forks source link

Migration to RISC-V specifications template in asciidoc #107

Closed apazos closed 3 weeks ago

kito-cheng commented 2 months ago

PDF and html rendering seems good to me :)

PDF: riscv-asm.pdf

apazos commented 2 months ago

Thanks for trying @kito-cheng, I made a few more small changes.

apazos commented 2 months ago

Pushed changes to make title page and toc appear, reorganizing prelude and preamble files

apazos commented 2 months ago

Moved list of tables after document status

cmuellner commented 1 month ago

Docker-based build fails for me:

$ make
Checking if Docker is available...
Docker is available, building inside Docker container...
make[1]: Entering directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc'
Starting build inside Docker container...
make build-docs
make[2]: Entering directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc'
docker run --rm -v /home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc:/build -w /build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c " asciidoctor-pdf --trace -a compress -a revdate=2024-08-01 -a pdf-style=docs-resources/themes/risc-v_spec-pdf.yml -a pdf-fontsdir=docs-resources/fonts  -D build --failure-level=ERROR --require=asciidoctor-lists src/riscv-asm.adoc "
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
asciidoctor: ERROR: prelude.adoc: line 3: include file not found: /build/docs-resources/global-config.adoc
asciidoctor: WARNING: image to embed not found or not readable: /build/docs-resources/images/risc-v_logo.png
make[2]: *** [Makefile:55: riscv-asm.pdf] Error 1
make[2]: Leaving directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc'
make[1]: *** [Makefile:72: build-container] Error 2
make[1]: Leaving directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc'
make: *** [Makefile:62: build] Error 2

Before the build, I pulled the latest container:

$ podman pull riscvintl/riscv-docs-base-container-image:latest
Trying to pull docker.io/riscvintl/riscv-docs-base-container-image:latest...
Getting image source signatures
Copying blob 35cb7b63668a skipped: already exists  
Copying blob 903e4dcc6386 skipped: already exists  
Copying blob 3713021b0277 skipped: already exists  
Copying config 30c49ab9f7 done   | 
Writing manifest to image destination
30c49ab9f7881fb33925c81ff10a66e22641b3c43f86b37d8f0998832fd369ee

Also, building native (Fedora 40) does not work because the Ruby package mathematical cannot be built on Fedora 40 (see https://github.com/gjtorikian/mathematical/issues/134 and the waiting PR https://github.com/gjtorikian/mathematical/pull/135/files).

wmat commented 1 month ago

Don’t forget to —init the submodule. I build everyday on Fedora. I’m currently on vacation but will look into this for you later today when I’m at my computer.

On Thu, Aug 1, 2024 at 8:57 AM Christoph Müllner @.***> wrote:

Docker-based build fails for me:

$ make Checking if Docker is available... Docker is available, building inside Docker container... make[1]: Entering directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc' Starting build inside Docker container... make build-docs make[2]: Entering directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc' docker run --rm -v /home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc:/build -w /build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c " asciidoctor-pdf --trace -a compress -a revdate=2024-08-01 -a pdf-style=docs-resources/themes/risc-v_spec-pdf.yml -a pdf-fontsdir=docs-resources/fonts -D build --failure-level=ERROR --require=asciidoctor-lists src/riscv-asm.adoc " Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. asciidoctor: ERROR: prelude.adoc: line 3: include file not found: /build/docs-resources/global-config.adoc asciidoctor: WARNING: image to embed not found or not readable: /build/docs-resources/images/risc-v_logo.png make[2]: [Makefile:55: riscv-asm.pdf] Error 1 make[2]: Leaving directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc' make[1]: [Makefile:72: build-container] Error 2 make[1]: Leaving directory '/home/cm/work/riscv/rvi/riscv-asm-manual/asciidoc' make: *** [Makefile:62: build] Error 2

Before the build, I pulled the latest container:

$ podman pull riscvintl/riscv-docs-base-container-image:latest Trying to pull docker.io/riscvintl/riscv-docs-base-container-image:latest... Getting image source signatures Copying blob 35cb7b63668a skipped: already exists Copying blob 903e4dcc6386 skipped: already exists Copying blob 3713021b0277 skipped: already exists Copying config 30c49ab9f7 done | Writing manifest to image destination 30c49ab9f7881fb33925c81ff10a66e22641b3c43f86b37d8f0998832fd369ee

Also, building native (Fedora 40) does not work because the Ruby package mathematical cannot be built on Fedora 40 (see gjtorikian/mathematical#134 https://github.com/gjtorikian/mathematical/issues/134 and the waiting PR https://github.com/gjtorikian/mathematical/pull/135/files).

— Reply to this email directly, view it on GitHub https://github.com/riscv-non-isa/riscv-asm-manual/pull/107#issuecomment-2262973583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN6ZB6T3NT2C5PTU6Y6YTZPIWCHAVCNFSM6AAAAABKIMSC5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRSHE3TGNJYGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cmuellner commented 1 month ago

@wmat, thanks for the hint. Indeed, I forgot to pull the submodule. However, I immediately ran into the next issue with the container build, because my system (Fedora 40) uses podman as docker replacement. I've created a PR that addresses this issue here.

Since the native build issue was quite annoying, I reached out to the owners of Ruby's mathematical package. I could get them to fix the build issue and even trigger a new release (https://github.com/gjtorikian/mathematical/releases/tag/v1.6.20).

wmat commented 1 month ago

Interesting. I'm using F40 as well, but with Docker, so I didn't see those issues.

apazos commented 1 month ago

@cmuellner, now that you fixed your local build issue, can you please try to build again. I had to rebase the patch to take additional changes merged into riscv-asm.md and fix some out of sync issue with my local repo.

cmuellner commented 3 weeks ago

I've built this PR with git submodule update --init ; make on a Fedora machine (using Podman as container runtime) and everything looks ok.

While diffing the original Markdown with the generated PDF, I noticed that we have terrible content in this repo and really should work on this document in the future.

I consider this as ready to land.