akumuli/Akumuli

Static linking

goodspeed1986 opened this issue · 3 comments

How to build akumuli without any dependencies (shared libraries)?

Lazin commented

There're several places in cmake files that control this. You have to update them.

Also, if you'll link all dependencies statically, the app will still link C-runtime dynamically. You can use some static CRT library (for instance musl) but this can prove to be tricky. For instance, you'll have to build all dependencies yourself using static CRT instead of dynamic one. With boost it's not that tricky because you have this option (https://github.com/akumuli/Akumuli/blob/master/CMakeLists.txt#L107) but other libraries have to be rebuilt with all their dependencies.

Here is my own bash scripts to build akumulid and libakumuli statically: https://github.com/webfolderio/Akumuli-static

It's tested under CircleCI & Ubuntu but should also work for CentOS etc...

Thanks. It works for me.