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

Build failed on OSX #248

Open
MichaelScofield opened this issue Jul 3, 2018 · 6 comments
Open

Build failed on OSX #248

MichaelScofield opened this issue Jul 3, 2018 · 6 comments

Comments

@MichaelScofield
Copy link

I'm trying to build honest-profiler on my OSX. I have already installed cmake, unittest++ and pkgconfig via Homebrew:

brew install cmake
brew install unittest-cpp
brew install pkgconfig

When I execute cmake CMakeLists.txt, it shows an errorr:

-- The C compiler identification is AppleClang 10.0.0.10001025
-- The CXX compiler identification is AppleClang 10.0.0.10001025
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Found JNI: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/libjawt.dylib  
CMake Error at CMakeLists.txt:38 (find_package):
  Could not find a package configuration file provided by "UnitTest++" with
  any of the following names:

    UnitTest++Config.cmake
    unittest++-config.cmake

  Add the installation prefix of "UnitTest++" to CMAKE_PREFIX_PATH or set
  "UnitTest++_DIR" to a directory containing one of the above files.  If
  "UnitTest++" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/Users/me/repo/git/honest-profiler/CMakeFiles/CMakeOutput.log".

What can I do with the error?

@itchanges
Copy link

edit CMakeLists.txt, find this line then remove -- find_package(UnitTest++ REQUIRED NO_MODULE)

@snowe2010
Copy link

@itchanges since you seem to know what to do regarding OSX, can you explain why all the steps succeed for me, but I don't have any .so file in the zip folder?

❯ unzip target/honest-profiler.zip
Archive:  target/honest-profiler.zip
  inflating: console
  inflating: dump-flamegraph
  inflating: gui
  inflating: honest-profiler.jar
  inflating: liblagent.dylib

@hamiltron
Copy link

In case anyone else comes across this ... libagent.dylib is the macOS equivalent of the .so file. If you specify this file for -agentpath, it should work.

@snowe2010
Copy link

oops. yes. I forgot to update this issue after figuring that out. Thank you @hamiltron

@hlzhang
Copy link

hlzhang commented Mar 28, 2019

Failed on OSX 10.14.3, xcode 10.2, cmake 3.14.0, openjdk-11.0.2

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found JNI: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib/libjawt.dylib
CMake Error at CMakeLists.txt:54 (get_filename_component):
get_filename_component unknown component
/usr/local/include/UnitTest++/UnitTest++.h

-- Detected 64 bit Mac
-- using Clang
-- Configuring incomplete, errors occurred!

@jeschkies
Copy link

I have the same issue. When I hard code the path to the unittest++ headers it fails later while linking unittest++. Ideally one could compile it without it.

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

6 participants