-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix PDF creation with MSYS2 #28
Conversation
About the workflow: Don't know if it is a long-lasting solution to have the documentation in QA. Perhaps for having the separate steps for every format and for future extra checks (like warning free). If we want to test packaging on every platform, we need to build also the documentation on every platform. Until now, I just implemented what worked or I could easily get working. If you have an idea how to solve the solim error, then lets just do it. Please have a look here for the concrete error message. |
Command "ps2pdf" could not be executed resulting in this cmd.exe error message: Der Befehl "C:\xxx\msys64\mingw64\bin\ps2pdf" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Regression introduced in commit c294e3a ("doc: Refactor CMake file", 2022-11-04), which removed the use of "sh" for script invocation, which had been added in commit 1c41cfe ("Full Windows build, test and packaging supported under MSYS2. Build documentation updated to cover Windows and windows web page deprecated. Repo cleanup.", 2022-10-01). However, the removal of "sh" was correct because it should not be assumed whether an installed program is a shell script, python script, binary executable or anything else. It just didn't work in MSYS2 environment anymore because in build files generated by CMake for Ninja or Make, the commands are executed via cmd.exe, which cannot execute scripts directly. Resulting command in "build.ninja" (shortened and formatted): Broken: COMMAND = cmd.exe /C "cd /D C:\xxx\srecord\build\doc && C:\xxx\msys64\mingw64\bin\ps2pdf C:/xxx/srecord/build/doc/BUILDING.pdf.ps C:/xxx/srecord/build/doc/BUILDING.pdf" Fixed: COMMAND = cmd.exe /C "cd /D C:\xxx\srecord\build\doc && sh C:/xxx/msys64/mingw64/bin/ps2pdf C:/xxx/srecord/build/doc/BUILDING.pdf.ps C:/xxx/srecord/build/doc/BUILDING.pdf" The build also fails using "MinGW Makefiles" as generator. Obviously, using "sh" here is not a universal solution because it relies on "ps2pdf" being a shell script. But within the MSYS2 environment this is the case currently and thus it's a pragmatic solution for now.
Script "ref_ptx.sh" could not be executed, but no error message appeared. The build finished successfully, but the generated "ref-parts.so" was empty so the man pages were missing from PDF. Regression introduced in commit ecdf4df ("doc: Do not copy scripts to build directory", 2022-11-04), which accidentally removed the use of "sh" for script invocation of ref_ptx.sh only.
Regarding the error message, it includes: This is likely the cause of the failure ie can't find ps2pdf. I can take a look tomorrow if someone else doesn't get to it first. |
|
I tested the workflow steps from your ci-msys2-doc branch locally and don't get soelim errors. |
I solved the |
There were two little regressions which caused the failed/wrong PDF creation.
CI only builds documentation using Linux in "QA" workflow, maybe it should be extended, @jtxa?