Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517002 - dev-python/pypy: kill /usr/lib*/libpypy-c.so or rename it
Summary: dev-python/pypy: kill /usr/lib*/libpypy-c.so or rename it
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Delaney (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-12 21:31 UTC by Michał Górny
Modified: 2014-07-17 04:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-12 21:31:00 UTC
You have introduced unversioned library with bad name in /usr/lib*. Now it's going to make it impossible to install pypy3 alongside pypy. Please get rid of that library (keep it just inside /usr/lib*/pypy) or rename it to avoid collisions (to libpypy.so & libpypy3.so, i'd guess). Former is preferred since I don't feel like using custom library names is a good idea.
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2014-07-13 00:54:11 UTC
right.  This is what you referred to by the bad .so name. Well while we can ponder as to why upstream never had the sense to foresee this, perhaps that point is moot.  It's yet something else that they mis-designed and 'we' have to rectify.  On my part I thought just renaming it to what suits 'us', or what looks sane to 'us', would break by mis-matching what the makers of pypy in their eyes decided was fine.
I consider this quite valid and needs dealing with, or 'fixing'.

So what ought 'we' re-name it to?
and on that thought, does this not warrant an upstream bug to the makers of pypy to do exactly this and save us the merry dance?  Surely they could have / should have given it such a name in the first place.
I would have thought irc was fine but nm.  Let's do it here
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2014-07-13 01:11:38 UTC
oh, and on that.  It's official that the makers of pypy are in fact shortsighted.  There has been a bug submitted to their bugzy with this exact problem, the clashing of naming files making it impossible to install, or in our case emerge, pypy2 aside pypy3. And this was done BEFORE I did the introducing of the unversioned library with bad name in /usr/lib*. which, correct me if I'm wrong, I did in reply to the bug that requested the addition of that new shared lib, which was in the recent bump only.  Perhaps in this case it's just as well to unwind its addition and say sorry user, adding it caused unnecessary but forseeable problems, or breakage, that it shouldn't.  But it looks as if we can leave it in and make a fix for this bug.   If not, I'd go for unwinding its addition and expressing regret to the user with a couple of lines explanation.
Comment 3 Mike Gilbert gentoo-dev 2014-07-14 04:14:45 UTC
I think it is reasonable to install the shared library in /usr/lib/pypy. This would allow users to link with it by setting LDPATH or passing -L/usr/lib/pypy to the linker.

I do not think we should install it in /usr/lib without a well-defined soname that is defined by upstream for binary compatibility between releases.

In other words, remove this line from the ebuild and I think we will be all set on this for the time being.

dosym ../$(get_libdir)/pypy/libpypy-c.so /usr/$(get_libdir)/libpypy-c.so
Comment 4 Mike Gilbert gentoo-dev 2014-07-14 04:43:08 UTC
Actually, is seems we are installing a pypy binary which is linked against libpypy-c.so, so the library needs to be somewhere in LDPATH or we will get this:

pypy: error while loading shared libraries: libpypy-c.so: cannot open shared object file: No such file or directory
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-14 13:29:57 UTC
We can either set RPATH in the executable or install a wrapper.
Comment 6 Mike Gilbert gentoo-dev 2014-07-14 14:04:58 UTC
(In reply to Michał Górny from comment #5)
> We can either set RPATH in the executable or install a wrapper.

Right. We discussed setting rpath in #gentoo-python, and Arfrever came up with a patch which Ian is testing.
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2014-07-15 00:38:29 UTC
*pypy-2.3.1-r1 (15 Jul 2014)

  15 Jul 2014; Ian Delaney <idella4@gentoo.org> +files/2.3.1-shared-lib.patch,
  +pypy-2.3.1-r1.ebuild, -pypy-2.3.1.ebuild:
  revbump; patch to fix shared lib issue of libpypy-c.so wrt Bug #517002, thanks
  to Arfrever for the patch which is submitted upstream

Preliminary testing looks fine however I shall leave it open for any further finding or suggestion since any move ahead needs this being set right.