PositionBasedDynamics
PositionBasedDynamics copied to clipboard
Compile for OSX (requires libomp)
Support for building on OSX.
Wrangle: needs a libomp.dylib
. Xcode ships with clang that supports OpenMP (-Xpreprocessor -fopenmp
) but you still need to manually build libomp.dylib
and place it somewhere in search paths. Ref https://stackoverflow.com/a/47230419/42961 . To build libomp
and install headers and libs in /usr/local
, do this:
$ cd /tmp
$ svn co http://llvm.org/svn/llvm-project/openmp/trunk libomp
$ cd libomp
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
$ make && make install
Got the following compile error on Cmake. Could any genius here please help? ; )
The C compiler identification is AppleClang 10.0.0.10001145 The CXX compiler identification is AppleClang 10.0.0.10001145 Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- 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/clang++ Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done CMake Error at Demos/ClothDemo/CMakeLists.txt:47 (set_target_properties): set_target_properties called with incorrect number of arguments.
CMake Error at Demos/ClothDemo/CMakeLists.txt:48 (set_target_properties): set_target_properties called with incorrect number of arguments.
CMake Error at Demos/ClothDemo/CMakeLists.txt:49 (set_target_properties): set_target_properties called with incorrect number of arguments.
Configuring incomplete, errors occurred! See also "/Users/xxxxx/Desktop/CMakeFiles/CMakeOutput.log".
My build stop as follows, though I have build libomp and install headers and libs in /usr/local.
[ 27%] Built target PositionBasedDynamics error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Cloning into 'Ext_Discregrid'... -- Had to git clone more than once: 2 times. Note: checking out 'c0fb5aeac4c8a83e9f37c720315f13a834409b81'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b
HEAD is now at c0fb5ae - make it compile with C++11 [ 28%] Performing update step for 'Ext_Discregrid' [ 28%] No patch step for 'Ext_Discregrid' [ 28%] Performing configure step for 'Ext_Discregrid' -- The C compiler identification is AppleClang 11.0.0.11000033 -- The CXX compiler identification is AppleClang 11.0.0.11000033 -- 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 CMake Error at /usr/local/Cellar/cmake/3.13.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.13.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.13.1/share/cmake/Modules/FindOpenMP.cmake:473 (find_package_handle_standard_args) discregrid/CMakeLists.txt:78 (find_package)
-- Configuring incomplete, errors occurred! See also "/Users/huquan/Program/Opensources_github/PositionBasedDynamics-master/build/Discregrid/src/Ext_Discregrid-build/CMakeFiles/CMakeOutput.log". make[2]: *** [Discregrid/src/Ext_Discregrid-stamp/Ext_Discregrid-configure] Error 1 make[1]: *** [CMakeFiles/Ext_Discregrid.dir/all] Error 2 make: *** [all] Error 2
It seems that your internet connection failed. So git could not download the external projects.
- now solved by Robin Rademacher