-
Notifications
You must be signed in to change notification settings - Fork 145
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
Compiling on Mac fails with message "use of undeclared identifier 'CLOCK_REALTIME'" #45
Comments
Can you give #46 a try please? |
I’m not entirely clear how to do this, but here is what I did. I used SourceTree to download a fresh copy of your repository (HEAD -> fix/clock_realtime_include origin/fix/clock_realtime_include). I then ran the following commands in terminal: SRC_DIR= And then got the errors described in the attached log files. |
@drhalftone so you still get the same error message? |
@drhalftone actually just saw that there is one more fix to patch. Can you update the branch fix/clock_realtime_include and try again? |
yes same error On Jan 12, 2016, at 8:10 PM, Simon Lynen [email protected] wrote: @drhalftone https://github.com/drhalftone actually just saw that there is one more fix to patch. Can you update the branch fix/clock_realtime_include and try again? — |
Something worth noting is that Mac OS X’s native compilers no longer support OpenMP. Should this matter? Here is a snippet from the error log: Performing C++ SOURCE FILE Test OpenMP_FLAG_DETECTED failed with the following output: Run Build Command:"/usr/bin/make" "cmTC_85263/fast" Source file was: #include <omp.h> On Jan 12, 2016, at 8:16 PM, Daniel L. Lau [email protected] wrote: yes same error <CMakeError.log> On Jan 12, 2016, at 8:10 PM, Simon Lynen <[email protected] mailto:[email protected]> wrote: @drhalftone https://github.com/drhalftone actually just saw that there is one more fix to patch. Can you update the branch fix/clock_realtime_include and try again? — |
@drhalftone I am not sure which version of the code you are on. The lines you have in the error output don't match with what I see on the master branch. Also we have handling for OSX in the codebase since a while. Which branch are you using? |
@drhalftone the same is the case for open-mp handling. This also is done separately for osx. |
@drhalftone also I can see a verified build of the repository from master on OSX here: http://129.132.38.183:8080/job/libnabo/37/ |
I followed the instructions on the libnabo github page. Here is the terminal commands that I used to delete the copy I had been working with, and cloning the github respository and then running the cmake commands that are listed on the github page: DrHalftone:Libraries dllau$ rm -r libnabo/ get_target_property() called with non-existent target "doc". -- Boost version: 1.59.0 -- Configuring incomplete, errors occurred! On Jan 12, 2016, at 8:40 PM, Simon Lynen [email protected] wrote: @drhalftone https://github.com/drhalftone I am not sure which version of the code you are on. The lines you have in the error output don't match with what I see on the master branch. Also we have handling for OSX in the codebase since a while. Which branch are you using? — |
@drhalftone ok, I think you are missing a few dependencies. You will need to make sure you have eigen and boost installed. i.e. in case you use homebrew:
|
DrHalftone:build dllau$ brew install eigen On Jan 13, 2016, at 10:51 AM, Simon Lynen [email protected] wrote: @drhalftone https://github.com/drhalftone ok, I think you are missing a few dependencies. You will need to make sure you have eigen and boost installed. i.e. in case you use homebrew: brew install eigen |
I see. Ok it seems the compilation of one of the verification targets fails. Can you post the contents of "/Users/dllau/Libraries/libnabo/build/CMakeFiles/CMakeOutput.log". Here? |
ok, there seems to be some issue with the way the open-mp detection breaks on your machine. I suggest commenting this line here: https://github.com/ethz-asl/libnabo/blob/master/CMakeLists.txt#L52 |
DrHalftone:libnabo dllau$ rm -r build get_target_property() called with non-existent target "doc". -- Boost version: 1.59.0 -- Configuring incomplete, errors occurred! openmpfind_package(OpenMP)if (OPENMP_FOUND) On Jan 13, 2016, at 11:56 AM, Simon Lynen [email protected] wrote: ok, there seems to be some issue with the way the open-mp detection breaks on your machine. I suggest commenting this line here: https://github.com/ethz-asl/libnabo/blob/master/CMakeLists.txt#L52 https://github.com/ethz-asl/libnabo/blob/master/CMakeLists.txt#L52 |
@drhalftone since I cannot reproduce the problem here and in the interest of time I suggest you disable the compile time tests in: |
In file included from ../nabo/kdtree_cpu.cpp:42:
In file included from /usr/local/include/boost/format.hpp:38:
In file included from /usr/local/include/boost/format/internals.hpp:20:
In file included from /usr/local/include/boost/optional.hpp:15:
/usr/local/include/boost/optional/optional.hpp:1276:3: warning: unused typedef 'boost_static_assert_typedef_1276' [-Wunused-local-typedef]
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
^
/usr/local/include/boost/static_assert.hpp:36:48: note: expanded from macro 'BOOST_STATIC_ASSERT_MSG'
define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
/usr/local/include/boost/static_assert.hpp:170:16: note: expanded from macro 'BOOST_STATIC_ASSERT'
BOOST_JOIN(boost_static_assert_typedef_, LINE) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
^
/usr/local/include/boost/config/suffix.hpp:544:28: note: expanded from macro 'BOOST_JOIN'
define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
/usr/local/include/boost/config/suffix.hpp:545:31: note: expanded from macro 'BOOST_DO_JOIN'
define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
/usr/local/include/boost/config/suffix.hpp:546:32: note: expanded from macro 'BOOST_DO_JOIN2'
define BOOST_DO_JOIN2( X, Y ) X##Y
:123:1: note: expanded from here
boost_static_assert_typedef_1276
^
4 warnings generated.
[ 31%] Building CXX object CMakeFiles/nabo.dir/nabo/kdtree_opencl.cpp.o
Linking CXX static library libnabo.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libnabo.a(kdtree_opencl.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libnabo.a(kdtree_opencl.cpp.o) has no symbols
[ 31%] Built target nabo
Scanning dependencies of target trivial
[ 37%] Building CXX object examples/CMakeFiles/trivial.dir/trivial.cpp.o
Linking CXX executable trivial
[ 37%] Built target trivial
Scanning dependencies of target usage
[ 43%] Building CXX object examples/CMakeFiles/usage.dir/usage.cpp.o
Linking CXX executable usage
[ 43%] Built target usage
Scanning dependencies of target knnbench
[ 50%] Building CXX object tests/CMakeFiles/knnbench.dir/knnbench.cpp.o
../../tests/knnbench.cpp:69:18: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &ts);
^
1 error generated.
make[2]: *** [tests/CMakeFiles/knnbench.dir/knnbench.cpp.o] Error 1
make[1]: *** [tests/CMakeFiles/knnbench.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: