A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by JernejL » Mon Mar 07, 2011 3:37 pm
I will keep on dreaming of a GCC win32 newton.dll build..
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Mon Mar 07, 2011 3:47 pm
Hey Delfi we migh be able to do even better than a GCC dll version for windows.
Intel is working on a OpenCL for X86 using SSE, and it is using the Intel compiler which apparenlly is even better than GCC.
I dowloaded already and as soon as I complete the subtitution of the intrinsics to use the new class, I will start workin of the OpenCL support.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by martinsm » Tue Mar 08, 2011 5:46 am
Delfi wrote:I will keep on dreaming of a GCC win32 newton.dll build..
I found that you can create makefile for that without any source modifications!
1) checkout latest 2.x source:
- Code: Select all
svn checkout http://newton-dynamics.googlecode.com/svn/trunk/coreLibrary_200 newton-dynamic
2) Put both files from attachment of this post into projects\windows directory
3) run mingw32-make command from projects\windows directory
You will get in output static library libNewton.a and Newton.dll file with it's import library libNewton.dll.a file.
I tested building with official MinGW GCC v4.5.2. I you're using other (like TDM-GCC), then it's possible some tweaks to commandline will be necessary.
- Attachments
-
- mingw32_makefile.zip
- (3.34 KiB) Downloaded 432 times
-
martinsm
-
- Posts: 86
- Joined: Mon Dec 19, 2005 3:15 pm
- Location: Latvia
by JernejL » Tue Mar 08, 2011 7:12 am
It doesn't help me since i can't compile anything - i got very little experience with mingw and other related tools..
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by martinsm » Tue Mar 08, 2011 7:25 am
Then I don't get it - why do you need GCC compiled Newtond.dll file? What's wrong with MSVC compiled Newton.dll file?
-
martinsm
-
- Posts: 86
- Joined: Mon Dec 19, 2005 3:15 pm
- Location: Latvia
by JernejL » Tue Mar 08, 2011 9:50 am
supposedly the GCC generates faster and better optimized code.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Tue Mar 08, 2011 11:41 pm
martinsm wrote:Oh, and by the way during porting I found small bug in Newton. When building TreeCollision NewtonTreeCollisionEndBuild was ignoring optimize parameter. I needed to passs there false (to not to optimize), because Newton was crashing when optimize=true.
Martinsm I foudn teh bug that was making newtn crash, I beleive you were amkin a floor whe all teh face were coplanar, an dteh optimizer merged then to a single polygon.
The code was asumin thet the root of the tree will have children, and that was making the build process fail.
I fixed and checked it in, if you sinc to SVN it should be fine now.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by thedmd » Thu Mar 10, 2011 3:49 pm
Julio, you may find this interesting. One of the bugfixes in the VS2010 SP1 is "C++ compiler generates incorrect movups instructions iso movss"
http://connect.microsoft.com/VisualStudio/feedback/details/548432.
Maybe this also solve the problem with simd_128 class and wrong alignment.
"God started from scratch too"
-
thedmd
-
- Posts: 149
- Joined: Fri Jun 26, 2009 11:52 pm
by martinsm » Thu Mar 10, 2011 5:20 pm
Julio Jerez wrote:Martinsm I foudn teh bug that was making newtn crash, I beleive you were amkin a floor whe all teh face were coplanar, an dteh optimizer merged then to a single polygon.
The code was asumin thet the root of the tree will have children, and that was making the build process fail.
I fixed and checked it in, if you sinc to SVN it should be fine now.
Thanks. I took & compiled latest source - and can confirm that this fixed bug on Android. I indeed was creating TreeCollision with all faces coplanar. Now I have no problem creating these (and all other) TreeCollisions with optimized flag = true.
thedmd wrote:Maybe this also solve the problem with simd_128 class and wrong alignment.
I really doubt that has something to do with passing arguments on stack unaligned. I guess it's problem of Windows OS ABI by design.
-
martinsm
-
- Posts: 86
- Joined: Mon Dec 19, 2005 3:15 pm
- Location: Latvia
by Julio Jerez » Thu Mar 10, 2011 6:37 pm
you know that is exactly the problem, I am getting the wrong mov intructions, The thing is I am getting with VS 2008, I have not tested with VS2010.
Anyway it is not big deal. we can just simple if def that out and have oen class for MS and one for GCC.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Thu Mar 10, 2011 8:38 pm
martinsm wrote:Delfi wrote:I will keep on dreaming of a GCC win32 newton.dll build..
I found that you can create makefile for that without any source modifications!
1) checkout latest 2.x source:
- Code: Select all
svn checkout http://newton-dynamics.googlecode.com/svn/trunk/coreLibrary_200 newton-dynamic
2) Put both files from attachment of this post into projects\windows directory
3) run mingw32-make command from projects\windows directory
You will get in output static library libNewton.a and Newton.dll file with it's import library libNewton.dll.a file.
I tested building with official MinGW GCC v4.5.2. I you're using other (like TDM-GCC), then it's possible some tweaks to commandline will be necessary.
Can you compile us a single precision newton win32 dll for testing?
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by JernejL » Fri Mar 11, 2011 1:56 pm
I get a crash in NewtonSetWorldSize:
- Code: Select all
va := makevector(0, -255, 0);
vb := makevector(255, 0, 8);
NewtonSetWorldSize(nworld, @va, @vb);
Is this a single or double precision build?
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 30 guests