cppkafka
cppkafka copied to clipboard
Cannot compile examples on OS X
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.
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)
This is still a problem and preventing me from using this library. It will not compile on OSX