Can't compile

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Can't compile

Postby Jop » Thu May 05, 2016 12:36 pm

I tried to compile Newton (with CMake) and then I got this error:

Code: Select all
[ 10%] Building CXX object coreLibrary_300/CMakeFiles/NewtonObj.dir/source/physics/dgSkeletonContainer.cpp.o
In file included from /home/jop/Downloads/newton-dynamics/coreLibrary_300/source/core/dg.h:47:0,
                 from /home/jop/Downloads/newton-dynamics/coreLibrary_300/source/physics/dgPhysicsStdafx.h:35,
                 from /home/jop/Downloads/newton-dynamics/coreLibrary_300/source/physics/dgSkeletonContainer.cpp:22:
/home/jop/Downloads/newton-dynamics/coreLibrary_300/source/core/dgSPDMatrix.h: In instantiation of ‘bool dgLCP<T>::SolveDantzig() [with T = float]’:
/home/jop/Downloads/newton-dynamics/coreLibrary_300/source/physics/dgSkeletonContainer.cpp:784:19:   required from here
/home/jop/Downloads/newton-dynamics/coreLibrary_300/source/core/dgSPDMatrix.h:471:23: error: ‘MatrixTimeVector’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
  MatrixTimeVector(x, r);
                       ^
/home/jop/Downloads/newton-dynamics/coreLibrary_300/source/core/dgSPDMatrix.h:471:23: note: declarations in dependent base ‘dgGeneralMatrix<float>’ are not found by unqualified lookup
/home/jop/Downloads/newton-dynamics/coreLibrary_300/source/core/dgSPDMatrix.h:471:23: note: use ‘this->MatrixTimeVector’ instead
make[2]: *** [coreLibrary_300/CMakeFiles/NewtonObj.dir/source/physics/dgSkeletonContainer.cpp.o] Error 1
make[1]: *** [coreLibrary_300/CMakeFiles/NewtonObj.dir/all] Error 2
make: *** [all] Error 2


What I am I doing wrong?
Jop
 
Posts: 7
Joined: Tue May 03, 2016 8:19 am

Re: Can't compile

Postby d.l.i.w » Thu May 05, 2016 2:29 pm

Same for me. The latest commit seems to break compilation, but you can assume it will be fixed in the next revision. You can use an older revision or the latest release (3.13) in the meantime.

Does not happen often, but sometimes it does :mrgreen:
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Can't compile

Postby Julio Jerez » Thu May 05, 2016 3:10 pm

It my fault for not testing the script, what is the error d.l.i.w?

I will try form time to time to run the script so that we do no t get these errors each time a new person try that .
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Can't compile

Postby Julio Jerez » Thu May 05, 2016 3:11 pm

oh I see, dgSPDMatrix.h I am doin some work for the self balancing ragdoll feature.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Can't compile

Postby d.l.i.w » Thu May 05, 2016 4:27 pm

The newest revision still does not compile, the error now is:
Code: Select all
In file included from coreLibrary_300/source/core/dgSPDMatrix.cpp:25:0:
coreLibrary_300/source/core/dgSPDMatrix.h:
In member function ‘void dgSPDMatrix<T, Size>::CholeskySolve(dgGeneralVector<T, Rows>&, const dgGeneralVector<T, Rows>&, dgInt32) const’:
coreLibrary_300/source/core/dgSPDMatrix.h:614:25: error: ‘m_rows’ was not declared in this scope
   const T* const row = &m_rows[i][0];
                         ^
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Can't compile

Postby Julio Jerez » Thu May 05, 2016 5:05 pm

fix it
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Can't compile

Postby d.l.i.w » Thu May 05, 2016 5:36 pm

I still get an error:
In file included from coreLibrary_300/source/core/dgSPDMatrix.cpp:25:0:
coreLibrary_300/source/core/dgSPDMatrix.h:
In member function ‘void dgLCP<T, Size>::CholeskyRestore(dgInt32, dgInt32)’:
coreLibrary_300/source/core/dgSPDMatrix.h:604:3: error: ‘m_rows’ was not declared in this scope
m_rows[i][i] = diagonal[i];
^
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Can't compile

Postby Stucuk » Thu May 05, 2016 6:17 pm

It may be a good idea to have some stable Work In Progress builds that people can use as a backup for when the repository can't be compiled. 3.13 was released on 17 Jun 2015 which is a while ago.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Can't compile

Postby Julio Jerez » Thu May 05, 2016 6:45 pm

I think may nee a qualifiers, but Visual studios does no see as a error.
are you building Linux?
I will try building in xcode and see if is has the same error.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Can't compile

