Beckert on Mon, 20 Jan 2025 20:06:32 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

compilation of static binaries for Linux & Windows


Hello,

I want to distribute GP scripts to many hosts. For this I need static linked binaries, to have less prerequisites for
the hosts.

Linux:

I compile pari/gp for Linux and got a version, where pari is static linked, but not the other libs and the binary itself
is also static.

ESPRIMO-Mobile-U9200 ~/pari/pari $ ldd Olinux-x86_64/gp-sta
    linux-vdso.so.1 (0x00007ffcd7bd5000)
    libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007b6181c91000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007b6180f19000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007b6180c00000)
    /lib64/ld-linux-x86-64.so.2 (0x00007b6181d2a000)
ESPRIMO-Mobile-U9200 ~/pari/pari $

As far as I know it has to be compiled with -static and linked with --static -static-libgcc.
Any idea, how I can pass this through Configure?

Windows:

I also need a static linked version for Windows. The provided binaries for Windows are dynamically linked and pari is a DLL.
Can a static version be provided?
Or with which environment should pari/gp be compiled?

kind regards.