Skip to content

Not enough memory (RAM) for installation (c++ gcc compiler) #468

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

Open
2lian opened this issue Dec 29, 2024 · 0 comments
Open

Not enough memory (RAM) for installation (c++ gcc compiler) #468

2lian opened this issue Dec 29, 2024 · 0 comments

Comments

@2lian
Copy link

2lian commented Dec 29, 2024

Describe the bug

During installation with pip install, when 'building wheels', the install crashes (silently) on a 2GB RAM system. This is due to the c++ compiler running out of RAM.

Version information

Tried both github 2a8111b
and pypi.

To Reproduce

  1. Have a less than 2GB of RAM system
  2. pip install roboticstoolbox-python
  3. Pip will be stuck in the 'building wheels' step

Environment

  • Remote VPS server
  • Ubuntu 22.04
  • Python 3.10
  • 2 cores, 2GB of RAM, no swap available

Hacky Solution

I could install by passing some c++ compiler options to use less resources. The following works:

CXXFLAGS="-fno-fat-lto-objects --param ggc-min-expand=10 --param ggc-min-heapsize=2048"  MAKEFLAGS="-j1" pip install --no-cache-dir roboticstoolbox-python

Better Solution to Seek for

It would be better to configure the compiler properly from the start inside RTB to avoid this issue. 2GB is more than enough for this project, and should work. Maybe a compiler flag is miss-used leading to a crash on low RAM systems. If I have time and this continues to be an issue, I might look into it and do a PR.

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

No branches or pull requests

1 participant