Newton in C++

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton in C++

Postby Julio Jerez » Sat Sep 08, 2018 9:11 pm

nothing seems to work, I get errors everywhere following the instruction on the own ubuntu website
I get these errors now

julio@julio-Virtual-Machine:~/Downloads$ dir
cmake-3.12.2 cmake-3.12.2.tar.gz
julio@julio-Virtual-Machine:~/Downloads$ cd cmake
bash: cd: cmake: No such file or directory
julio@julio-Virtual-Machine:~/Downloads$ cd cmake-3.12.2/
julio@julio-Virtual-Machine:~/Downloads/cmake-3.12.2$ sudo cp -r bin /usr/
cp: cannot stat 'bin': No such file or directory
julio@julio-Virtual-Machine:~/Downloads/cmake-3.12.2$ sudo cp -r bin /usr/
cp: cannot stat 'bin': No such file or directory
julio@julio-Virtual-Machine:~/Downloads/cmake-3.12.2$ ^C
julio@julio-Virtual-Machine:~/Downloads/cmake-3.12.2$


I do not know what to do from here.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Julio Jerez » Sat Sep 08, 2018 9:27 pm

it like Cmake can read or write any file, I installed again and I get the same errors
CMake Error: The source directory "" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.


not sure what to do, I wasted several hours already and I could not find anyone with similar problem.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Dave Gravel » Sat Sep 08, 2018 10:11 pm

From what I see you need to make a build folder for cmake stuff.
I think you can find a option about it inside cmake gui.

https://seqan.readthedocs.io/en/master/ ... dDirs.html
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby Slick » Sun Sep 09, 2018 1:07 am

I am not an expert but it looks like a files and folder permission problem. In file browser right click on a few files and check permissions. You may want to use command line chmod to change if needed.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 12:53 pm

It's not exactly the way to go but it is what I get here.
Maybe it can give some tips on how to get it work.

https://www.youtube.com/watch?v=tZPrH278TJg
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby Julio Jerez » Tue Sep 11, 2018 2:14 pm

David are you running linux in a virtual machine in windows 10?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 2:19 pm

Yes and I have a version with VMware player free version.
I have already test Virtual box too before, It is good but when I resize the window I get freeze.
I prefer VMware because I can copy past stuff from my windows to linux, and I have a bit better graphic perf too.
I get same result from both about the compile.
I have try to find some flags for the last error, but I think it need to come fix from a different way.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby Julio Jerez » Tue Sep 11, 2018 3:28 pm

wow you know this a lot more than I do, which is mainly nothing for me.
what is the error you are getting?

when you get a working cmake, you can make a pull request, or you can give the the file and I merge them.
that will be one less thing to have to worry about.

thank you very much.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 3:36 pm

Code: Select all
dgWorldDynamicsParallelSolver.h:146:13: error: member ‘dgVector dgWorkGroupFloat::<unnamed union>::<unnamed struct>::m_low’ with constructor not allowed in anonymous aggregate
    dgVector m_low;


I think gcc don't support anonymous struct.
It's new part of code or old newton having it too ?
Because I don't remember to have get this problem in the past when I have compile for android.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby Julio Jerez » Tue Sep 11, 2018 4:45 pm

I have seen that before, the default constructor does not know how to initialize the data,
I this this fixed
Code: Select all
   DG_INLINE dgWorkGroupFloat()
      :m_low()
      ,m_high()
   {
   }


please Sync and try again
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 5:52 pm

I get the same error.

Code: Select all
/home/dave/Documents/Programming/Newton2018/newton-dynamics-master/sdk/dgPhysics/dgWorldDynamicsParallelSolver.h:148:13: error: member ‘dgVector dgWorkGroupFloat::<unnamed union>::<unnamed struct>::m_low’ with constructor not allowed in anonymous aggregate
    dgVector m_low;
             ^~~~~
/home/dave/Documents/Programming/Newton2018/newton-dynamics-master/sdk/dgPhysics/dgWorldDynamicsParallelSolver.h:149:13: error: member ‘dgVector dgWorkGroupFloat::<unnamed union>::<unnamed struct>::m_high’ with constructor not allowed in anonymous aggregate
    dgVector m_high;


