robertosfield wrote:
> Now the OSG does have a proper install script and if
> you use it will place all the libraries and plugins in all the correct
> directories


I still haven't solved this problem but I am perhaps a step closer so in the 
interest of keeping this thread up to date I'll fill you in.

I've switched back to OSG 2.8.3 and as robertosfield suggested I used the 
"install script" to have OSG automatically put the headers/binaries into the 
directory my application expects them to be (instead of doing this by hand). 
Perhaps there are countless differences between what I was doing by hand and 
what the install script did but the biggest difference I noticed was that the 
script created a "lib64" folder instead of the "lib" directory that I was 
creating by hand.

After running the install script I rebuilt my application. I began by running 
my application without setting LD_LIBRARY_PATH. Surprisingly this results in a 
segmentation fault (previously OSG would just say it couldn't find the plugin) 
and the output that is generated seems to indicate that OSG was at least able 
to find the OpenFlight plugin...


Code:

itr='/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64/osgPlugins-2.8.3'
FindFileInPath() : trying 
/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64/osgPlugins-2.8.3/osgPlugins-2.8.3/osgdb_openflight.so
 ...
itr='/usr/lib/'
FindFileInPath() : trying /usr/lib/osgPlugins-2.8.3/osgdb_openflight.so ...
itr='/usr/lib64/'
FindFileInPath() : trying /usr/lib64/osgPlugins-2.8.3/osgdb_openflight.so ...
itr='/usr/local/lib/'
FindFileInPath() : trying /usr/local/lib/osgPlugins-2.8.3/osgdb_openflight.so 
...
itr='/usr/local/lib64/'
FindFileInPath() : trying /usr/local/lib64/osgPlugins-2.8.3/osgdb_openflight.so 
...
itr='/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64/osgPlugins-2.8.3'
FindFileInPath() : trying 
/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64/osgPlugins-2.8.3/osgdb_openflight.so
 ...
FindFileInPath() : USING 
/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64/osgPlugins-2.8.3/osgdb_openflight.so
Segmentation fault




Given that OSG was able to find the plugin without me having to set 
LD_LIBRARY_PATH, I fully expected the same behavior if I did set 
LD_LIBRARY_PATH. So just to be thorough I set LD_LIBRARY_PATH to be 
/work/MyProject/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.8.3/lib64 and when 
I ran my application I got the exact same behavior as I did when 
LD_LIBRARY_PATH wasn't set.

So now it appears as though I do not have to set LD_LIBRARY_PATH but I still 
have to figure out why OSG crashes once it says it is using the plugin. Of 
course it is completely possible that the cause of this crash is my application 
and not OSG...I will have to verify that next.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38034#38034





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to