Jump to content

Bullet compiling issues


Recommended Posts

...starting new thread on bullet compiling issues...

I downloaded sdk 2.74 and make , but dont know why there's no bulletmath.a lib file in bullet-2.74/lib dir,

so i replace bulletmath with LinearMath then failed.

i am using H10.0.300 on Ubuntu 9.04 with Bullet 2.74

When you compile bullet, it puts the all the binaries (in my case) in bullet-2.47/src/.libs (silly temporary storage place before installation).

You can let bullet install them for you (default: /usr/local/lib), or you can manually put them wherever your want (/usr/lib or whatever). Just remember, if you put them in a non-standard location, you'll have to add that path to your LD_LIBRARY_PATH variable or to your /etc/ld.so.conf (so that Houdini can find the dynamic libraries at runtime).

When bullet is properly installed, you shouldn't have any problems compiling the BulletSolver.

Link to comment
Share on other sites

  • 2 weeks later...

I compiled successfully but cant use this op in houdini!

every time it crashed.

Hi horizon,

Sorry I haven't gotten back to you yet (work got a bit busy). I'll only be able to have a look at this on Tuesday, but in the meantime, here are a few questions for debugging purposes:

1. Are there any error messages on the console when Houdini crashes? (If you aren't running houdini from a console, please do so, and dump the output here).

2. When does it crash? When you drop the BulletSolver node, when you connect something to the bullet node, or are there some other circumstances causing it to crash?

Describe the exact situation around the crash. The more information you give, the easier it will be to track down the problem.

CheerZ,

Van Aarde.

Link to comment
Share on other sites

Okay, I gave your binary a shot on my system at home (running gentoo) but it crashes houdini 10.0.295 when I try to open the sample scene file of the SIM Bullet Solver.

I have attached my BulletSolver binary (compiled against Houdini 10.0.295). You can give it a try, but I'm not guaranteeing anything (the Bullet libs are dynamically linked, so they will have to be in your library path).

I see that you have (intentionally?) statically compiled against the bullet library. What was the exact commands that you used to compile your BulletSolver?

SIM_SolverBullet.so.tar.gz

Link to comment
Share on other sites

thx for reply,I can not load your bin with H10 ,unlucky

I did compiling with following:

unpack sdk then follow by a pdf file,install automake, then run ./autogen.sh,

./configure and then make ,but no output binary, so I run jam.then compile the fixed package

provided by you.I both tried hcustom -g and -s

after that I open a example scene ,the op node display its parametres ok,but when

click playbar in H it craches .

then I tried another : cmake -G "Make files" then run make,still no output.

Link to comment
Share on other sites

thx for reply,I can not load your bin with H10 ,unlucky

I did compiling with following:

unpack sdk then follow by a pdf file,install automake, then run ./autogen.sh,

./configure and then make ,but no output binary, so I run jam.then compile the fixed package

provided by you.I both tried hcustom -g and -s

after that I open a example scene ,the op node display its parametres ok,but when

click playbar in H it craches .

then I tried another : cmake -G "Make files" then run make,still no output.

After you compiled the Bullet library, using make or jam, did you install the bullet lib as well? "make" does output binaries, but it is placed in a hidden directory. Run "sudo make install" or "sudo jam install" to have Bullet installed on your system.

When you used my build scripts, did it compile successfully, or did it spit out some error?

Link to comment
Share on other sites

ok, i lost make install command,what a dumb question.

this time compile successfully without any warning.

but still H can not load it.

I copied lib files from /usr/local/lib to /opt/hfs10.0.365/dsolib , though

H can load it but still jumped out.((sent by pid 1080200)Fatal error: Segmentation Fault

)

so I checked /etc/ld.so.conf, nothing weird :(

Link to comment
Share on other sites

ok, i lost make install command,what a dumb question.

this time compile successfully without any warning.

but still H can not load it.

I copied lib files from /usr/local/lib to /opt/hfs10.0.365/dsolib , though

H can load it but still jumped out.((sent by pid 1080200)Fatal error: Segmentation Fault

)

so I checked /etc/ld.so.conf, nothing weird :(

You shouldn't be moving your Bullet library files to the Houdini DSO directory. Leave the Bullet library files where they were installed (/usr/local/lib).

Let me take some time to explain how shared / static libraries work on linux:

If you compile a program and link it against *static* libraries, all the code of those static libraries are embedded inside your executable, which can cause it to become quite large. The advantage of doing things this way is that you don't have external dependencies.

If you compile a program and link it against *shared* libraries, then simply references are embedded inside your executable as opposed to the actual code of the shared library. When you run your program, the operating system tries to locate those libraries in certain predefined paths and if it can't then it fails (in the case of Houdini it seg faults).

Linux uses a dynamic linker (ld.so) to locate and load the shared libraries at run-time. There are a few ways of specifying load paths for the dynamic linker on linux. One way is to add your library path to the ld.so.conf configuration file.

On Ubuntu the convention is to create a file in the directory /etc/ld.so.conf.d that contains your directory with shared libraries. I created a file on my system (/etc/ld.so.conf.d/usr_local_lib.conf) containing the following:

/usr/local/lib

After you create a file like that, you have to update the dynamic linker's cache (/etc/ld.so.cache) by using the ldconfig tool. To update the cache, simply type the following on the console:

sudo ldconfig

That concludes a quick overview of how to work with shared/dynamic libraries on linux.

Now, back to Bullet.

So checklist:

1. Make sure you have successfully compiled and *installed* the Bullet library (default location: /usr/local/lib). Just to be certain, show me a listing of all the files in your /usr/local/lib please.

2. Add the /usr/local/lib directory as path for the dynamic linker (as described above) and update your dynamic linker cache.

3. Compile the BulletSolver using my script, and make sure that the solver was (automatically) installed to your ~/houdini10.0/dso directory.

To check that the BulletSolver was properly linked against the Bullet library, you can use the ldd tool (it prints shared library dependencies):

$cd ~/houdini10.0/dso
$ldd SIM_SolverBullet.so

That should give you listing similar to this:

libbulletmath.so.0 => /usr/local/lib/libbulletmath.so.0 (0x00002b0695b6c000)
libbulletdynamics.so.0 => /usr/local/lib/libbulletdynamics.so.0 (0x00002b0695d78000)
libbulletcollision.so.0 => /usr/local/lib/libbulletcollision.so.0 (0x00002b0695fcf000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00002b069628e000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00002b0696500000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00002b06966f3000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00002b06969fa000)
...etc.

Make sure you have the libbullet* names in that list otherwise something is wrong.

If you run Houdini now, it should work...If not, we'll have to debug further.

CheerZ,

Van Aarde.

Link to comment
Share on other sites

Van Aarde,

thx for your patience.

still jumped out.(sent by pid 1080200)Fatal error: Segmentation Fault

log:

root@ubuntu:~# ldd '/root/houdini10.0/dso/SIM_SolverBullet.so'

linux-vdso.so.1 => (0x00007fff8a1fe000)

libbulletmath.so.0 => /usr/local/lib/libbulletmath.so.0 (0x00007fc881bf7000)

libbulletdynamics.so.0 => /usr/local/lib/libbulletdynamics.so.0 (0x00007fc881996000)

libbulletcollision.so.0 => /usr/local/lib/libbulletcollision.so.0 (0x00007fc8816db000)

libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007fc881469000)

libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fc881277000)

libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fc880f6f000)

libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fc880d5d000)

libXi.so.6 => /usr/lib/libXi.so.6 (0x00007fc880b52000)

libdl.so.2 => /lib/libdl.so.2 (0x00007fc88094d000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fc880640000)

libm.so.6 => /lib/libm.so.6 (0x00007fc8803bb000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fc8801a2000)

libc.so.6 => /lib/libc.so.6 (0x00007fc87fe30000)

libnsl.so.1 => /lib/libnsl.so.1 (0x00007fc87fc16000)

libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x00007fc87e92b000)

libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0x00007fc87e829000)

libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fc87e60d000)

libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fc87e409000)

/lib64/ld-linux-x86-64.so.2 (0x00007fc882048000)

libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fc87e204000)

root@ubuntu:~# houdini

(sent by pid 1080200)atal error: Segmentation Fault

Saving application data to /tmp/root.3846.hip

Crash log saved to /tmp/crashlog_root

root@ubuntu:~# ldd '/root/houdini10.0/dso/SIM_SolverBullet.so'

linux-vdso.so.1 => (0x00007fffc07fe000)

libbulletmath.so.0 => /usr/local/lib/libbulletmath.so.0 (0x00007fd3b82ae000)

libbulletdynamics.so.0 => /usr/local/lib/libbulletdynamics.so.0 (0x00007fd3b804d000)

libbulletcollision.so.0 => /usr/local/lib/libbulletcollision.so.0 (0x00007fd3b7d92000)

libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007fd3b7b20000)

libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fd3b792e000)

libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fd3b7626000)

libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fd3b7414000)

libXi.so.6 => /usr/lib/libXi.so.6 (0x00007fd3b7209000)

libdl.so.2 => /lib/libdl.so.2 (0x00007fd3b7004000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fd3b6cf7000)

libm.so.6 => /lib/libm.so.6 (0x00007fd3b6a72000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fd3b6859000)

libc.so.6 => /lib/libc.so.6 (0x00007fd3b64e7000)

libnsl.so.1 => /lib/libnsl.so.1 (0x00007fd3b62cd000)

libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x00007fd3b4fe2000)

libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0x00007fd3b4ee0000)

libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fd3b4cc4000)

libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fd3b4ac0000)

/lib64/ld-linux-x86-64.so.2 (0x00007fd3b8700000)

libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fd3b48bb000)

root@ubuntu:~# houdini

(sent by pid 1080200)atal error: Segmentation Fault

Saving application data to /tmp/root.3994.hip

Crash log saved to /tmp/crashlog_root

post-3069-125008178415_thumb.jpg

SIM_SolverBullet.so.tar.gz

Edited by horizon1231
Link to comment
Share on other sites

Van Aarde,

thx for your patience.

still jumped out.(sent by pid 1080200)Fatal error: Segmentation Fault

log:

root@ubuntu:~# ldd '/root/houdini10.0/dso/SIM_SolverBullet.so'

linux-vdso.so.1 => (0x00007fff8a1fe000)

libbulletmath.so.0 => /usr/local/lib/libbulletmath.so.0 (0x00007fc881bf7000)

libbulletdynamics.so.0 => /usr/local/lib/libbulletdynamics.so.0 (0x00007fc881996000)

libbulletcollision.so.0 => /usr/local/lib/libbulletcollision.so.0 (0x00007fc8816db000)

libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007fc881469000)

libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fc881277000)

...[snip]...

root@ubuntu:~# houdini

(sent by pid 1080200)atal error: Segmentation Fault

Saving application data to /tmp/root.3994.hip

Crash log saved to /tmp/crashlog_root

Hmm. I see that you are logged in as "root". You should never ever ever conduct your daily business as root; it is very dangerous. Root should only be used when modifying system config files and installing applications...more or less (and even then, rather make use of the "sudo" command). Never run your applications as root. NEVER. I suggest looking at a couple of introductory linux tutorials (google is your friend) to learn more about using linux.

Nonetheless. The BulletSolver is linked properly, and it looks like the dynamic linker is finding the libraries. Did you try opening the sample bullet file? If your houdini crashes, please describe exactly what you are doing to cause the crash otherwise I can't help you debug the problem (have a look at this article on "How to report bugs effectively":http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).

CheerZ,

Van Aarde.

Edited by nanocell
Link to comment
Share on other sites

  • 1 month later...

I keep getting compiling errors on Suse11.1 x64

Making debug version

Install directory = '.'

Linking with 'libLibBulletDynamics'

Linking with 'libLibBulletCollision'

Linking with 'libLibLinearMath'

Making SIM_SolverBullet.o and ./SIM_SolverBullet.so from SIM_SolverBullet.cpp

In file included from SIM_SolverBullet.cpp:43:

SIM_SolverBullet.h:151: error: extra qualification ‘SIM_SolverBullet::’ on member ‘addBulletBody’

SIM_SolverBullet.h:152: error: extra qualification ‘SIM_SolverBullet::’ on member ‘removeDeadBodies’

SIM_SolverBullet.h:153: error: extra qualification ‘SIM_SolverBullet::’ on member ‘processSubData’

SIM_SolverBullet.cpp: In member function ‘virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)’:

SIM_SolverBullet.cpp:380: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&,btVector3*&, btScalar*&, int&)’

/home/nosferatu/bullet-2.75/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)

/home/nosferatu/bullet-2.75/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note: btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)

SIM_SolverBullet.cpp:397: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

SIM_SolverBullet.cpp:412: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

SIM_SolverBullet.cpp:413: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

Compile failed

im trying to compile it against houdini 10.0.403 x64

i downloaded bullet 2.75

ran make,make install and added /usr/local/lib to my /etc/ld.so.conf.d

but when i try and compile the .so i get all of those messages

i also sourced houdini_setup_bash so hcustom can be found.

can you tell me if im doing something wrong or if there are some conflicts or errors for h10 new builds with latest bullet version

thanks

Edited by nosferatu_037
Link to comment
Share on other sites

I keep getting compiling errors on Suse11.1 x64

Making debug version

Install directory = '.'

Linking with 'libLibBulletDynamics'

Linking with 'libLibBulletCollision'

Linking with 'libLibLinearMath'

Making SIM_SolverBullet.o and ./SIM_SolverBullet.so from SIM_SolverBullet.cpp

In file included from SIM_SolverBullet.cpp:43:

SIM_SolverBullet.h:151: error: extra qualification ‘SIM_SolverBullet::’ on member ‘addBulletBody’

SIM_SolverBullet.h:152: error: extra qualification ‘SIM_SolverBullet::’ on member ‘removeDeadBodies’

SIM_SolverBullet.h:153: error: extra qualification ‘SIM_SolverBullet::’ on member ‘processSubData’

SIM_SolverBullet.cpp: In member function ‘virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)’:

