Mailing List Archive

SWIG'in python question
I've got a .so that I built with swig for python. Everything builds fine
but when I import i get this message from python "_mymod.so: undefined
symbol: __eh_pc". I wondered if anyone had seen this before and could
give me a clue. I think I'm missing a library somewhere. I'm building on
RedHat 5.2.

thanks
jb
SWIG'in python question [ In reply to ]
JB:
|I've got a .so that I built with swig for python. Everything builds fine
|but when I import i get this message from python "_mymod.so: undefined
|symbol: __eh_pc". I wondered if anyone had seen this before and could
|give me a clue. I think I'm missing a library somewhere. I'm building on
|RedHat 5.2.

Does your code in _mymod.so depend on any user code another .o/.so?

I'll assume not. That being the case, it's probably a symbol defined in
some system library. Use "nm" to find out which one, then add a "-l"
reference to it on the link line (the command line where you create
_mymod.so).

Check your man page for nm for the right options to print the filename and
the symbol on one line. For example:

(FreeBSD:) nm -o /usr/lib/*.so* | grep <mysymbol>
(IRIX:) nm -Bo /usr/lib/*.so* | grep <mysymbol>
(Solaris:) nm -Rh /usr/lib/*.so* | grep <mysymbol>

Randall
SWIG'in python question [ In reply to ]
Randall Hopper wrote:
>
> JB:
> |I've got a .so that I built with swig for python. Everything builds fine
> |but when I import i get this message from python "_mymod.so: undefined
> |symbol: __eh_pc". I wondered if anyone had seen this before and could
> |give me a clue. I think I'm missing a library somewhere. I'm building on
> |RedHat 5.2.
>
> Does your code in _mymod.so depend on any user code another .o/.so?
>
> I'll assume not. That being the case, it's probably a symbol defined in
> some system library. Use "nm" to find out which one, then add a "-l"
> reference to it on the link line (the command line where you create
> _mymod.so).
>
> Check your man page for nm for the right options to print the filename and
> the symbol on one line. For example:
>
> (FreeBSD:) nm -o /usr/lib/*.so* | grep <mysymbol>
> (IRIX:) nm -Bo /usr/lib/*.so* | grep <mysymbol>
> (Solaris:) nm -Rh /usr/lib/*.so* | grep <mysymbol>
>
> Randall

It turned out to be in libstdc++. I didn't know about nm tho. Thanks for
that tip.

cheers
jim
SWIG'in python question [ In reply to ]
JB <jimbag@kw.igs.net> writes:

> I've got a .so that I built with swig for python. Everything builds fine
> but when I import i get this message from python "_mymod.so: undefined
> symbol: __eh_pc". I wondered if anyone had seen this before and could
> give me a clue. I think I'm missing a library somewhere. I'm building on
> RedHat 5.2.

Noone else has replied to this yet have they?

Don't know, but the name __eh_pc suggests exception handling. Not
compiling C as C++ or anything like that are you?

HTH
Michael

> thanks
> jb