On 8/10/07, Orhun Birsoy <[EMAIL PROTECTED]> wrote: > > No I disagree, if you are setting OSG paths explictly its because you > > have something specific in mind - these should come before the OS > > directories otherwise you'd never be able to have a localised OSG > > install. > > > > But depending on LD_LIBRARY_PATH to do that is not the way to do it. > This article http://xahlee.org/UnixResource_dir/_/ldpath.html > describes pretty much my view.
I think you're heading off on a bit too much of one variable war path. The OSG doesn't just depend upon LD_LIBRARY_PATH, oggDB::Registry sets up platform specific paths which include LD_LIBRARY_PATH, these are the defaults. The application developer can himself set the library paths afterwards if they don't feel the defaults are appropriate via the osgDB::setLibraryFilePathList. OSG users aren't forced to use any particular set of paths, everything is under their control. > But that's not the problem. The problem is line 114-115 in > DynamicLibrary.cpp. For 'other unix' the operating system never gets > the chance to search for the shared lib by itself. It is either > whatever OSG does (ie in osgDB::findLibraryFile), or "./". It is > wrong. Now this is a totally different issue to the OSG's own library path checking, the library path checking is OK and I believe totally correct thing to do prior to letter the OS try and find the file. While the OSG does provide best guess defaults, the user can set this up entirely themselves, including removing all the defaults. The addition of './' is also correct for finding the library in the current directory, but... and I think this is where problems are introduced - only './' is checked, the library name itself isn't checked. Possibly what should be done is to remove the addition of './' and instead push the responsibility for checking this into the default LibraryFilePathList, and let the fallback to letting the OS file the library work on its own - as is done under Windows right now. As what you be the default lists of paths to add via appendPlatformSpecificLibraryFilePaths then this is something we can debate. What exists there right now is a product of various contributions for developers working on each of these platform - they aren't things just randomly chosen. Robert. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org