Open TheJackiMonster opened 4 years ago
Perhaps a different issue but I too am having trouble compiling Newton on Linux. This time Newton 4.00 I set the following CMake build flags:
SET(NEWTON_BUILD_TEST OFF CACHE BOOL "generate test project") SET(NEWTON_BUILD_SANDBOX_DEMOS OFF CACHE BOOL "generates demos projects") SET(NEWTON_BUILD_PROFILER OFF CACHE BOOL "build profiler") SET(NEWTON_BUILD_CREATE_SUB_PROJECTS OFF CACHE BOOL "generate independent subproject") SET(NEWTON_BUILD_SHARED_LIBS OFF CACHE BOOL "build shared library") SET(NEWTON_CREATE_C_INTERFACE OFF CACHE BOOL "build a wrapper dll") SET(NEWTON_WITH_REFERENCE_GPU_PLUGIN OFF CACHE BOOL "adding gpu reference solver, gpu solve using avx2") SET(NEWTON_WITH_AVX_PLUGIN OFF CACHE BOOL "adding avx parallel solver (forces shared libs)") SET(NEWTON_STATIC_RUNTIME_LIBRARIES ON CACHE BOOL "use windows static libraries")
```
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /build --config Debug --target ndNewton -- -j 14
[build] Scanning dependencies of target ndNewton
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndConstraint.cpp.o
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndBody.cpp.o
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndJointBilateralConstraint.cpp.o
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndContact.cpp.o
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndBodyKinematic.cpp.o
[build] [ 0%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndCollisionStdafx.cpp.o
[build] [ 9%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndBodyNotify.cpp.o
[build] [ 9%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndBodyTriggerVolume.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndContactSolver.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndContactList.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndBodyPlayerCapsule.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndSceneNode.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndScene.cpp.o
[build] [ 18%] Building CXX object newton-dynamics/newton-4.00/sdk/CMakeFiles/ndNewton.dir/dCollision/ndSceneMixed.cpp.o
[build] In file included from In file included from /newton-dynamics/newton-4.00/sdk/dCollision/ndScene.cpp:23:
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCore/dCoreStdafx.h:25:
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:213:10: warning: 'D_MSV_NEWTON_ALIGN_32' macro redefined [-Wmacro-redefined]
[build] #define D_MSV_NEWTON_ALIGN_32 D_MSV_NEWTON_ALIGN_16
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:210:11: note: previous definition is here
[build] #define D_MSV_NEWTON_ALIGN_32
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:214:10: warning: 'D_GCC_NEWTON_ALIGN_32' macro redefined [-Wmacro-redefined]
[build] #define D_GCC_NEWTON_ALIGN_32 D_GCC_NEWTON_ALIGN_16
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:209:11: note: previous definition is here
[build] #define D_GCC_NEWTON_ALIGN_32 __attribute__((aligned (32)))
[build] ^
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCollision/ndContact.cpp:23:
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCore/dCoreStdafx.h:25:
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:213:10: warning: 'D_MSV_NEWTON_ALIGN_32' macro redefined [-Wmacro-redefined]
[build] #define D_MSV_NEWTON_ALIGN_32 D_MSV_NEWTON_ALIGN_16
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:210:11: note: previous definition is here
[build] #define D_MSV_NEWTON_ALIGN_32
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:214:10: warning: 'D_GCC_NEWTON_ALIGN_32' macro redefined [-Wmacro-redefined]
[build] #define D_GCC_NEWTON_ALIGN_32 D_GCC_NEWTON_ALIGN_16
[build] ^
[build] /newton-dynamics/newton-4.00/sdk/dCore/dTypes.h:209:11: note: previous definition is here
[build] #define D_GCC_NEWTON_ALIGN_32 __attribute__((aligned (32)))
[build] ^
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCollision/ndScene.cpp:24:
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCollision/ndCollisionStdafx.h:30:
[build] In file included from /newton-dynamics/newton-4.00/sdk/dCore/dCore.h:27:
[build] /newton-dynamics/newton-4.00/sdk/dCore/dList.h:247:25: error: cannot add a default template argument to the definition of a member of a class template
[build] template
Despite that the current package in AUR won't work because the source code was moved to subdirectories, the code won't compile until I comment out this define:
#define DG_LIBRARY_IMPORT __attribute__((visibility("default")))
in "sdk/dgCore/dgTypes.h"With mentioned changes it compiles with multiple warnings but I could effectively run the demos.