symbol not found involving dynlink/dlopen/embedding Python

  • Thread starter Christopher Armstrong
  • Start date
C

Christopher Armstrong

With the following situation, Numarray can't find Python's symbols.

problematic-Python::
Main dlopens Two
Two dynlinks Python
Python dlopens Numarray
Numarray dynlinks Python

I have another pure-C example that tries to mirror this, with::

minimal-C::
Main dlopen Two
Two dynlink Middle
Middle dlopen Three
Three dynlink Middle

and it works fine.

AFAICT, I'm using the same dlopen flags that Python is.

The minimal reproduction code is very small, but broken into several
files (to emulate the different parts). It's browsable at
http://twistedmatrix.com/users/radix/dynlink-problem , and
downloadable at
http://twistedmatrix.com/users/radix/dynlink-problem/dynlink-problem.tar.gz

After doing some googling, I've found several people that look like
they have similar problems. I even found one workaround involving
LD_PRELOAD. if you LD_PRELOAD=python2.3.so ./main, then the symbols
are found.

Does anyone have any idea on how I can solve this? I'd like to not
hack CPython, and not have tie the build to a single machine.



--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | -- http://radix.twistedmatrix.com
| Release Manager, Twisted Project
\\\V/// | -- http://twistedmatrix.com
|o O| | Founding Member, Hobart Hacking Society
w----v----w-+ -- http://hackingsociety.org/chapters/hash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top