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

Excessive disk usage in build directory - 4.4 GB #447

Open
PaulBouchier opened this issue Feb 4, 2025 · 2 comments
Open

Excessive disk usage in build directory - 4.4 GB #447

PaulBouchier opened this issue Feb 4, 2025 · 2 comments
Labels
backlog Long-term improvement or addition enhancement New feature or request

Comments

@PaulBouchier
Copy link
Contributor

When building using the command line specified in the README.md,
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
the build directory grows to 4.4 GB. This seems to be due to stuff in a couple of directories called debug way down in the build tree.

This problem causes issues on small platforms like Raspberry Pi (I ran out of space), and the requirement to give --cmake-args makes it not fit well into a standard workspace build, where you can just type colcon build.

Is there some short-term workaround to avoid the bloat? And can the build be made so that the default colcon build just does what it should?

@Yadunund Yadunund added backlog Long-term improvement or addition enhancement New feature or request labels Feb 4, 2025
@Yadunund
Copy link
Member

Yadunund commented Feb 4, 2025

@PaulBouchier thanks for the ticket. I can confirm the build dir for zenoh_cpp_vendor is ~4.3GB.

It's unclear whether this is "bloat" introduced by our build system or whether building Zenoh-c/cpp takes up this much space. We'd appreciate if you could investigate by building zenoh-cpp following the instructions upstream https://github.com/eclipse-zenoh/zenoh-cpp?tab=readme-ov-file#building-and-running-tests while passing along the flags as we do in rmw_zenoh,

set(ZENOHC_CARGO_FLAGS "--no-default-features$<SEMICOLON>--features=shared-memory zenoh/transport_compression zenoh/transport_tcp zenoh/transport_tls")
# Set VCS_VERSION to include latest changes from zenoh/zenoh-c/zenoh-cpp to benefit from :
# - https://github.com/eclipse-zenoh/zenoh/pull/173 (Improve config to support priorities range in locators)
# - https://github.com/eclipse-zenoh/zenoh/pull/1736, https://github.com/eclipse-zenoh/zenoh/pull/1735,
# https://github.com/eclipse-zenoh/zenoh/pull/1744, https://github.com/eclipse-zenoh/zenoh/pull/1749,
# https://github.com/eclipse-zenoh/zenoh/pull/1751 (Improve performance of a large number of peers)
ament_vendor(zenoh_c_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-c.git
VCS_VERSION 5fce7fb1d397e016ad02a50bde4262007d755424
CMAKE_ARGS
"-DZENOHC_CARGO_FLAGS=${ZENOHC_CARGO_FLAGS}"
"-DZENOHC_BUILD_WITH_UNSTABLE_API=TRUE"
"-DZENOHC_CUSTOM_TARGET=${ZENOHC_CUSTOM_TARGET}"
)
ament_export_dependencies(zenohc)
ament_vendor(zenoh_cpp_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-cpp
VCS_VERSION bd4d741c6c4fa6509d8d745e22c3c50b4306bd65
CMAKE_ARGS
-DZENOHCXX_ZENOHC=OFF

Anyways, building code from source on RPi will likely lead to resource constraints. Why not rely on rmw_zenoh binaries instead?

@PaulBouchier
Copy link
Contributor Author

Thanks for the suggestion to use binaries. I did that and they work fine. I added README.md documentation about using binary packages to my PR. I'll respond here with findings from the investigation you requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Long-term improvement or addition enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants