Alneos / vega

Finite element format converter
GNU General Public License v2.0
23 stars 9 forks source link

Static compilation in Linux #20

Closed ThomasAbballe closed 4 years ago

ThomasAbballe commented 6 years ago

Hi all

There was a test in CMakelists which said "Static building is only available on Alpine". In 5fcbaf07e11098b331d21e98b6346b1e7775f91f, I changed it to "Static building is only unavailable for Ubuntu". It's an ugly fix, but it was crashing our compilation process on CentOs. A "static" VEGA was, wrongly, very much dynamic !

ldd /foo/vegapp
    linux-vdso.so.1 =>  (0x00007ffe2afb0000)
    libhdf5.so.8 => /lib64/libhdf5.so.8 (0x00007f528a36c000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f528a156000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f5289f52000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f5289c4f000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5289a33000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f5289670000)
    /lib64/ld-linux-x86-64.so.2 (0x000055b6d1358000)

It seems that in Ubuntu and CentOs, you can not have "full static" applications, because of glibc. But when a user asks for static, he/she should have at least all the above in the program.

We should clean a bit this part, and ensure that cmake build dynamic, "almost static" and "full static" if ask.

ThomasAbballe commented 4 years ago

We have all the build we need now.