[issue11347] libpython3.so: Broken soname and linking
Roundup Robot devnull@devnull added the comment: New changeset 749686064642 by Martin v. Löwis in branch '3.2': Use --as-needed when linking libpython3.so. Closes #11347. http://hg.python.org/cpython/rev/749686064642 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Removed file: http://bugs.python.org/file20939/libpython3.so.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: I'm attaching improved patch, which adds detection of -Wl,--no-as-needed flag. This issue should be release blocker for Python 3.2.1. -- Added file: http://bugs.python.org/file21929/libpython3.so.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Georg Brandl ge...@python.org added the comment: Martin? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Georg Brandl ge...@python.org: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Martin v. Löwis mar...@v.loewis.de added the comment: The -hl - -h part seems correct though. Indeed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Having the soname be libpython3 is the whole point of the library: I think that the point of this library is libpython3.so filename, not soname. Everything should still work if libpython3.so had no soname at all. (If somebody has installed unpatched Python 3.2, then ldconfig will create llibpython3.so symlink (e.g. /usr/lib/llibpython3.so) and linker will hardcode dependency on llibpython3.so in generated libraries/executables during linking against libpython3.so (e.g. when -lpython3 has been specified).) (I will work on improved patch for -Wl,--no-as-needed.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Martin v. Löwis mar...@v.loewis.de added the comment: Having the soname be libpython3 is the whole point of the library: I think that the point of this library is libpython3.so filename, not soname. Everything should still work if libpython3.so had no soname at all. IIUC, the linker will hard-code the full path name (include directory name) into DT_NEEDED if the shared library has no soname. That would be undesirable - the DT_NEEDED reference must be just the file name, not the full path. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
New submission from Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: 1. libpython3.so has soname llibpython3.so due to needless l in -Wl,-hl$@. 2. libpython3.so is not linked against libpython$(LDVERSION).so when -Wl,--as-needed flag is used. -Wl,--as-needed flag is used by default in Gentoo due to major benefits. From `info ld`: `--as-needed' `--no-as-needed' This option affects ELF DT_NEEDED tags for dynamic libraries mentioned on the command line after the `--as-needed' option. Normally the linker will add a DT_NEEDED tag for each dynamic library mentioned on the command line, regardless of whether the library is actually needed or not. `--as-needed' causes a DT_NEEDED tag to only be emitted for a library that satisfies an undefined symbol reference from a regular object file or, if the library is not found in the DT_NEEDED lists of other libraries linked up to that point, an undefined symbol reference from another dynamic library. `--no-as-needed' restores the default behaviour. I'm attaching the patch. -- components: Build files: libpython3.so.patch keywords: patch messages: 129649 nosy: Arfrever, loewis priority: normal severity: normal status: open title: libpython3.so: Broken soname and linking versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20939/libpython3.so.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Georg Brandl ge...@python.org: -- assignee: - loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Regardless of this patch, such a libpython3.so regular file cannot exist in Gentoo. Gentoo package manager disallows installation, when it detects file collisions. If I rename libpython3.so of Python 3.2 to libpython3-3.2.so and libpython3.so of Python 3.3 to libpython3-3.3.so, then ldconfig will create libpython3.so symlink pointing to potentially wrong target library. This problem can be avoided by removing soname from libpython3.so, so whole -Wl,-h${soname} could be removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +barry, dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Martin v. Löwis mar...@v.loewis.de added the comment: Having the soname be libpython3 is the whole point of the library, it serves no other reason. It is intentional that there are file collisions with that file, and either the local admin or the distributor must make an explicit choice which libpython3 should be installed; it should be the one that corresponds to /usr/bin/python (if you install it into /usr/lib). As for file20939: it's GNU-ld-specific, so it likely breaks if the linker is not GNU ld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Georg Brandl ge...@python.org added the comment: The -hl - -h part seems correct though. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com