Skip to content

Conversation

@Lastique
Copy link
Member

When b2 invokes doc/make_qbk.py, it passes a relative path to the compiled doxygen_xml2qbk executable. This path becomes invalid if used from a directory different from doc, which may happen as make_qbk.py changes the current directory during its execution. Additionally, doc/index/make_qbk.py invokes doxygen_xml2qbk unqualified, which requires the executable to be in PATH and is never the case unless the user has pre-compiled and placed it accordingly.

To fix this, first resolve the paths to doxygen and doxygen_xml2qbk to absolute paths before changing the current directory. Additionally, pass the resolved path to doxygen_xml2qbk to doc/index/make_qbk.py via the DOXYGEN_XML2QBK environment variable.

Fixes #1311.

When b2 invokes doc/make_qbk.py, it passes a relative path to the compiled
doxygen_xml2qbk executable. This path becomes invalid if used from a directory
different from doc, which may happen as make_qbk.py changes the current
directory during its execution. Additionally, doc/index/make_qbk.py invokes
doxygen_xml2qbk unqualified, which requires the executable to be in PATH and
is never the case unless the user has pre-compiled and placed it accordingly.

To fix this, first resolve the paths to doxygen and doxygen_xml2qbk to absolute
paths before changing the current directory. Additionally, pass the resolved
path to doxygen_xml2qbk to doc/index/make_qbk.py via the DOXYGEN_XML2QBK
environment variable.

Fixes boostorg#1311.
Copy link
Collaborator

@barendgehrels barendgehrels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!
So this fixes a structural issue and makes making documentation easier.

For others, @Lastique also solved the "1.79.2" problem, as discussed here
boostorg/boostbook#13

For that research, this PR was essential.

Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, looks good to me, I approve.

Just a note on documentation, there is a CI job that builds documentation and seems to work as expected. Of course it is on Ubuntu so it cannot catch issues on Mac/win etc.

@vissarion vissarion merged commit 68f5b99 into boostorg:develop Sep 25, 2024
@Lastique Lastique deleted the feature/fix_make_qbk branch September 25, 2024 12:11
@Lastique
Copy link
Member Author

The documentation CI workflow works because it explicitly builds doxygen_xml2qbk and copies it to /usr/local/bin prior to building the documentation. This is unconventional and should not be required. This PR fixes this, and building docs should now work by simply invoking b2 in libs/geometry/doc. It may be a good idea to update the CI workflow to verify that.

@vissarion
Copy link
Member

The documentation CI workflow works because it explicitly builds doxygen_xml2qbk and copies it to /usr/local/bin prior to building the documentation. This is unconventional and should not be required. This PR fixes this, and building docs should now work by simply invoking b2 in libs/geometry/doc. It may be a good idea to update the CI workflow to verify that.

That is a good suggestion, I opened a PR. Please feel free to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doxygen_xml2qbk not found during documentation build

3 participants