juji-io / datalevin

A simple, fast and versatile Datalog database
https://github.com/juji-io/datalevin
Eclipse Public License 1.0
1.13k stars 63 forks source link

native binary should be static on Linux #185

Closed huahaiy closed 1 year ago

huahaiy commented 1 year ago

Can not rely on the right version of glibc on Linux

ieugen commented 1 year ago

Hi, I think this would be a great thing since I am currently trying to package datalevin for guix.

I've ran into this issue while doing a local build:

validating RUNPATH of 1 binaries in "/gnu/store/2z4jfqsfxlrfg6sajxq6pm3spsy737fy-datalevin-0.8.4/bin"...
/gnu/store/2z4jfqsfxlrfg6sajxq6pm3spsy737fy-datalevin-0.8.4/bin/dtlv: error: depends on 'libz.so.1', which cannot be found in RUNPATH ()
error: in phase 'validate-runpath': uncaught exception:
misc-error #f "RUNPATH validation failed" () #f 

https://github.com/ieugen/bin-guix/commit/f772ccdb3190796acec7a9b642fb68645d4df761

ieugen commented 1 year ago

I "fixed" my issue by skipping runtime path validation for guix. This is not ideal since it does depend on some local libs. Waiting for static builds. I might make a patch if I have time.

huahaiy commented 1 year ago

This is now resolved. Not as easy as one might think. Took a while to get the right version of libstdc++.a