[osg-users] osgconv does not work anymore

112 views
Skip to first unread message

Martin Haffner

unread,
May 18, 2011, 3:53:41 AM5/18/11
to osg-...@lists.openscenegraph.org
Hi,

I used osgconv and osgviewer for a long time, but suddenly it stopped working. This is the output when I try to use osgconv:

> osgconv part0001_002.flt foo.osrg
> Warning: dynamic library '/usr/local/lib/osgPlugins-2.9.5/osgdb_openflight.so' exists, but an error occurred while trying to open it:
> /usr/local/lib/osgPlugins-2.9.5/osgdb_openflight.so: wrong ELF class: ELFCLASS32
> Warning: Could not find plugin to read objects from file "part0001_002.flt".
> Error no data loaded.
>


I have a 64 Bit machine and osgconv is a 64 Executable. I guess the problem is that he tries to load the 32 Bit shared object osgdb_openflight.so. But I don't understand that he tries to load this 32 Bit .so, because my 64 bit lib folder comes first in LD_LIBRARY_PATH:

> echo $LD_LIBRARY_PATH
> /usr/local/lib64/osgPlugins-2.9.5/:/usr/local/lib/:/usr/local/lib64/:/usr/local/lib/osgPlugins-2.9.5/
>

Shouldn't he first search in /usr/local/lib64/osgPlugins-2.9.5? Anyone knows how I can fix this?

Cheers,
Martin

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

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

Robert Osfield

unread,
May 18, 2011, 3:57:10 AM5/18/11
to osg-...@lists.openscenegraph.org
Hi Martin,

I'd suggest just uninstalling the 32bit version of the OSG.

Robert.

Martin Haffner

unread,
May 18, 2011, 4:12:32 AM5/18/11
to osg-...@lists.openscenegraph.org
Hi Robert,

Thanks for your fast reply! Yes, I guess that would solve the problem. Unfortunately I need the 32 Bit Version of OSG, because I have a program that needs to be compiled into a 32 Bit Executable (because it depends on some libs that are only available in 32 Bit). I compile this program like this:
g++ -m32 -o foo sources.c -losg ...
Thats why I also have OSG in 32 Bit. The compilation and linkin also seems to work (foo works fine), but unfortunately now all the osg tools like osgconv don't work anylonger. Isn't there a way to let the OSG 32 bit and 64 bit binaries co-exist and just tell the 32 Bit OSG tools to use the 64 Bit OSG .so (which I have!)

Thank you!

Cheers,
Martin

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=39494#39494

Sergey Polischuk

unread,
May 18, 2011, 4:48:05 AM5/18/11
to osg-...@lists.openscenegraph.org
Hi, Martin

You can use two profiles with different sets of env variables, one for 32bit and another for 64bit, so you would not have both lib dirs in LD_LIBRARY_PATH.

Cheers, Sergey.

18.05.2011, 12:12, "Martin Haffner" <str...@gmx.net>:

Ulrich Hertlein

unread,
May 18, 2011, 10:15:28 PM5/18/11
to osg-...@lists.openscenegraph.org
Hi Martin,

On 18/05/11 17:53 , Martin Haffner wrote:
> I used osgconv and osgviewer for a long time, but suddenly it stopped working. This is
> the output when I try to use osgconv:
>
>> osgconv part0001_002.flt foo.osrg Warning: dynamic library
>> '/usr/local/lib/osgPlugins-2.9.5/osgdb_openflight.so' exists, but an error occurred
>> while trying to open it: /usr/local/lib/osgPlugins-2.9.5/osgdb_openflight.so: wrong
>> ELF class: ELFCLASS32 Warning: Could not find plugin to read objects from file
>> "part0001_002.flt". Error no data loaded.
>
> I have a 64 Bit machine and osgconv is a 64 Executable. I guess the problem is that he
> tries to load the 32 Bit shared object osgdb_openflight.so. But I don't understand that
> he tries to load this 32 Bit .so, because my 64 bit lib folder comes first in
> LD_LIBRARY_PATH:
>
>> echo $LD_LIBRARY_PATH /usr/local/lib64/osgPlugins-2.9.5/:/usr/local/lib/:/usr/local/lib64/:/usr/local/lib/osgPlugins-2.9.5/
>
> Shouldn't he first search in /usr/local/lib64/osgPlugins-2.9.5? Anyone knows how I can fix this?

No, OSG searches for "osgPlugins-<version>/plugin". Since you have "/usr/local/lib"
before "/usr/local/lib64" in your LD_LIBRARY_PATH it picks up that version first.

Remove any version specific entries from the LD_L_P (they're won't work anyway), put lib64
before lib and you should be fine.

/ulrich

Reply all
Reply to author
Forward
0 new messages