xpol/lua-rapidjson

static link libgcc & libstdc++

lblasc opened this issue · 2 comments

I'm trying to static link libgcc & libstdc++ into rapidjson.so but without success.

luarocks install rapidjson \
  CMAKE_C_FLAGS="-static-libgcc" \
  CMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++"

Any idea how to solve this ?

xpol commented

I've managed to solve this luarocks issue, with injecting additional flags into env variable:

$ CMAKE_MODULE_PATH="\" \"-DCMAKE_CXX_FLAGS=-static-libgcc -static-libstdc++" luarocks install rapidjson
$ ldd /lib/lua/5.1/rapidjson.so 
        ldd (0x55d633331000)
        libc.musl-x86_64.so.1 => ldd (0x55d633331000)

It is hack but it works with latest stable luarocks version.

Solves: luarocks/luarocks#509