|Anonymous | Login | Signup for a new account||2020-01-19 03:09 PST|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006545||opensim||[REGION] Physics Engines||public||2013-02-15 16:27||2014-06-30 02:30|
|Assigned To||Robert Adams|
|Product Version||master (dev code)|
|Target Version||Fixed in Version|
|Summary||0006545: BULLETSIM: ldd reports libBulletSim.so as not a dynamic executable|
|Description||OpenSim will not start with bulletsim enabled:|
22:39:44 - [BULLETS SCENE]: Selected bullet engine bulletunmanaged -> BulletUnmanaged/
22:39:44 - [APPLICATION]:
APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs
Exception: System.DllNotFoundException: lib64/libBulletSim.so
at (wrapper managed-to-native) OpenSim.Region.Physics.BulletSPlugin.BSAPIUnman/BSAPICPP:Initialize2 (OpenMetaverse.Vector3,intptr,int,intptr,int,intptr,OpenSim.Region.Physics.BulletSPlugin.BSAPIUnman/BSAPICPP/DebugLogCallback)
On further investigation both lib32/libBulletSim.so and lib64/libBulletSim.so are reported as 'not a dynamic executable' by ldd.
I've tested this on two servers, both running centos 5 x86_64 with mono 2.10.2, one is an openvz VM the other a VMware VM, and get the same result. Other .so files work ok with ldd and ODE physics works fine.
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Grid (Multiple Regions per Sim)|
|Environment||Mono / Linux64|
ldd libBulletSim.so works on RHEL/Centos 6, producing the output
linux-vdso.so.1 => (0x00007fff44dff000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f943dbee000)
libm.so.6 => /lib64/libm.so.6 (0x00007f943d96a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f943d753000)
libc.so.6 => /lib64/libc.so.6 (0x00007f943d3d4000)
so I got to wondering if there were differences in the way shared objects can be optimised by the compiler depending on the platform and whether this might have compatibility issues. My search turned up this from the LDP: http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html [^]
"Use -fPIC or -fpic to generate code. Whether to use -fPIC or -fpic to generate code is target-dependent. The -fPIC choice always works, but may produce larger code than -fpic (mnenomic to remember this is that PIC is in a larger case, so it may produce larger amounts of code). Using -fpic option usually generates smaller and faster code, but will have platform-dependent limitations, such as the number of globally visible symbols or the size of the code. The linker will tell you whether it fits when you create the shared library. When in doubt, I choose -fPIC, because it always works."
I don't know which flag was given to gcc when compiling libBulletSim.so, and I know this is probably a long shot, but it might possibly be the problem?
Robert Adams (administrator)
|Sadly, BulletSim is already being built with "-fPIC". I will have to keep looking.|
What version of gcc is used to compile it and on what platform?
Is Bulletsim available as source so I can try compiling it with the gcc from RHEL5?
Robert Adams (administrator)
BulletSim sources are in the OpenSimulator 'libs' repository:
"git clone git://opensimulator.org/git/opensim-libs". [^] In the subdirectory "trunk/unmanaged/BulletSim" you will find a BUILD.TXT with the instructions for building Bullet itself and then building and linking BulletSim.
|Ok, have compiled on Centos 5 and the libBulletSim.so works just fine! If you could tell me what distro and tool-chain version you used to compile, then I could set up a VM like that and experiment with the build flags to see if I can make the build process compatible with Cenos/RHEL5. Its still a popular distro on VPS's ;-)|
Jak Daniels (reporter)
bin/lib64/libBulletSim.so is compiled/linked with a newer gcc and the shared object library has a platform type set in its header which makes centos 5 not able to recognise it as a valid shared object.
in your opensim directory try typing:
to see if it is recognised as a valid shared object library
for me on centos 5 it returns: not a dynamic executable
there is a very hacky fix you can do which is to change a byte in the header of the .so file so that the platform type is one that is recognised by centos 5 ldd
cp ./bin/lib64/libBulletSim.so ./bin/lib64/libBulletSim.so.old
printf "\x00" | dd of=libBulletSim.so.1 bs=1 seek=7 count=1 conv=notrunc
then ldd should recognise the shared library!
|2013-02-15 16:27||jak.daniels||New Issue|
|2013-02-16 11:17||jak.daniels||Note Added: 0023576|
|2013-02-16 11:24||nebadon||Assigned To||=> Robert Adams|
|2013-02-16 11:24||nebadon||Status||new => assigned|
|2013-02-17 11:14||Robert Adams||Note Added: 0023578|
|2013-03-01 12:31||jak.daniels||Note Added: 0023616|
|2013-03-01 15:12||Robert Adams||Note Added: 0023617|
|2013-03-07 12:27||jak.daniels||Note Added: 0023645|
|2014-06-30 02:30||Jak Daniels||Note Added: 0026414|
|Copyright © 2000 - 2012 MantisBT Group|