Re: Strange error

New Message Reply Date view Thread view Subject view Author view

Ed Millard (millard++at++hawkeye.newport.sgi.com)
Wed, 7 Sep 1994 17:04:23 -0800 (PDT)


>
> Hi all!
>
> I tried to compile and run the sample program intersect.c in the Performer
> samples under .../pguide/libpf/progs and I got it to compile fine, but when
> I tried to run it (executable name is "Int") I got a strange error that I saw
> one other time...when I was trying to figure out viewpoint collision detection
> without using the pfuCollide functions. Here's the error:
>
> 28076:Int: rld: Error: unresolvable symbol in /usr/lib/libpf.so __pure_virtual
> _called
> 28076:Int: rld: Fatal Error: this executable has unresolvable symbols

The performer group might be able to answer why libpf.so needs this. There
must be some C++ in the code your using. This symbols is defined in
/usr/lib/libC.so which is the C++ Dynamic Shared Object. Try linking
with:

         -lC

I've attached below a handy tool I keep around to find symbols like this.
I keep it in:

        /usr/local/bin/symsall

To find this symbol I did:

        symsall /usr/lib/*.so | grep __pure_virtual_called

and it says:

/usr/lib/libC.so: 0fbd6660 T __pure_virtual_called
/usr/lib/libInventor.so: 00000000 U __pure_virtual_called
/usr/lib/libInventorXt.so: 00000000 U __pure_virtual_called
/usr/lib/libSgt.so: 00000000 U __pure_virtual_called
/usr/lib/libdesktopGallery.so: 00000000 U __pure_virtual_called
/usr/lib/libdesktopIcon.so: 00000000 U __pure_virtual_called
/usr/lib/libdesktopIcon.so: 00000000 U __pure_virtual_called
/usr/lib/libdtlxm.so: 00000000 U __pure_virtual_called
/usr/lib/libil.so: 00000000 U __pure_virtual_called
/usr/lib/libpf.so: 00000000 U __pure_virtual_called
/usr/lib/libshowcase3d.so: 00000000 U __pure_virtual_called
/usr/lib/libshowcaseext.so: 00000000 U __pure_virtual_called
/usr/lib/libshowcaseui.so: 00000000 U __pure_virtual_called
/usr/lib/libvk.so: 00000000 U __pure_virtual_called

The entry with the 'T' is the library where this missing symbol lives.
The entries with 'U' are undefined references of this symbol in DSO's
which use it.

===========================symsall=========================================
#!/bin/sh

libdir=/usr/lib
field=T
cmd=`basename $0`

usage() {
    echo "usage: $cmd file1 file2 ..."
    exit 1
}

if [ $# = 0 ]; then
    usage
fi

if [ "$cmd" = "undef" ]; then
    field=U
fi

for i in $*; do
    if [ -f "$i" ]; then
        file=$i
    elif [ -f $libdir/lib$i.so ]; then
        file=$libdir/lib$i.so
    elif [ -f $libdir/lib$i.a ]; then
        file=$libdir/lib$i.a
    else
        echo "$i not found"
        file=""
    fi

    if [ -n "$file" ]; then
        nm -Bo $file \
| nawk -v field=$field '{ print $0 }'\
| sort
    fi
done


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:32 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.