This union struct don't seen to work.
Code: Select all
   DG_INLINE dgFloat32 GetMax() const
   {
      return (m_low.GetMax(m_high)).GetMax();
   }

   union {
      dgFloat32 m_f[DG_WORK_GROUP_SIZE];
      dgInt32 m_i[DG_WORK_GROUP_SIZE];
      struct {
         dgVector m_low;
         dgVector m_high;
      };
   };
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby lperkins2 » Tue Sep 11, 2018 6:23 pm

So, I haven't run ubuntu in probably 9 years, but let's see what I can remember.

First thing that will probably help is making sure color mode is supported in your terminal and set up in bash. It'll help with navigating around and telling what's going on (I would expect it to be on by default, but if the terminal is monochrome, that'd be the first thing to fix).

You should be able to get cmake installed system wide, no need to build it from source.
Code: Select all
sudo apt-get install cmake

If you do, for some reason, need to build cmake from source, use dpkg to do it.
Code: Select all
sudo apt-get build-dep cmake
apt-get source cmake

Note no sudo on the second command. This will create a local copy of the cmake source (in a directory called cmake-<version>, currently cmake-3.7.2 ). You can then edit the cmake source code for whatever changes are needed, then
Code: Select all
cd cmake-3.7.2
dpkg-buildpackage

which will build a local copy of the .debs for cmake.

As I said, I would be surprised if that's needed, but that is the general procedure for custom building packages on debian/ubuntu systems.

Once you have cmake set up, you should be able to checkout newton from git:
Code: Select all
git clone https://github.com/MADEAPPS/newton-dynamics

Then make a cmake build folder in the source tree, and invoke cmake.
Code: Select all
cd newton-dynamics
mkdir build
cd build
cmake ..

Once you get cmake working properly (the above will fail noisily), you can then call
Code: Select all
make
to build the default targets.
lperkins2
 
Posts: 39
Joined: Fri Jul 03, 2015 4:16 am

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 6:58 pm

for cmake-3.12.2

Here I have download cmake-3.12.2 from the website.

I have do :
sudo apt-get update
sudo apt-get install build-essential
sudo apt install qt4-default
cd cmake-3.12.2/
./configure
make
sudo apt-get install checkinstall

Edited: with checkinstall you need to set a description about the deb.
Here I have stay jammed with this description process, I have close the process with ctrl c and I have execute the command again and it have work correctly.

sudo checkinstall
sudo make install

In the folder cmake-3.12.2/ you can find the install cmake_3.12.2-1_amd64.deb

for the gui in folder cmake-3.12.2/ again
./bootstrap --qt-gui
make
sudo make install

You can find the execute in /usr/local/bin/
cd /usr/local/bin/
./cmake-gui
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton in C++

Postby Julio Jerez » Tue Sep 11, 2018 7:56 pm

I think the problem is that GCC expect name structure to have a name

Code: Select all
struct  {
         dgVector m_low;
         dgVector m_high;
      };

to

Code: Select all
struct f {
         dgVector m_low;
         dgVector m_high;
      };


try to add any name and see if the error become something different and them I will change it tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton in C++

Postby Dave Gravel » Tue Sep 11, 2018 8:08 pm

With f I get more errors.

dgWorldDynamicsParallelSolver.h:147:10: error: ‘struct dgWorkGroupFloat::<unnamed union>::f’ invalid; an anonymous union can only have non-static data members [-fpermissive]
struct f {


I have try this:
https://www.youtube.com/watch?v=RzanIWes1gw


I get a other problem with plugin I think.

Edited:
I have success to compile the newton libs now.
It don't work with a name in the struct, I have try many different way and the only way I get it working is like I show in the video.

About the plugin I have just test quickly by bypass the plugin parts.
The plugin load and free need some modifications for linux, and dTimeTracker don't work because windows.h

Compiled:
Linking CXX static library libdMath.a
Linking CXX static library libdgCore.a
Linking CXX static library libdScene.a
Linking CXX static library libdContainers.a
Linking CXX static library libdCustomJoints.a
Linking CXX static library libdgPhysics.a
Linking CXX static library libnewton.a
Linking CXX static library libdNewton.a
Linking CXX static library libdVehicle.a
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron