[issue4434] Embedding into a shared library fails

2014-01-17 Thread Björn Lindqvist
Björn Lindqvist added the comment: The bug is still present on the default build which many distros uses which produces an invalid build. That means ./configure && make && make install is broken! --enable-shared should be turned on by default because many (most?) distros build with the de

[issue4434] Embedding into a shared library fails

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: > perhaps Extension Modules would have been better? For future reference (like if some 3.x is not ok), yes > So it seems that this bug has been fixed at some point since 2.5. Great! -- resolution: invalid -> out of date _

[issue4434] Embedding into a shared library fails

2010-08-04 Thread rb
rb added the comment: Original reporter here. lib-dynload is part of Python's dynamic loading mechanism. Perhaps somewhere like Python/dynload_dl.c is the relevant code? Lib seemed like the right place to put the bug at the time, since it was the stdlib module files that were missing depende

[issue4434] Embedding into a shared library fails

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I carefully and specifically questioned the existence of current 'Python bug', which is what this tracker is for. For Linux, that would mean a bug in any of the source files in a current 2.7, 3.1.2, or 3.2.1a1 tarball release or the newer source repository ve

[issue4434] Embedding into a shared library fails

2010-08-04 Thread John Levon
John Levon added the comment: Terry, what in the above discussion leads you to believe there is no bug? The original complaint "Python cannot be embedded in shared library due to dependency problems with lib-dynload" is still valid. -- status: pending -> open ___

[issue4434] Embedding into a shared library fails

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is not obvious that this issue is about a Python bug, rather than how to use on a specific system, or that it applies to any current version. If this really is a Python bug and applies to a current version, respond to re-open. -- nosy: +terry.reedy

[issue4434] Embedding into a shared library fails

2010-06-05 Thread Jan Kratochvil
Changes by Jan Kratochvil : -- nosy: +jankratochvil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4434] Embedding into a shared library fails

2009-09-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Does it help if you add the --whole-archive option when linking with the static library? As explained there: http://www.lysium.de/blog/index.php?/archives/222-Lost-static-objects-in-static-libraries-with-GNU-linker-ld.html This way your main program will c

[issue4434] Embedding into a shared library fails

2009-09-23 Thread Thijs Triemstra
Changes by Thijs Triemstra : -- nosy: +thijs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4434] Embedding into a shared library fails

2009-07-30 Thread Michael Gorven
Michael Gorven added the comment: Note that on Ubuntu Hardy at least, the libpython2.5.so symlink only exists in the python2.5-dev package. This means that in order for the library to work without the dev package installed, it should dlopen libpython2.5.so.1 instead. -- nosy: +mgorven

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: rb's workaround works, though. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Updated log file. -- Added file: http://bugs.python.org/file14034/log-main.txt ___ Python tracker ___ ___ Pyt

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Changes by Yonas : Removed file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Here's my log file (`LD_DEBUG=all ./main`) -- Added file: http://bugs.python.org/file14033/log-main.txt ___ Python tracker ___ __

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Same error message: import dl: ImportError: /usr/lib/python2.6/lib-dynload/dl.so: undefined symbol: PyExc_ValueError -- ___ Python tracker ___

[issue4434] Embedding into a shared library fails

2009-05-21 Thread Yonas
Yonas added the comment: Ralf, Linking against the static library (with '-Xlinker -export-dynamic') did _not_ solve the problem for me. gcc `python2.6-config --cflags` -c -fPIC mylib.c -o mylib.o -Xlinker -export-dynamic gcc -Xlinker -export-dynamic -lpthread -ldl -lutil -lm -lz -shared -Wl,-

[issue4434] Embedding into a shared library fails

2009-03-28 Thread Matthias Klose
Matthias Klose added the comment: > I'm sure it does work, but what is the point of linking statically > to libpython.a but then having other dependencies, for example on > lib-dynload/time.so? Why not just link to libpython2.5.so in the > first place? speed. Using a python executable with a st

[issue4434] Embedding into a shared library fails

2008-11-28 Thread rb
rb <[EMAIL PROTECTED]> added the comment: Ralf, I'm sure it does work, but what is the point of linking statically to libpython.a but then having other dependencies, for example on lib-dynload/time.so? Why not just link to libpython2.5.so in the first place?

[issue4434] Embedding into a shared library fails

2008-11-28 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: no john, linking with the static library really works. the resulting executable does not depend on the shared library and it is possible to import the e.g. the time module. ___ Python tracker <[EMAIL PROTECTE

[issue4434] Embedding into a shared library fails

2008-11-28 Thread John Levon
John Levon <[EMAIL PROTECTED]> added the comment: If Ubuntu wants to deliver a static libpython, it also needs to deliver static versions of the Python modules, or accept that they're not usable from a static libpython. It makes no sense at all to mix libpython.a with these .so files. Many of th

[issue4434] Embedding into a shared library fails

2008-11-28 Thread rb
rb <[EMAIL PROTECTED]> added the comment: The problem, and the reason for the existence of this bug, is that I cannot build a shared object that links to libpython2.5.so.1 and works. Please don't mark this bug invalid until this problem is fixed. My proposal of adding dependencies to lib-dynloa

[issue4434] Embedding into a shared library fails

2008-11-27 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: Linking with the static library really works. You have to link with '-Xlinker -export-dynamic' however on linux in order to make the symbols from the static library visible. (just in case if I haven't been clear..) _

[issue4434] Embedding into a shared library fails

2008-11-27 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: Yes, there is no purpose in linking with a static library when the dynamically loaded modules still depend on the shared library. And yes, the dynamically loaded libraries should declare their dependencies. My point is they do *not* depend on th

[issue4434] Embedding into a shared library fails

2008-11-27 Thread John Levon
John Levon <[EMAIL PROTECTED]> added the comment: Besides, .so files should always declare their dependencies. ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4434] Embedding into a shared library fails

2008-11-27 Thread rb
rb <[EMAIL PROTECTED]> added the comment: What is the purpose of linking to the static library if you're still going to depend on shared objects in lib-dynload? ___ Python tracker <[EMAIL PROTECTED]> _

[issue4434] Embedding into a shared library fails

2008-11-26 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: ubuntu comes with a static libpython.a which you can also link against. Linking the c modules against the shared python library would make that static library pretty much useless... -- nosy: +schmir

[issue4434] Embedding into a shared library fails

2008-11-26 Thread John Levon
Changes by John Levon <[EMAIL PROTECTED]>: -- nosy: +movement ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing li

[issue4434] Embedding into a shared library fails

2008-11-26 Thread rb
Changes by rb <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file12135/myprog.c ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-b

[issue4434] Embedding into a shared library fails

2008-11-26 Thread rb
New submission from rb <[EMAIL PROTECTED]>: Python cannot be embedded in shared library due to dependency problems with lib-dynload. I am implementing a shared library (in C) that implements a specific API as a dynamically loadable plugin to an application. To implement this library, I am callin