Postby d.l.i.w » Thu May 05, 2016 6:51 pm

Yes that's on Linux.

@Stucuk
I regularly compile Newton for Linux and it really does not happen often that Newton Core fails to compile. Also Julio usually fixes things very quickly - and one can checkout an earlier version at any time, so I don't think it's strictly necessary.

A usual way to prevent this from happening is to have two branches "master" and maybe "development".
"Development" would be the branch where the actual work happens and compilation can break at any time. "Master" would then be updated less often (e.g. if a feature is ready), but ensured to be compilable.

Of course this means extra effort and I think Julio already uses a version control system for his local changes additionally...

It may be a good idea to have some stable Work In Progress builds

There even is no official release build for Newton 3.13
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Can't compile

Postby Stucuk » Fri May 06, 2016 12:08 am

d.l.i.w wrote:There even is no official release build for Newton 3.13


- https://github.com/MADEAPPS/newton-dynamics/releases/tag/newton-3.13

Its marked as released. Julio did it... so its kinda official.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Can't compile

Postby Julio Jerez » Fri May 06, 2016 2:22 am

ok I think It is fixed now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Can't compile

Postby d.l.i.w » Fri May 06, 2016 4:42 am

@Julio
Yes, builds fine again - thank you.

Stucuk wrote:
d.l.i.w wrote:There even is no official release build for Newton 3.13


- https://github.com/MADEAPPS/newton-dynamics/releases/tag/newton-3.13

Its marked as released. Julio did it... so its kinda official.


I wrote release build - I meant a binary release.
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: Can't compile

Postby Jop » Fri May 06, 2016 12:55 pm

Now I'm getting a different error :|

Code: Select all
[ 76%] Building CXX object packages/CMakeFiles/dVisualDebuggerServer.dir/dVisualDebuggerServer/ServerBodyProxyMap.cpp.o
/home/jop/Downloads/newton-dynamics/packages/dVisualDebuggerServer/ServerBodyProxyMap.cpp:111:1: warning: "/*" within comment [-Wcomment]
 /*
 ^
[ 76%] Building CXX object packages/CMakeFiles/dVisualDebuggerServer.dir/dVisualDebuggerServer/DebuggerServer.cpp.o
/home/jop/Downloads/newton-dynamics/packages/dVisualDebuggerServer/DebuggerServer.cpp: In constructor ‘DebuggerServer::DebuggerServer(NewtonWorld*)’:
/home/jop/Downloads/newton-dynamics/packages/dVisualDebuggerServer/DebuggerServer.cpp:40:50: error: too many arguments to function ‘ENetHost* enet_host_create(const ENetAddress*, size_t, enet_uint32, enet_uint32)’
   m_server = enet_host_create(address, 1, 2, 0, 0);
                                                  ^
In file included from /home/jop/Downloads/newton-dynamics/packages/dVisualDebuggerServer/DebuggerServer.h:25:0,
                 from /home/jop/Downloads/newton-dynamics/packages/dVisualDebuggerServer/DebuggerServer.cpp:22:
/usr/local/include/enet/enet.h:479:21: note: declared here
 ENET_API ENetHost * enet_host_create (const ENetAddress *, size_t, enet_uint32, enet_uint32);
                     ^
make[2]: *** [packages/CMakeFiles/dVisualDebuggerServer.dir/dVisualDebuggerServer/DebuggerServer.cpp.o] Error 1
make[1]: *** [packages/CMakeFiles/dVisualDebuggerServer.dir/all] Error 2
make: *** [all] Error 2
Jop
 
Posts: 7
Joined: Tue May 03, 2016 8:19 am

Re: Can't compile

Postby d.l.i.w » Fri May 06, 2016 2:54 pm

There is a problem with your enet version. Do you use the library provided by your distribution and which version is it?
I don't have access to my development machine right now, but I will find out which version I use. The enet version bundled with Newton ("thirdParty") is version 1.2.

You could try to compile and install enet yourself:
https://github.com/MADEAPPS/newton-dynamics/tree/master/packages/thirdParty/enet-1.2

EDIT:
I'm not totally sure, but I think the dVisualDebuggerServer isn't even needed any more (Julio?) - I will check asap and update the CMake files accordingly..

You could try to remove dVisualDebuggerServer in this line
https://github.com/MADEAPPS/newton-dynamics/blob/master/applications/demosSandbox/CMakeLists.txt#L28

It looks like you have really bad luck :(

EDIT2:
Btw. (only) compiling the demo sandbox failed, at this point the core newton library is already successfully built.
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 42 guests