Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by mreichardt » Tue Jan 24, 2012 2:07 pm
Hi,
I checked out the latest Newton version from your svn-repository and discovered that small modifications to the makefiles are required in order to compile a full version of the coreLibrary_200 source code (on Ubuntu 11.10):
I only tested the linux64-makefile - but I guess the same modification is required for linux32.
- Code: Select all
newton-dynamics-read-only$ svn diff
Index: coreLibrary_200/projets/linux32/makefile
===================================================================
--- coreLibrary_200/projets/linux32/makefile (revision 1471)
+++ coreLibrary_200/projets/linux32/makefile (working copy)
@@ -58,6 +58,7 @@
$(DG_PHYSICS_PATH)dgBody.cpp \
$(DG_PHYSICS_PATH)dgMeshEffect.cpp \
$(DG_PHYSICS_PATH)dgMeshEffect2.cpp \
+ $(DG_PHYSICS_PATH)dgMeshEffect3.cpp \
$(DG_PHYSICS_PATH)dgMeshEffectSolidTree.cpp \
$(DG_PHYSICS_PATH)dgCollisionConvex.cpp \
$(DG_PHYSICS_PATH)dgBallConstraint.cpp \
Index: coreLibrary_200/projets/linux64/makefile
===================================================================
--- coreLibrary_200/projets/linux64/makefile (revision 1471)
+++ coreLibrary_200/projets/linux64/makefile (working copy)
@@ -26,7 +26,7 @@
$(DG_PATH)dgTree.cpp \
$(DG_PATH)dgNode.cpp \
$(DG_PATH)dgTypes.cpp \
- $(DG_PATH)dgDebug.cpp \
+ $(DG_PATH)dgDebug.cpp \
$(DG_PATH)dgMatrix.cpp \
$(DG_PATH)dgGoogol.cpp \
$(DG_PATH)dgMemory.cpp \
@@ -58,6 +58,7 @@
$(DG_PHYSICS_PATH)dgBody.cpp \
$(DG_PHYSICS_PATH)dgMeshEffect.cpp \
$(DG_PHYSICS_PATH)dgMeshEffect2.cpp \
+ $(DG_PHYSICS_PATH)dgMeshEffect3.cpp \
$(DG_PHYSICS_PATH)dgMeshEffectSolidTree.cpp \
$(DG_PHYSICS_PATH)dgCollisionConvex.cpp \
$(DG_PHYSICS_PATH)dgBallConstraint.cpp \
Best Regards
-
mreichardt
-
- Posts: 2
- Joined: Tue Jan 24, 2012 1:56 pm
by Julio Jerez » Wed Jan 25, 2012 8:50 am
is this for core 200?
This weekend I will rebuild core 200 to make a final update. I will add the linux makefiel as well
then form now on it will all be core 300
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by mreichardt » Wed Jan 25, 2012 6:02 pm
Thankyou for your quick response.
Yes, this was core 200.
I tried to compile core 300 as well, but it seems difficult. I got stuck with dgWorkerThread.cpp.
These are the patches I applied so far (in case this is helpful for you (?)):
- Code: Select all
newton-dynamics-read-only/coreLibrary_300$ svn diff
Index: source/physics/dgBroadPhaseCollision.h
===================================================================
--- source/physics/dgBroadPhaseCollision.h (Revision 1475)
+++ source/physics/dgBroadPhaseCollision.h (Arbeitskopie)
@@ -31,6 +31,7 @@
class dgBroadphaseSyncDescriptor;
+class dgBroadPhaseCollision;
DG_MSC_VECTOR_ALIGMENT
class dgBroadPhaseNode
@@ -57,7 +58,7 @@
dgInt32 m_uniqueID;
#endif
- friend dgBroadPhaseCollision;
+ friend class dgBroadPhaseCollision;
} DG_GCC_VECTOR_ALIGMENT;
class dgBroadPhaseLeafNode: public dgBroadPhaseNode
@@ -70,7 +71,7 @@
dgBody* m_body;
friend class dgBody;
- friend dgBroadPhaseCollision;
+ friend class dgBroadPhaseCollision;
};
Index: source/physics/dgCollisionCompound.cpp
===================================================================
--- source/physics/dgCollisionCompound.cpp (Revision 1475)
+++ source/physics/dgCollisionCompound.cpp (Arbeitskopie)
@@ -59,7 +59,7 @@
class dgCollisionCompound::dgOOBBTestData
{
public:
- dgOOBBTestData::dgOOBBTestData (const dgMatrix& matrix)
+ dgOOBBTestData (const dgMatrix& matrix)
:m_matrix (matrix)
{
for (dgInt32 i = 0; i < 3; i ++) {
@@ -78,7 +78,7 @@
}
- dgOOBBTestData::dgOOBBTestData (const dgMatrix& matrix, const dgVector& p0, const dgVector& p1)
+ dgOOBBTestData (const dgMatrix& matrix, const dgVector& p0, const dgVector& p1)
:m_matrix (matrix), m_localP0(p0), m_localP1(p1)
{
m_size = (m_localP1 - m_localP0).Scale (dgFloat32 (0.5f));
Index: source/physics/dgCollisionCompound.h
===================================================================
--- source/physics/dgCollisionCompound.h (Revision 1475)
+++ source/physics/dgCollisionCompound.h (Arbeitskopie)
@@ -25,8 +25,8 @@
#include "dgCollision.h"
class dgCollisionConvex;
+class dgCollisionBVH;
#define DG_COMPOUND_STACK_DEPTH 256
class dgCollisionCompound: public dgCollision
Index: source/core/dgVector.h
===================================================================
--- source/core/dgVector.h (Revision 1475)
+++ source/core/dgVector.h (Arbeitskopie)
@@ -26,7 +26,7 @@
#include "dgDebug.h"
#include "dgMemory.h"
#include "dgAVX_Instrutions.h"
-#include "dgSimd_Instrutions.h"
+#include "dgSimD_Instrutions.h"
#define dgCheckVector(x) (dgCheckFloat(x[0]) && dgCheckFloat(x[1]) && dgCheckFloat(x[2]) && dgCheckFloat(x[3]))
//#define dgCheckVector(x) true
Index: source/core/dgMatrix.h
===================================================================
--- source/core/dgMatrix.h (Revision 1475)
+++ source/core/dgMatrix.h (Arbeitskopie)
@@ -28,7 +28,7 @@
#include "dgVector.h"
#include "dgPlane.h"
#include "dgAVX_Instrutions.h"
-#include "dgSimd_Instrutions.h"
+#include "dgSimD_Instrutions.h"
#include <math.h>
Index: source/core/dgTypes.h
===================================================================
--- source/core/dgTypes.h (Revision 1475)
+++ source/core/dgTypes.h (Arbeitskopie)
@@ -343,8 +343,8 @@
dgInt32 entry2 = array[index2].m_Key;
while ((index2 - index0) > 1) {
- index1 = (index0 + index2) >> 1;
- entry1 = array[index1].m_Key;
+ dgInt32 index1 = (index0 + index2) >> 1;
+ dgInt32 entry1 = array[index1].m_Key;
if (entry1 == entry) {
_ASSERTE (array[index1].m_Key <= entry);
_ASSERTE (array[index1 + 1].m_Key >= entry);
Index: source/core/dgAVX_Instrutions.h
===================================================================
--- source/core/dgAVX_Instrutions.h (Revision 1475)
+++ source/core/dgAVX_Instrutions.h (Arbeitskopie)
@@ -25,437 +25,437 @@
#include "dgStdafx.h"
#include "dgTypes.h"
-#include "dgSimd_Instrutions.h"
+#include "dgSimD_Instrutions.h"
#ifdef DG_BUILD_SIMD_AVX_CODE
DG_MSC_VECTOR_ALIGMENT
...
Index: source/core/dgWorkerThread.cpp
===================================================================
--- source/core/dgWorkerThread.cpp (Revision 1475)
+++ source/core/dgWorkerThread.cpp (Arbeitskopie)
@@ -35,7 +35,9 @@
,m_contineExecution(0)
,m_ticks(0)
,m_jobQueueCompletedSignal(NULL)
+#if (defined (_WIN_32_VER) || defined (_WIN_64_VER) || defined (_MINGW_32_VER) || defined (_MINGW_64_VER))
,m_jobsInQueueSemaphore(NULL)
+#endif
,m_threadhandle(NULL)
,m_getPerformanceCount(NULL)
{
Index: source/core/dg.h
===================================================================
--- source/core/dg.h (Revision 1475)
+++ source/core/dg.h (Arbeitskopie)
@@ -57,7 +57,7 @@
#include "dgAABBPolygonSoup.h"
#include "dgAVX_Instrutions.h"
#include "dgSmallDeterminant.h"
-#include "dgSimd_Instrutions.h"
+#include "dgSimD_Instrutions.h"
#include "dgPolygonSoupBuilder.h"
#include "dgPolygonSoupDatabase.h"
#include "dgPolyhedraMassProperties.h"
Index: source/core/dgAABBPolygonSoup.cpp
===================================================================
--- source/core/dgAABBPolygonSoup.cpp (Revision 1475)
+++ source/core/dgAABBPolygonSoup.cpp (Arbeitskopie)
@@ -31,7 +31,7 @@
#include "dgList.h"
#include "dgMatrix.h"
#include "dgPolygonSoupBuilder.h"
-#include "dgSimd_Instrutions.h"
+#include "dgSimD_Instrutions.h"
#include "dgAABBPolygonSoup.h"
Index: source/core/dgSimD_Instrutions.h
===================================================================
--- source/core/dgSimD_Instrutions.h (Revision 1475)
+++ source/core/dgSimD_Instrutions.h (Arbeitskopie)
@@ -25,6 +25,7 @@
#include "dgStdafx.h"
#include "dgTypes.h"
+#include <x86intrin.h>
#ifdef DG_BUILD_SIMD_CODE
Index: projets/linux64/makefile
===================================================================
--- projets/linux64/makefile (Revision 1475)
+++ projets/linux64/makefile (Arbeitskopie)
@@ -31,7 +31,8 @@
$(DG_PATH)dgMemory.cpp \
$(DG_PATH)dgSphere.cpp \
$(DG_PATH)dgRandom.cpp \
- $(DG_PATH)dgThreads.cpp \
+ $(DG_PATH)dgThreadHive.cpp \
+ $(DG_PATH)dgWorkerThread.cpp \
$(DG_PATH)dgPolyhedra.cpp \
$(DG_PATH)dgQuaternion.cpp \
$(DG_PATH)dgConvexHull3d.cpp \
@@ -55,8 +56,6 @@
DG_PHYSICS_SRCS = \
$(DG_PHYSICS_PATH)dgWorld.cpp \
$(DG_PHYSICS_PATH)dgBody.cpp \
- $(DG_PHYSICS_PATH)dgMeshEffect.cpp \
- $(DG_PHYSICS_PATH)dgMeshEffect2.cpp \
$(DG_PHYSICS_PATH)dgCollisionConvex.cpp \
$(DG_PHYSICS_PATH)dgBallConstraint.cpp \
$(DG_PHYSICS_PATH)dgBilateralConstraint.cpp \
@@ -92,8 +91,28 @@
$(DG_PHYSICS_PATH)dgConnectorConstraint.cpp \
$(DG_PHYSICS_PATH)dgConstraint.cpp \
$(DG_PHYSICS_PATH)dgBodyMasterList.cpp \
- $(DG_PHYSICS_PATH)dgContact.cpp
+ $(DG_PHYSICS_PATH)dgContact.cpp \
+ $(DG_PHYSICS_PATH)dgMinkowskiConv.cpp \
+ $(DG_PHYSICS_PATH)dgDeformableBody.cpp \
+ $(DG_PHYSICS_PATH)dgDeformableContact.cpp \
+ $(DG_PHYSICS_PATH)dgCollisionDeformableMesh.cpp \
+ $(DG_PHYSICS_PATH)dgCollisionCompoundArticulatedSkeleton.cpp \
+ $(DG_PHYSICS_PATH)dgCollisionConvexPolygon.cpp \
+ $(DG_PHYSICS_PATH)dgWorldDynamicUpdate.cpp
+# ******************************************************
+#
+# Mesh util files
+#g++ -shared -o libNewton.so libNewton.a
+# ******************************************************
+DG_INCLUDED_MESHUTIL_PATH = ../../source/meshUtil
+DG_MESHUTIL_PATH = $(DG_INCLUDED_MESHUTIL_PATH)/
+DG_MESHUTIL_SRCS = \
+ $(DG_MESHUTIL_PATH)dgMeshEffect1.cpp \
+ $(DG_MESHUTIL_PATH)dgMeshEffect2.cpp \
+ $(DG_MESHUTIL_PATH)dgMeshEffect3.cpp \
+ $(DG_MESHUTIL_PATH)dgMeshEffect4.cpp \
+ $(DG_MESHUTIL_PATH)dgMeshEffectSolidTree.cpp
# ******************************************************
#
@@ -111,7 +130,7 @@
# Allsource files
#
# ******************************************************
-ALL_SRC_FILES = $(DG_SRCS) $(DG_PHYSICS_SRCS) $(DG_NEWTON_SRCS)
+ALL_SRC_FILES = $(DG_SRCS) $(DG_PHYSICS_SRCS) $(DG_NEWTON_SRCS) $(DG_MESHUTIL_SRCS)
DG_OBJ_FILES = $(ALL_SRC_FILES:.cpp=.o)
COMPILER = gcc
@@ -119,10 +138,10 @@
# Linux options gcc 4.2.2
#CPU_FLAGS = -fPIC -O0 -g
#CPU_FLAGS = -O2 -fsingle-precision-constant
-CPU_FLAGS = -O2 -fpic -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant
+CPU_FLAGS = -O2 -fpic -msse -msse2 -msse3 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant
#FLAGS = -c -Wall -Wno-strict-aliasing -D_LINUX_VER -ffloat-store -ffast-math -fsingle-precision-constant $(CPU_FLAGS) -I$(DG_INCLUDED_PATH) -I$(DG_INCLUDED_PHYSICS_PATH)
-FLAGS = -c -Wall -Wno-strict-aliasing -D_LINUX_VER -D_LINUX_VER_64 $(CPU_FLAGS) -I$(DG_INCLUDED_PATH) -I$(DG_INCLUDED_PHYSICS_PATH)
+FLAGS = -c -Wall -Wno-strict-aliasing -D_LINUX_VER -D_LINUX_VER_64 $(CPU_FLAGS) -I$(DG_INCLUDED_PATH) -I$(DG_INCLUDED_PHYSICS_PATH) -I$(DG_INCLUDED_MESHUTIL_PATH)
Best Regards,
Max
-
mreichardt
-
- Posts: 2
- Joined: Tue Jan 24, 2012 1:56 pm
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 6 guests