Re: libpfdu.so depends on libvl.so

New Message Reply Date view Thread view Subject view Author view

From: Bram Stolk (bram++at++sara.nl)
Date: 11/14/2000 01:49:58


Tom,

Thanks a lot for your help.

Also, sorry for the confusing subject line.
It should have been: libpfdu.so depends on libimage.a

Tom Flynn wrote:

> It sounds like you have at least two options:
>
> 1) use -all before -limage on your link line
> This should include all the symbols in the image library.
>
> 2) use -u iopen before -limage on your link line
> This will force iopen to be unresolved and thus force the image
> library to be linked-in in order to resolve that symbol.
>
> hope that helps,

Well, you would expect it to work, but sadly, it does not.

This is the sequence of events:

-1- I start the pyton interpreter

-2- I dynamically load 'libpypercmodule.so' which is linked like this:

bram++at++bedrock> ldd ../../lib/pyper/libpypercmodule.so
        libswigpy.so.1 => /home/sara/bram/lib/libswigpy.so.1
        libdb.so => /usr/lib32/libdb.so
        libpfdu_ogl.so => /usr/lib32/libpfdu_ogl.so
        libpfutil_ogl.so => /usr/lib32/libpfutil_ogl.so
        libpf_ogl.so => /usr/lib32/libpf_ogl.so
        libvl.so => /usr/lib32/libvl.so
        libGLU.so => /usr/lib32/libGLU.so
        libGL.so => /usr/lib32/libGL.so
        libGLcore.so => /usr/lib32/libGLcore.so
        libXi.so => /usr/lib32/libXi.so
        libXt.so => /usr/lib32/libXt.so
        libX11.so.1 => /usr/lib32/libX11.so.1
        libm.so => /usr/lib32/libm.so
        libc.so.1 => /lib32/libc.so.1
        libXsgivc.so => /usr/lib32/libXsgivc.so
        libXext.so => /usr/lib32/libXext.so
        libC.so.2 => /usr/lib32/libC.so.2
        libCsup.so => /usr/lib32/libCsup.so
        libXmu.so => /usr/lib32/libXmu.so
        libdmedia.so => /usr/lib32/libdmedia.so
        libgen.so => /usr/lib32/libgen.so delay-load
        libmutex.so => /usr/lib32/libmutex.so

Now, when python loads this module, it is unable to resolve iopen:
ImportError: 936729:python2.0: rld: Fatal Error: unresolvable symbol in /usr/lib32/libpfdu_ogl.so: iopen

But, the strange thing is: the iopen symbol *is* defined in libpypercmodule.so, as can
be seen with 'nm -gC libpypercmodule.so' which gives me:

Symbols from ../../lib/pyper/libpypercmodule.so:

[Index] Value Size Type Bind Other Shndx Name

[33] | 0| 0|SECT |GLOB |PROTECTED|MIPS_TEXT|__dso_displacement
[34] | 928| 0|OBJT |WEAK |HIDDEN |ABS |__elf_size__MIPS_eh_region_supp
[35] | 1160| 0|OBJT |WEAK |HIDDEN |ABS |__elf_size__MIPS_eh_region
[36] |1609957376| 0|SECT |GLOB |PROTECTED|MIPS_TEXT|__elf_header
[37] |1609957428| 0|SECT |GLOB |PROTECTED|MIPS_TEXT|__program_header_table
[38] |1610328976| 376|FUNC |GLOB |DEFAULT |MIPS_TEXT|initlibpyperc
[39] |1610389500| 988|FUNC |GLOB |HIDDEN |MIPS_TEXT|getrow
[40] |1610395108| 84|FUNC |GLOB |HIDDEN |MIPS_TEXT|iopen

(see the last line: iopen is defined as MIPS_TEXT).

By the way, I used your '-u iopen' advice, and linked as:

ld -demangle -woff 131 -n32 -shared libpyper_wrap.o -L/home/sara/bram/lib -lswigpy -ldb -lpfdu -lpfutil -lpf -lvl -u iopen -limage -lGLU -lGL -lGLcore -lXi -lSM -lICE -lX11 -lm -lc -soname libpypercmodule.so.1 `test -n "sgi1.0" && echo -set_version sgi1.0` -update_registry .libs/so_locations -o .libs/libpypercmodule.so.1.0

I have not tried '-all' instead of '-u iopen', but I can't imagine that -all
would work any better: the symbol is clearly present (and defined) in my
libpypercmodule.so

The situation remains the same: I can only make it work by making my
own shared version of libimage, and link against it.

    Bram

> --
> "Mongooses are famous for their snake-fighting ability, and are
> almost always victorious because of their speed, agility, and timing
> and also because of their thick coat."

-- 
------------------------------------------------------------------------------
 Bram Stolk, VR Specialist.
 SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP  AMSTERDAM
 email: bram++at++sara.nl   Phone +31-20-5923059  Fax +31-20-6683167

"I heard if you play the NT-4.0-CD backwards, you get a satanic message." "Thats nothing, if you play it forward, it installs NT-4.0" ------------------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Nov 14 2000 - 01:50:09 PST

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