This is also committed on 2.8 branch, r12422.
-Paul
On 5/20/2011 12:52 PM, Ryan Pavlik wrote:
On Wed, May 18, 2011 at 1:00 PM, Alberto Luaces <[email protected]
<mailto:[email protected]>> wrote:
Ryan Pavlik writes:
> On Wed, May 18, 2011 at 7:03 AM, Alberto Luaces <[email protected]
<mailto:[email protected]>> wrote:
>
> Hi,
>
> Ryan Pavlik writes:
>
> >> fix-linux-link-libdl: I got an unresolved symbol error when linking
> >>> osgviewer to
> >>> the osg and osgViewer libraries pointing to symbols from libdl (using
> >>> Ubuntu
> >>> 10.04). This explicitly links with libdl when "linux" is in the
target
> >>> system
> >>> name, fixing the build error on my machine.
> >>>
> >>
> >> Interesting. How long has this issue been present? 2.8.4? 2.8.3?
2.8.2?
> >>
> >
> > Not sure - I have a 2.8.3 PPA (Ubuntu .deb package builder) that works
fine,
> > so I presume sometime after that point. I'm never quite sure when I
need to
> > link libdl, but unresolved symbol errors are a pretty easy way to
tell. :)
>
> Actually it was happily taken into account since 2010 (see
> r11055). However, it seems that r12208 introduced a regression that
> kicked out libdl from the linker command for libosg. Just linking
with
> -ldl all the libraries from the OSG is not a clean solution, since
if I
> recall correctly, only libosg needs to load shared objects at
runtime --
> the plugins.
>
> I'm going to see if I can get something by playing with those
> TARGET_*_LIBRARIES variables.
>
> --
> Alberto
>
> Great, thanks for looking in to this further. I have one more small
improvement for osgconv in the pipeline that I'm hoping to get in in time
for 2.8.5, so I'm happy to hear there's other
> work to be done.
>
> Ryan
Hi Ryan,
I spoke too soon. I have checked that there is not a regression in
trunk. libdl is added to the linker command as needed, that is, only for
libosg and libosgDB. The problem with 2.8.4-rc2 is that is a branch
which predates the revision where the change was added. Therefore the
trivial solution is to backport the changes in r11055 to the branch in
order to benefit from it. I also remember that someone added a slight
modification over this patch in order to fix the build in FreeBSD. I
will post the revision number if I find it.
I found the other commit you refer to using the git pickaxe and have backported
both of those patches to the latest 2.8 branch head. I've attached the full
version of these files touched by these backports - please use these instead of
my earlier submitted patch for this issue.
These are the two commit messages:
From Jim Brooks, fix for FreeBSD build where FIND_LIBRARY(DL_LIBRARY..)
return NOT_FOUND.
and
From Alberto Luaces, "he new GNU linker, "gold", is going to replace soon
the current ld in
almost all Linux distributions. Although it is 100% compatible with ld,
by default it gives an error if a library has unresolved symbols at link
time, that is, it has set -Wl,--no-undefined by default. Debian folks
have found that libosg.so and libosgDB.so use some functions belonging
to libdl.so {dlsym,dlopen,dlclose,dlerror} without linking to it.
My changes link those two libraries to libdl.so explicitly in the same
way it is already done for libm.so and librt.so."
--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University
[email protected] <mailto:[email protected]>
http://academic.cleardefinition.com
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org