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

cmake is heavyweight #26

Closed
kb0thn opened this issue Jan 5, 2018 · 6 comments
Closed

cmake is heavyweight #26

kb0thn opened this issue Jan 5, 2018 · 6 comments
Labels

Comments

@kb0thn
Copy link
Contributor

kb0thn commented Jan 5, 2018

Running the latest version of cmake is a heavy requirement to build in place on embedded and older systems. Building it really just comes down to:

gcc *.c -DPACKAGE=\"mbusd\" -DVERSION=\"fromGIT20180104\" -DLOG -DTRXCTL -DDEBUG -o mbusd
@3cky
Copy link
Owner

3cky commented Jan 22, 2018

Not sure CMake is much more heavyweight than old Autotools scripts, but I think we could provide something like "bare-bone" Makefile to build mbusd binary only for resource constrained platforms.

@kb0thn
Copy link
Contributor Author

kb0thn commented Jan 22, 2018

A barebones makefile would be great. On 4 of the last 5 targets I built it for, getting cmake and infrastructure going wasn't possible. Likely m4 and autotools wouldn't have been either. But the bare metal gcc above buildt it fine.

@nickma82
Copy link
Contributor

A barebones makefile would be great.

Do you have a pull request?

Alternatively add a gitlab-ci target and let it compile there, like that

@stale
Copy link

stale bot commented Jul 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 8, 2019
@vanrein
Copy link

vanrein commented Jul 13, 2019

@kb0thn
CMake can also cross-compile, of course, but you would need a suitable toolchain. But a much simpler option should work as well with Debian multiarch:

  1. Have qemu started for foreign binaries
  2. Add your architecture to dpkg
  3. Install gcc:<arch> and binutils:<arch> but keep the cmake for the default platform
  4. cmake and make
  5. Move the software to your target platform

We've been doing these things in a Docker, to avoid removing the platform's own gcc and binutils. Docker may even be able to run your foreign binaries since it has the qemu support builtin, at least on some host platforms.

We did find that some Debian packages are platform-neutral, but then continue to depend a platform-specific form, about which it then got confused. So in reality, your mileage would vary, but this is so simple you should give it a try.

@stale stale bot removed the stale label Jul 13, 2019
@stale
Copy link

stale bot commented Nov 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 10, 2019
@stale stale bot closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants