Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake build doesn't install embedded 3rd-party libs. #2808

Open
xkszltl opened this issue Apr 18, 2021 · 7 comments
Open

CMake build doesn't install embedded 3rd-party libs. #2808

xkszltl opened this issue Apr 18, 2021 · 7 comments

Comments

@xkszltl
Copy link

xkszltl commented Apr 18, 2021

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.

@GinXian
Copy link

GinXian commented Jun 11, 2021

Why do you find the README wanting? You can just follow the steps provided by the author and build shadowsocks-libev from source.

@xkszltl
Copy link
Author

xkszltl commented Jun 11, 2021

@GinXian
This is not about building from source, but installation after build.
The README instruction is about makefile, not cmake we used here.

@GinXian
Copy link

GinXian commented Jun 11, 2021

@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.

@xkszltl
Copy link
Author

xkszltl commented Jun 11, 2021

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.

@xkszltl
Copy link
Author

xkszltl commented Jun 11, 2021

Regarding ldconfig, we actually run that intentionally after installation so that's not the issue.

@cibyyang
Copy link

bash ./shadowsocks-libev/rpm/genrpm.sh before ./autogen.sh && ./configure && make
It is what I figure out and it's work great .

@xkszltl
Copy link
Author

xkszltl commented Oct 1, 2021

That's the makefile code path, no cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants