Using musl-gcc, with -Werror and -fPIC removed and adding -static to LFLAGS, I get a size of 530272 bytes, statically linked and striped. LinuxMint LMDE 6 here.
musl library is a very small library compared to glibc. On Sun, May 26, 2024 at 3:34 AM vasi vasi <[email protected]> wrote: > I never heard that you are not allowed to create static executables!! Any > linux provide also a set of static libraries. Only certain libraries are > dynamic and these days, you do not get a static version of glibc. So, don't > worry, you can compile jalv2 statically, it won't include glibc. You don't > need musl, I will look into it, but it is not needed. > > On Thu, May 23, 2024 at 10:51 PM Rob CJ <[email protected]> wrote: > >> Hi Vasi, >> >> I tried this: >> >> - sudo apt -y install musl-tools >> - Added: -static in the Makefile.inc to the linker flag >> - Changed (as a hack): $(CC) by musl-gcc >> >> Compiled the compiler but the size is exactly the same with and without >> the -static option. I would expect the file to be bigger for the static >> version. >> >> Any suggestions? >> >> Kind regards, >> >> Rob >> >> ------------------------------ >> *Van:* [email protected] <[email protected]> namens Rob CJ < >> [email protected]> >> *Verzonden:* donderdag 23 mei 2024 19:32 >> *Aan:* [email protected] <[email protected]> >> *Onderwerp:* Re: [jallib] Linux executable >> >> Hi Vasi, >> >> I am no Linux expert (always using Windows) and I had a quick look on the >> internet and I read that you are not allowed to statically link GLIBC due >> to licensing. >> >> I saw some info about musl but no clue (yet) what to do. >> >> Any hints would help. >> >> Thanks. >> >> Kind regards, >> >> Rob >> >> >> ------------------------------ >> *Van:* [email protected] <[email protected]> namens vasi >> vasi <[email protected]> >> *Verzonden:* woensdag 22 mei 2024 19:43 >> *Aan:* [email protected] <[email protected]> >> *Onderwerp:* Re: [jallib] Linux executable >> >> Hi Rob, >> >> No problems for me because I recompiled it to be statically linked. >> >> On Wed, May 22, 2024 at 8:01 PM Rob CJ <[email protected]> wrote: >> >> Hi Vasi, >> >> I had problems with GLIBC version 2.29. In order to solve that I >> recompiled the JAL compiler with an older version of gcc and that solved >> that issue. >> >> I can have a look a linking it statically. Are you - or other JAL users - >> experiencing problems with the current version (2.5r8) of the JAL compiler? >> >> Kind regards, >> >> Rob >> >> ------------------------------ >> *Van:* [email protected] <[email protected]> namens vasi >> vasi <[email protected]> >> *Verzonden:* woensdag 22 mei 2024 13:38 >> *Aan:* [email protected] <[email protected]> >> *Onderwerp:* [jallib] Linux executable >> >> Hi Rob, >> >> I see you provide executables for linux that are dynamically linked... >> A statically linked executable can work on both glibc and musl based >> distributions (Alpine and Void linux as two main examples as musl >> platforms) no matter on which platform this was compiled (be it glibc or >> musl), and it can also work on much older linux distros. It will help also >> with old projects that require a specific version of jalv2 compiler. Right >> now, a static link edit is possible only by modifying the Makefiles at >> source level. >> >> I have a lot of old applications dynamically linked that do not work on >> today's computers and operating systems. Is not only that many are written >> in an old standard, not supported by the compiler, but in many cases, even >> the GUI libraries are not available anymore. And jalv2 can be linked >> statically. Maybe you don't know, but there are "recent" changes in GLIBC >> that will prevent shared programs to work on linux distributions that have >> GLIBC at a lower version than 2.34 (don't know if is the case of the jalv2 >> compiler though). >> >> I think is in Jalv2 interest to avoid this vulnerability of Linux/UNIX >> world. >> >> -- >> Vasi >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jallib/CABsDq%3D9%3D%3DPqrr7ffPaVDg3qSYTiwQKKhbroLpWucDDNjb9XrVA%40mail.gmail.com >> <https://groups.google.com/d/msgid/jallib/CABsDq%3D9%3D%3DPqrr7ffPaVDg3qSYTiwQKKhbroLpWucDDNjb9XrVA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jallib/GVXP195MB16373F60F98E826FCC3DA47AE6EB2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM >> <https://groups.google.com/d/msgid/jallib/GVXP195MB16373F60F98E826FCC3DA47AE6EB2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> >> . >> >> >> >> -- >> Vasi >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jallib/CABsDq%3D-nUyCPhH2a%2B3xgLg9U-O-WX3qXi5rhgY4pVemaF3AG6w%40mail.gmail.com >> <https://groups.google.com/d/msgid/jallib/CABsDq%3D-nUyCPhH2a%2B3xgLg9U-O-WX3qXi5rhgY4pVemaF3AG6w%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jallib/GVXP195MB16374EF7B6C5195047F9FE5DE6F42%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM >> <https://groups.google.com/d/msgid/jallib/GVXP195MB16374EF7B6C5195047F9FE5DE6F42%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> >> . >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jallib" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jallib/GVXP195MB1637505145320A13F3399B55E6F42%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM >> <https://groups.google.com/d/msgid/jallib/GVXP195MB1637505145320A13F3399B55E6F42%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> >> . >> > > > -- > Vasi > -- Vasi -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/CABsDq%3D8SozkU6M5zmZ33NBZL%3D_KV%2BNuCxoq%2Bhon%2B%3DY11e6gKZQ%40mail.gmail.com.
