Open loicalleyne opened 6 months ago
It's not that simple. libchdb contains so many libs like llvm, jemalloc. There need some special linkage tricks to make it work well with symbols from golang.
Still, it's possible to make a libchdb.a. Just need some efforts.
👋 coming here for this as well. I'm currently using duckdb whereas I'd prefer to use chdb. I'm not super well versed into linking C libs, but the Go duckdb bindings use modvendor
and default to static linking.
@aybabtme Thank you for the insight. The most challenging part is make the libchdb.a work. Please also follow up on this issue https://github.com/chdb-io/chdb/issues/101
Is it possible to have an option to compile a statically linked Go binary so there's no dependency on having libchdb.so present on the machine it's running on? My understanding is you need to build a static library libchdb.a file instead of a dynamic library libchdb.so, I tried modifying the chdb build script to see if it was possible and ran into a linker issue which I couldn't get past.