Core 300 Mac build issues

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Core 300 Mac build issues

Postby carli2 » Tue Sep 25, 2012 5:36 pm

Julio Jerez wrote:Carliu, I think we are seen some very different you and I.
you keep saying the project is a mess, it is full of Bug, uninilized variables, while bunch of pejorative adjectives, but each time I ask waht it si that you want, you reply with generalities tha do not really help.

I'm sorry for that.

My current whish:
Code: Select all
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgAABBPolygonSoup.o ../../source/core/dgAABBPolygonSoup.cpp
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgAsyncThread.o ../../source/core/dgAsyncThread.cpp
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgConvexHull3d.o ../../source/core/dgConvexHull3d.cpp
gcc: error: ../../source/core/dgAABBPolygonSoup.o: No such file or directory
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgConvexHull4d.o ../../source/core/dgConvexHull4d.cpp
make: *** [../../source/core/dgAABBPolygonSoup.o] Error 1
make: *** Waiting for unfinished jobs....
gcc: error: ../../source/core/dgAsyncThread.o: No such file or directory
gcc: error: ../../source/core/dgConvexHull4d.o: No such file or directory
gcc: error: ../../source/core/dgConvexHull3d.o: No such file or directory
make: *** [../../source/core/dgConvexHull4d.o] Error 1
make: *** [../../source/core/dgAsyncThread.o] Error 1
make: *** [../../source/core/dgConvexHull3d.o] Error 1

I was not able compile Newton 3 the last 2 months and Newton 2 is unstable with lots of weird effects.
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Core 300 Mac build issues

Postby Julio Jerez » Wed Sep 26, 2012 9:28 am

Ok teh mke file are up todate now
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Core 300 Mac build issues

Postby carli2 » Wed Sep 26, 2012 1:02 pm

Did you ever try the make files?

Code: Select all
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgAABBPolygonSoup.o ../../source/core/dgAABBPolygonSoup.cpp
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgAsyncThread.o ../../source/core/dgAsyncThread.cpp
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgConvexHull3d.o ../../source/core/dgConvexHull3d.cpp
gcc: error: ../../source/core/dgAABBPolygonSoup.o: No such file or directory
gcc: error: ../../source/core/dgConvexHull3d.o: No such file or directory
gcc: error: ../../source/core/dgAsyncThread.o: No such file or directory
make: *** [../../source/core/dgConvexHull3d.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [../../source/core/dgAABBPolygonSoup.o] Error 1
make: *** [../../source/core/dgAsyncThread.o] Error 1
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Core 300 Mac build issues

Postby JoeJ » Wed Sep 26, 2012 3:51 pm

carli2 wrote:Did you ever try the make files?


Why don't you see WHAT's wrong and post a hint or fix?
My opinion is: It's a waste of talent, if Julio needs to care for everything.
He gone open source and should get something back, don't you think?

There are lots of platforms, there are lots of newton users, but newton is only one man project.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Core 300 Mac build issues

Postby Julio Jerez » Wed Sep 26, 2012 4:23 pm

yes I did, and it compeile all fine in ubunto 10.4
using GCC 4.3

those file has being in teh emake file for a long time
Code: Select all
DG_INCLUDED_PATH = ../../source/core
DG_PATH = $(DG_INCLUDED_PATH)/
DG_SRCS = \
   $(DG_PATH)dgAABBPolygonSoup.cpp \
   $(DG_PATH)dgAsyncThread.cpp \
   $(DG_PATH)dgConvexHull3d.cpp \
   $(DG_PATH)dgConvexHull4d.cpp \


I do not know why it fail to build for you there.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Core 300 Mac build issues

Postby carli2 » Wed Sep 26, 2012 6:19 pm

Code: Select all
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -I  -o ../../source/core/dgAABBPolygonSoup.o ../../source/core/dgAABBPolygonSoup.cpp


There is a -I without a parameter so "-o" is misinterpreted. That is because DG_AI_PATH is not defined. I removed the AI path and it started to build

Code: Select all
Index: makefile
===================================================================
--- makefile   (revision 2562)
+++ makefile   (working copy)
@@ -182,7 +182,7 @@
 #CPU_FLAGS = -O2 -fpic -g -msse -msse4.1 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant
 CPU_FLAGS = -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant
 
-FLAGS = -c -Wall -Wno-strict-aliasing -D_POSIX_VER $(CPU_FLAGS) -I$(DG_INCLUDED_PATH) -I$(DG_INCLUDED_PHYSICS_PATH) -I$(DG_INCLUDED_MESH_PATH) -I$(DG_INCLUDED_OPENCL_PATH) -I$(DG_AI_PATH)
+FLAGS = -c -Wall -Wno-strict-aliasing -D_POSIX_VER $(CPU_FLAGS) -I$(DG_INCLUDED_PATH) -I$(DG_INCLUDED_PHYSICS_PATH) -I$(DG_INCLUDED_MESH_PATH) -I$(DG_INCLUDED_OPENCL_PATH)
 
 .SUFFIXES : .o .cpp
 .cpp.o :


Next Error:
Code: Select all
gcc -c -Wall -Wno-strict-aliasing -D_POSIX_VER -O2 -fpic -g -msse -msse2 -mfpmath=sse -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -I../../source/core -I../../source/physics -I../../source/meshUtil -I../../source/openCL -o ../../source/physics/dgCollisionBVH.o ../../source/physics/dgCollisionBVH.cpp
../../source/core/dgTypes.cpp: Assembler messages:
../../source/core/dgTypes.cpp:169: Error: invalid instruction suffix for `push'
../../source/core/dgTypes.cpp:172: Error: invalid instruction suffix for `pop'
make: *** [../../source/core/dgTypes.o] Error 1
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Core 300 Mac build issues

Postby carli2 » Wed Sep 26, 2012 6:26 pm

An other thing I had to correct to make it work with gcc is:
Code: Select all
--- coreLibrary_300/source/core/dgTypes.cpp   (revision 2562)
+++ coreLibrary_300/source/core/dgTypes.cpp   (working copy)
@@ -150,7 +150,7 @@
       void cpuid(dgUnsigned32 op, dgUnsigned32 reg[4])
       {
          asm volatile(
-            #ifdef _MINGW_64_VER
+            #if __x86_64__
                "pushq %%rbx      \n\t" /* save %rbx */
             #else
                "pushl %%ebx      \n\t" /* save %ebx */
@@ -159,7 +159,7 @@
             "cpuid            \n\t"
             "movl %%ebx, %1   \n\t" /* save what cpuid just put in %ebx */
 
-            #ifdef _MINGW_64_VER
+            #if __x86_64__
                "popq %%rbx       \n\t" /* restore the old %rbx */
             #else      
                "popl %%ebx       \n\t" /* restore the old %ebx */


And I had to remove - $(DG_PHYSICS_PATH)dgOpenCL.cpp \ from the compile list.
Now I have a libNewton.so and can test it :)
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Core 300 Mac build issues

Postby Julio Jerez » Thu Sep 27, 2012 12:52 am

Oh those error are in the 64 bit make file, I did not test that, I made the changes now.
if you can test again it will be greta because I do not have a 64 linux system.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Core 300 Mac build issues

Postby carli2 » Thu Sep 27, 2012 4:46 am

Yes, that works fine for me. Thanks.
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron