-
Notifications
You must be signed in to change notification settings - Fork 57
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
Build failed on macOS using brew (Cmake: jsoncpp not found) #62
Comments
hey @zhovner , I don't have a Mac to test this on, but the CI seems to work just fine on OSX. The dependencies are installed according to this script, https://github.com/insomniacslk/dublin-traceroute/blob/master/.travis/install_dependencies_osx.sh . Can you try to run these commands first, then retry the brew install dublin-traceroute.rb ? Also, which version of OSX are you on? Meanwhile I'll add this test to the CI as well. |
What is CI?
All dependencies are already installed by homebrew formula and I have
and pkg file:
It's all symlinked to this
I'm using latest macOS Mojave 10.14.6 (18G87) and latest packages from brew. |
What's the output of |
I wonder if PKG_CONFIG_PATH is pointing to the correct location. According to https://linux.die.net/man/1/pkg-config :
|
Continuous Integration, the automation that I use to build and test dublin-traceroute on linux and osx at every commit |
|
I'm struggling to reproduce the issue here, and I won't have access to a macOS device before next week (because of holidays abroad). Meanwhile I'm trying to understand from the cmake documentation what could be failing to find the package via pkg-config |
FYI the PR where I'm trying to reproduce the issue is #64 |
Hi there, I have the same issue (macOS version is the same as well). In case any check on my side could be done to speed up the fixation, just let me know. |
Hello. I've experienced the same issue. I had to fix it by setting $ make
[ 75%] Built target dublintraceroute
[ 87%] Linking CXX executable dublin-traceroute
ld: library not found for -ljsoncpp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [dublin-traceroute] Error 1
make[1]: *** [CMakeFiles/dublin-traceroute.dir/all] Error 2
make: *** [all] Error 2 After: $ LIBRARY_PATH=/usr/local/opt/jsoncpp/lib make
[ 75%] Built target dublintraceroute
[ 87%] Linking CXX executable dublin-traceroute
[100%] Built target dublin-traceroute |
Hi I am not a user of this project however I came across this exact same issue. I couldn't find this in the JsonCPP project documentation but the fix for me was to use ${JSONCPP_LINK_LIBRARIES} in target_link_libraries in CMakeLists.txt. E.g:
|
This is what I had to do for Apple Silicon since homebrew is installed to /opt/homebrew, not /usr/local.
|
CMakeLists.txt requires a lot of rework to compile on modern platforms, I'll take a look at it when I have time, but I'm happy to review a PR if someone is willing to do that
If you don't have a standard |
I've try to build it using brew formula
brew install https://raw.githubusercontent.com/insomniacslk/dublin-traceroute/master/homebrew/dublin-traceroute.rb
and get this error:
Package jsoncpp is installed. Probably you have
jsoncpp-devel
instelled on your system?The text was updated successfully, but these errors were encountered: