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

Cannot compile examples on OS X #173

Open
benstadin opened this issue Mar 1, 2019 · 2 comments
Open

Cannot compile examples on OS X #173

benstadin opened this issue Mar 1, 2019 · 2 comments

Comments

@benstadin
Copy link

I'm on OS X 10.14.3 and configured cppkafka like this:

cmake -DRDKAFKA_ROOT_DIR=/Users/bstadin/dev/LoTUS/cppkafka/build -DCPPKAFKA_DISABLE_EXAMPLES=OFF ..

The library builds fine, but a subsequent make examples fails with:

[ 72%] Linking CXX executable producer
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [examples/producer] Error 1
make[2]: *** [examples/CMakeFiles/producer.dir/all] Error 2
make[1]: *** [examples/CMakeFiles/examples.dir/rule] Error 2
make: *** [examples] Error 2

This issue is often related to xcode command line build tools not being installed. Though, this is not the case for me and they are already installed:

xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates 

One thought: openssl version prints:
LibreSSL 2.6.5

It's been OpenSSL on previous versions of OS X.

@anonymousch
Copy link

anonymousch commented Mar 4, 2019

update your CMakeLists.txt
if your openssl install path is /usr/local/opt/openssl,
add this direct:
link_directories(/usr/local/opt/openssl/lib)
link_directories(/usr/lib)
include_directories(/usr/local/opt/openssl/include)

@bigOconstant
Copy link

This is still a problem and preventing me from using this library. It will not compile on OSX

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