Skip to content

Conversation

@bjsowa
Copy link
Contributor

@bjsowa bjsowa commented Jan 5, 2026

The generate_parameter_module macro outputs the Python module to CMAKE_INSTALL_DIR during the build phase. This results in build failures on the ROS buildfarm due to permission errors (example here)

This PR modifies the macro to output the module to a temporary directory in CMAKE_CURRENT_BINARY_DIR and install it to CMAKE_INSTALL_DIR during the install phase.

@christophfroehlich
Copy link
Collaborator

If the current setup fails on the buildfarm, why haven't that failed earlier? Or is it that simple, nobody released a python node using this library?

@bjsowa
Copy link
Contributor Author

bjsowa commented Jan 6, 2026

If the current setup fails on the buildfarm, why haven't that failed earlier? Or is it that simple, nobody released a python node using this library?

From what I see, we are the first 😎

Copy link
Collaborator

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

The result looks good, just not sure if there is a more cmake-native way in fixing this. So, waiting for another review.

btw: I remembered that we had an issue about python install location, but it was in setup.py configs #206.

@bjsowa
Copy link
Contributor Author

bjsowa commented Jan 16, 2026

@christophfroehlich Any chance this gets merged and released soon? I'm getting a lot of spam from ROS buildfarm about failing jobs...

Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

This looks good at a glance!

My only question (from limited experience working in this package): how does this change affect symlink-install and/or merge-install workflows, if at all? Maybe worth a quick test

@bjsowa
Copy link
Contributor Author

bjsowa commented Jan 22, 2026

This looks good at a glance!

My only question (from limited experience working in this package): how does this change affect symlink-install and/or merge-install workflows, if at all? Maybe worth a quick test

In symlink-install, the generator python module in install directory will be symlinked to the one created in the temp build directory. The merge-install is not affected at all.

@christophfroehlich
Copy link
Collaborator

I've tested the three options now with generate_parameter_module_example, I don't see any downsides.

@christophfroehlich christophfroehlich merged commit 72887f5 into PickNikRobotics:main Jan 27, 2026
15 of 17 checks passed
@christophfroehlich
Copy link
Collaborator

@bjsowa Now our example_module fails on the buildfarm
https://build.ros2.org/view/Rdev/job/Rdev__generate_parameter_library__ubuntu_noble_amd64/43/console#console-section-33

00:10:32 test/test_load_modules.py:35: in <module>
00:10:32     import generate_parameter_module_example.admittance_parameters  # noqa: E402
00:10:32 E   ModuleNotFoundError: No module named 'generate_parameter_module_example.admittance_parameters'

Any idea how to fix this?

@bjsowa
Copy link
Contributor Author

bjsowa commented Jan 27, 2026

@bjsowa Now our example_module fails on the buildfarm https://build.ros2.org/view/Rdev/job/Rdev__generate_parameter_library__ubuntu_noble_amd64/43/console#console-section-33

00:10:32 test/test_load_modules.py:35: in <module>
00:10:32     import generate_parameter_module_example.admittance_parameters  # noqa: E402
00:10:32 E   ModuleNotFoundError: No module named 'generate_parameter_module_example.admittance_parameters'

Any idea how to fix this?

It doesn't seem related as example_module is not using cmake.

Talha-deepx added a commit to DeepX-inc/generate_parameter_library that referenced this pull request Jan 28, 2026
* Use a temporary build directory for Python module output (PickNikRobotics#303)

* Added missing gmock/gtest dependency (PickNikRobotics#304)


---------

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>

* make scripts accessible to find_program cmake function.

---------

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
Co-authored-by: Alexandre Arnoux <alexandre.arnoux@deepx.co.jp>
Co-authored-by: alexandre-arnoux-dx <148032753+AArnouxDeepX@users.noreply.github.com>
@christophfroehlich
Copy link
Collaborator

Oh my bad, I have tested the options with the wrong package above 🙈 Just tested now also successfully with cmake_generate_parameter_module_example.
I'll dig into the build farm error.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants