Latest version which compiles under linux 64 bit: 2391

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Latest version which compiles under linux 64 bit: 2391

Postby perkins » Tue Aug 14, 2012 2:15 pm

For anyone else trying to get this to compile from source on 64 bit linux, revision 2391 compiles with CMake, no issues at all. Revision 2402 does not. If someone gets a later revision to compile, with zero modifications to the code, post the revision number here please.
perkins
 
Posts: 22
Joined: Sat Dec 24, 2011 9:41 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby Julio Jerez » Wed Aug 15, 2012 12:06 am

what are the errors?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Latest version which compiles under linux 64 bit: 2391

Postby perkins » Wed Aug 15, 2012 12:37 am

newton-dynamics/build $ svn update ..
At revision 2406.
newton-dynamics/build $ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found TinyXML: /usr/include
-- Configuring done
-- Generating done

newton-dynamics/build $ make
Scanning dependencies of target Newton
[ 0%] Building CXX object CMakeFiles/Newton.dir/coreLibrary_300/source/openCL/dgOpenCL.cpp.o
In file included from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dg.h:38:0,
from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/physics/dgPhysicsStdafx.h:35,
from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/openCL/dgOpenCL.cpp:23:
/home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dgGraph.h: In member function 'void dgGraphNode<dgNodeData, dgEdgeData>::Trace() const':
/home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dgGraph.h:183:2: error: 'm_index' was not declared in this scope
make[2]: *** [CMakeFiles/Newton.dir/coreLibrary_300/source/openCL/dgOpenCL.cpp.o] Error 1
make[1]: *** [CMakeFiles/Newton.dir/all] Error 2
make: *** [all] Error 2
perkins
 
Posts: 22
Joined: Sat Dec 24, 2011 9:41 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby perkins » Wed Aug 15, 2012 12:42 am

It's not really a big deal. I've never had it just compile right out of the box, but it did for 2391, so I figured that'd be worth mentioning. It might be worth getting a buildbot farm going to produce daily builds for the major platforms.
perkins
 
Posts: 22
Joined: Sat Dec 24, 2011 9:41 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby carli2 » Wed Aug 15, 2012 11:06 am

Here are my build errors:

Code: Select all
../../source/core/dgTypes.h: In constructor ‘dgSetPrecisionDouble::dgSetPrecisionDouble()’:
../../source/core/dgTypes.h:770:3: error: ‘_clearfp’ was not declared in this scope
../../source/core/dgTypes.h:771:12: error: ‘_controlfp’ was not declared in this scope
../../source/core/dgTypes.h:772:3: error: ‘_PC_53’ was not declared in this scope
../../source/core/dgTypes.h:772:3: error: ‘_MCW_PC’ was not declared in this scope
../../source/core/dgTypes.h: In destructor ‘dgSetPrecisionDouble::~dgSetPrecisionDouble()’:
../../source/core/dgTypes.h:777:3: error: ‘_clearfp’ was not declared in this scope
../../source/core/dgTypes.h:778:3: error: ‘_MCW_PC’ was not declared in this scope
../../source/core/dgTypes.h:778:3: error: ‘_controlfp’ was not declared in this scope
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby Julio Jerez » Wed Aug 15, 2012 12:03 pm

Oh I am sorry, that was my mistake.
I forgot that I was only setting the precision mode is windows platform, in window some third party libraries has the nasty habit of setting the precision mode to 32 bit floats (d3d is a typical example)
Newton has some unlimited extend precision float class that is use if some of the computational geometry algorithm,
the float are initized from a double and if the precision is set to floats then all of the algorithms fail because the computation algorithm math assume exact arithmetic.
Linux and Mac OS do not seems to do meddle with the float unit, and if they do they restored, but windows developers are more sloppy and do no restore the CUP state.
Engoines Like Ogre and Irrlicth are particularly bad on that, therefore I need to make sure the precision is right.
I recently move that code to a class because I made a mistake very recent working with Boolean, so I decide to make better, but I forget that Linux part.

It is fixed now, you can try again.


It will be nice if I new teh equvalend of _controlfp and _clearfp for GCC, but I do not find it
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Latest version which compiles under linux 64 bit: 2391

Postby perkins » Wed Aug 15, 2012 1:17 pm

perkins@LMDE-Laptop ~/Source/newton-dynamics/build $ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/perkins/Source/newton-dynamics/build
Scanning dependencies of target Newton
[ 0%] Building CXX object CMakeFiles/Newton.dir/coreLibrary_300/source/openCL/dgOpenCL.cpp.o
In file included from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dg.h:38:0,
from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/physics/dgPhysicsStdafx.h:35,
from /home/perkins/Source/newton-dynamics/coreLibrary_300/source/openCL/dgOpenCL.cpp:23:
/home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dgGraph.h: In member function 'void dgGraphNode<dgNodeData, dgEdgeData>::Trace() const':
/home/perkins/Source/newton-dynamics/coreLibrary_300/source/core/dgGraph.h:183:2: error: 'm_index' was not declared in this scope
make[2]: *** [CMakeFiles/Newton.dir/coreLibrary_300/source/openCL/dgOpenCL.cpp.o] Error 1
make[1]: *** [CMakeFiles/Newton.dir/all] Error 2
make: *** [all] Error 2


From revision 2408. Oh, and 2391 and later won't let me link against the library if the package dContainers is disabled in CMakeLists.txt, but it all does compile.
perkins
 
Posts: 22
Joined: Sat Dec 24, 2011 9:41 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby Julio Jerez » Wed Aug 15, 2012 2:56 pm

I forge to add the new cpp file to the make file

dgOpenCL.cpp

you can added temporarilly of wait until I add it tonight
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Latest version which compiles under linux 64 bit: 2391

Postby perkins » Thu Aug 16, 2012 1:16 pm

Still getting the same error about m_index being undeclared at revision 2412...
perkins
 
Posts: 22
Joined: Sat Dec 24, 2011 9:41 pm

Re: Latest version which compiles under linux 64 bit: 2391

Postby Julio Jerez » Thu Aug 16, 2012 4:43 pm

on this:
Still getting the same error about m_index being undeclared at revision 2412...

temporarilly on that function do this

Code: Select all
template<class dgNodeData, class dgEdgeData>
void dgGraphNode<dgNodeData, dgEdgeData>::Trace () const
{
/*
   dgTrace (("%d: ", m_index));
   for (typename dgGraph<dgNodeData, dgEdgeData>::dgListNode* edge = typename dgGraph<dgNodeData, dgEdgeData>::GetFirst(); edge; edge = edge->GetNext()) {   
      typename dgGraph<dgNodeData, dgEdgeData>::dgListNode* const node;
      node = edge->GetInfo().m_node;
      dgTrace (("%d ", node->GetInfo().m_index));
   }
   dgTrace (("\n"));
*/
}
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests