We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Trying to cross compile htop



  • So I'm a bit of a newbie at this. I followed the two recent 2-bullet Tuesday guides to get a cross compile environment set up in a docker image, and successfully compiled the "Hello World" program. Now, I'd like to build a binary from source (namely htop, from https://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz).

    How do I run ./configure; make; make install within the cross compile environment?



  • @Paul-Beach I'm not quite sure what you're asking.

    If you're asking how to execute those commands in the (running) docker container:

    docker exec -it <container_name> sh

    ... would give you a shell and you can just type in your commands.
    Here is the Docker guide - it's pretty useful.

    Though that's not really a question about the omega.

    If you're saying you've compiled in the docker environment and you're asking "now what??", then :

    • you can copy over the compiled files to the omega using scp
    • I'd also like to note that you'd have to have created a docker image that is 32 bit for the compiled code to run on an omega

    Alternatively, if you have an SD card, you can optionally compile your code right on the omega by installing gcc.

    Anyhow, if you could clarify your question, I'd love to be helpful. Cheers !



  • @Paul-Beach said in Trying to cross compile htop:

    How do I run ./configure; make; make install within the cross compile environment?

    Not easily at all. Typically you need to take a deep dive into the project config scripts and see if they even support cross compilation.

    Historically auto-configuration schemes often don't until someone fixes them - they love to do annoying things like build and try little test programs, which of course won't work when the host and target differ.

    Realistically speaking, you're not going to be running that many things on this system - what's so wrong with the built in top or ps?



  • @Chris-Stratton Chris, thanks for the reply and educating me on some of the limitations. As for why htop - I wanted to practice on something and its one of my go-to utilities, so this was more of a test run.



Looks like your connection to Community was lost, please wait while we try to reconnect.