static link libgcc & libstdc++
lblasc opened this issue · 2 comments
lblasc commented
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
You may need to build with cmake manually.
Luka Blašković <notifications@github.com>于2017年3月13日 周一下午5:28写道:
… 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 ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABPGB1QIHTVPDxVl4iHUzcJ8MPKvEhdks5rlQw4gaJpZM4MbA-Z>
.
lblasc 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