Chleba / netscanner

Terminal Network scanner & diagnostic tool with modern TUI
MIT License
865 stars 20 forks source link

Build with musl #7

Closed tadejsv closed 5 months ago

tadejsv commented 8 months ago

You may want to build the binary with musl instead of glibc, because glibc does not allow you to build a truly static binary - which may cause conflicts if the version of glibc used for building is not the same as the version on the machine that uses the binary - for me, this happened

netscanner: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by netscanner)

I have glibc version 2.35 installed (Ubuntu 22.04). Anyways, just a suggestion - i don't know if replacing musl with glibc is possible in relation to networking, but would be good to try :)

Chleba commented 8 months ago

Thank You for Your question. I will take a look at it ASAP. Need to finish some crashes and finish one feature but I will put a pin on it.

Chleba commented 6 months ago

Hi @tadejsv, I've looked into this issue and tried a few things but I can see that building the Alpine Linux package has dependencies on musl & libgcc. Unfortunately I was unable to build the binary with musl on my PC but I will try to at least make a package for deb/ubuntu so for now - installing netscanner with cargo hopefully will solve your issue with not truly static binaries. Sorry about that.

Azathothas commented 6 months ago

It is possible to compile a true static binary using the alpine docker image and adding all the required libraries (static versions)

Precompiled Binary: https://bin.ajam.dev/x86_64_Linux/netscanner

Chleba commented 6 months ago

You are awesome @Azathothas. Thank You very much for Your work and added scripts. That is just awesome. I will implement those for building binaries in the future.