robertosfield wrote:
> 
> I believe few users have as many problems with getting models to load
> under unix as you have...  I suspect you are trying to make things
> more complicated than they really should be, seemingly trying you best
> to break the OSG, rather than just let it gone with what it's designed
> to do.
> 


Well that came across a little harsh. I have no doubt that my troubles stem 
from me doing something incorrectly due to my ignorance (extremely little 
experience with OSG). So we both agree the problem is my fault, hopefully 
together we can find the cause?

I didn't think my setup was overly complicated and I thought I was staying out 
of OSG's way. These are the steps I went through to get where I am now...

1.) Downloaded the OSG 2.8.3 source code.
2.) Used the CMake GUI to generate a make file for OSG.
3.) Ran "make" to build the OSG libraries and executables.
4.) Copied the OSG libraries, headers, and executables into a pretty standard 
ThirdParty directory in my project (that directory's structure was described in 
my first post).
5.) In my projects CMake I specify where that OSG ThirdParty directory is and I 
specify that my project depends on OSG (the CMake statements that do this were 
also in my first post).
6.) Used CMake to generate a make file for my project.
7.) Built my project without error using "make".
8.) Ran my application and OSG said it couldn't find the FLT plugin.
9.) Tried adding OSG's lib directory to LD_LIBRARY_PATH but that just caused my 
application to crash.

I view those steps as being pretty standard and simplistic but clearly I'm 
doing something wrong. hopefully something sticks out as being obviously 
incorrect.


robertosfield wrote:
> 
> We can only guess what this might be as you explanation of
> what you have done doesn't provide enough useful information.
> 


I tried my best to explain everything I thought was relevant. Perhaps I am 
omitting something because I don't believe it to be useful. If you could tell 
me what type of information would make it easier for you to figure out where 
I'm going wrong then I'd be more than happy to give you that information. I'm 
more than happy to go into extreme detail...I'd even provide you with a 
simplified version of my codebase if that would help.


robertosfield wrote:
> 
> If Paul is correct and you are getting a crash because you've linked
> your application to OSG-2.8.3 and then at runtime forcing the loading
> of the osgPlugins-2.9.9/osdb_openflight.so
> 


I was very hopeful that was the case but it just doesn't seem to be. I just 
built my application against OSG 2.9.9 and my LD_LIBRARY_PATH pointed to OSG 
2.9.9's lib directory and I still crash. It appears as though this is not the 
cause of my problem.


robertosfield wrote:
> 
> All you should have to do is set the LD_LIBRARY_PATH to path to the
> libraries, and let the OSG at runtime append the osgPlugins-version so
> that it can find the appropriate plugin.
> 


That is what I think I'm doing. I'm setting LD_LIBRARY_PATH to point to 
/work/MyApplication/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.9.9/lib/

Of course inside OpenSceneGraph-2.9.9/lib there is an "osgPlugins-2.9.9" 
directory which contains the OpenFlight plugin. I can only assume that OSG is 
looking in that directory.


robertosfield wrote:
> 
> Now if you aren't finding
> the plugins if you use this approach then it suggests that you have
> placed the osgPlugins-version directory into the library directory as
> it should be.
> 


OSG only says it can't find the plugin when I do NOT set LD_LIBRARY_PATH. When 
I do set LD_LIBRARY_PATH my application simply crashes, OSG doesn't tell me if 
it found the plugin or not. Again my osgPlugins directory is in 
/work/MyApplication/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.9.9/lib/osgPlugins-2.9.9
 and I'm setting LD_LIBRARY_PATH to be 
/work/MyApplication/ThirdParty/Linux.x86_64.gcc/OpenSceneGraph-2.9.9/lib


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, perhaps you've bypassed this completely and are copying
> stuff around by hand and screwing things up.  As I said we can only
> guess.
> 


It is my understanding that "make install" copies the OSG files from the build 
into system level directories (perhaps it can be configured to copy those files 
anywhere). I have not run "make install", only "make".

I'm hoping to keep OSG on a level that is local to my project (as opposed to a 
system level). I'd like to take my project's source code and third party 
dependencies and check them into SVN. Then a developer can checkout that 
repository to a local directory and build it without having to make any system 
level changes...everything is kept local to that checkout folder.

I have to assume that OSG can function if it isn't placed wherever "make 
install" places it but since I'm "copying stuff around by hand" I'll run "make 
install" and try to make sure that I'm mimicking what "make install" does but 
on a local level.

Again thanks for everybody's help, I really appreciate it.[/list]

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to