shadowsocks-libev
shadowsocks-libev copied to clipboard
CMake build doesn't install embedded 3rd-party libs.
What version of shadowsocks-libev are you using?
master
What operating system are you using?
CentOS 7 (this is really not distro related).
What did you do?
Build with cmake+ninja+gcc, and -DWITH_STATIC=OFF
because CentOS 7 doesn't ship static version of libev, and then install.
What did you see instead?
Embedded 3rd-party libs are correctly built as build/lib/libipset.so
, but they're not installed.
Calling things like /usr/local/bin/ss-xxxxx
won't work due to missing libs.
A few lines like install(TARGETS ipset-shared LIBRARY DESTINATION lib)
in CMakeLists.txt
should help.
Why do you find the README wanting? You can just follow the steps provided by the author and build shadowsocks-libev
from source.
@GinXian This is not about building from source, but installation after build. The README instruction is about makefile, not cmake we used here.
@xkszltl The 3rd party libs are installed as intended but the ELF cannot probe it. That may be because ldconfig
is absent when the libs are built and installed.
What do you mean by installed as intended?
The embedded libipset
isn't installed unless I manually copy it.
As you can see from below, there's simply no install()
for libipset target.
- Search: https://github.com/shadowsocks/shadowsocks-libev/search?l=CMake&q=install
- Code creating dynamic lib of libipset: https://github.com/shadowsocks/shadowsocks-libev/blob/89b5f987d6a5329de9713704615581d363f0cfed/CMakeLists.txt#L140-L141
Regarding ldconfig, we actually run that intentionally after installation so that's not the issue.
bash ./shadowsocks-libev/rpm/genrpm.sh before ./autogen.sh && ./configure && make It is what I figure out and it's work great .
That's the makefile code path, no cmake.