SIM_SolverBullet.cpp:380: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&,btVector3*&, btScalar*&, int&)’

/home/nosferatu/bullet-2.75/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)

/home/nosferatu/bullet-2.75/src/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note: btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)

SIM_SolverBullet.cpp:397: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

SIM_SolverBullet.cpp:412: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

SIM_SolverBullet.cpp:413: error: call of overloaded ‘abs(fpreal)’ is ambiguous

/usr/include/stdlib.h:699: note: candidates are: int abs(int)

/usr/include/c++/4.3/cstdlib:175: note: long long int __gnu_cxx::abs(long long int)

/usr/include/c++/4.3/cstdlib:144: note: long int std::abs(long int)

Compile failed

im trying to compile it against houdini 10.0.403 x64

i downloaded bullet 2.75

ran make,make install and added /usr/local/lib to my /etc/ld.so.conf.d

but when i try and compile the .so i get all of those messages

i also sourced houdini_setup_bash so hcustom can be found.

can you tell me if im doing something wrong or if there are some conflicts or errors for h10 new builds with latest bullet version

thanks

Did you use the the Bullet Solver build that I fixed for Linux (attached to this post: http://forums.odforce.net/index.php?/topic/8071-the-plan/page__view__findpost__p__61802)? Those error messages look suspiciously similar to the original 0.11 SIM_BulletSolver release.

Link to comment
Share on other sites

Did you use the the Bullet Solver build that I fixed for Linux (attached to this post: http://forums.odforc...dpost__p__61802)? Those error messages look suspiciously similar to the original 0.11 SIM_BulletSolver release.

Yep

I downloaded your modified version of SIM_BulletSolver,but still have compiling errors:

nosferatu@linux:~/Downloads/houdini/SIM_SolverBullet-0.11_vanaarde/src> ./compile_example.shMaking debug version

Linking with 'libbulletmath'

Linking with 'libbulletdynamics'

Linking with 'libbulletcollision'

Making SIM_SolverBullet.o and /home/nosferatu/houdini10.0/dso/SIM_SolverBullet.so from SIM_SolverBullet.cpp

SIM_SolverBullet.cpp: In member function ‘virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)’:

SIM_SolverBullet.cpp:380: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&,btVector3*&, btScalar*&, int&)’

/usr/local/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)

/usr/local/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note: btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)

Compile failed

nosferatu@linux:~/Downloads/houdini/SIM_SolverBullet-0.11_vanaarde/src>

Link to comment
Share on other sites

Yep

I downloaded your modified version of SIM_BulletSolver,but still have compiling errors:

nosferatu@linux:~/Downloads/houdini/SIM_SolverBullet-0.11_vanaarde/src> ./compile_example.shMaking debug version

Linking with 'libbulletmath'

Linking with 'libbulletdynamics'

Linking with 'libbulletcollision'

Making SIM_SolverBullet.o and /home/nosferatu/houdini10.0/dso/SIM_SolverBullet.so from SIM_SolverBullet.cpp

SIM_SolverBullet.cpp: In member function ‘virtual std::_Rb_tree_iterator<std::pair<const int, bulletBodystr> > SIM_SolverBullet::addBulletBody(SIM_Object*)’:

SIM_SolverBullet.cpp:380: error: no matching function for call to ‘btMultiSphereShape::btMultiSphereShape(btVector3&,btVector3*&, btScalar*&, int&)’

/usr/local/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h:33: note: candidates are: btMultiSphereShape::btMultiSphereShape(const btVector3*, const btScalar*, int)

/usr/local/include/bullet/BulletCollision/CollisionShapes/btMultiSphereShape.h:27: note: btMultiSphereShape::btMultiSphereShape(const btMultiSphereShape&)

Compile failed

nosferatu@linux:~/Downloads/houdini/SIM_SolverBullet-0.11_vanaarde/src>

Aah, I see that they change that specific function in Bullet 2.75. The Bullet Solver code was written for Bullet 2.74. I'll see if I can manage a fix. In the mean time, try using the previous bullet version.

Link to comment
Share on other sites

Yep

I downloaded your modified version of SIM_BulletSolver,but still have compiling errors...

Okey dokey. I fixed up the Bullet Solver for use with the Bullet Library v2.75 (tested with Houdini 10.0.401 on Linux) and the sample hip file still seems to sim properly so hopefully nothing broke too badly.

Cheerz,

Van Aarde.

SIM_SolverBullet-0.11_vanaarde.tar.gz

Link to comment
Share on other sites

Great, thanks for your time, nanocell!

Sure, no problem :) Could you maybe put this bullet project either on sourceforge or Google Code so that we have a centralized location for the code and build scripts?

@CeeGee: I'll try to statically link the Bullet library into the BulletSolver so that it doesn't have to be separately installed. I'll post here if I have managed to get that working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...