-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making libstatgrab parallel-installable #25
Comments
This is an interesting idea. With my FreeBSD packagers hat on, this would make the migration to the new API easier. I could create devel/libstatgrab1 installing stuff as you describe, then work with each dependent port to migrate them to the new API, and finally remove devel/libstatgrab. But I do see a number of issues;
Definitely an idea worth exploring though. |
Am 27.09.2013 um 12:43 schrieb Tim Bishop notifications@github.com:
Yes, it is - but this can be easily done today with some options playing.
Split it in two or more packages.
pkgsrc supports SUPERSEDES=old-pkg1 old-pkg2 …
hacks.mk: (both could be expressed with suitable PKG_* flags)
Surely. We're in the middle of 64->128 bit expansion, at least for storage. The world is changing from dedicated hosts to [\w]aaS - we might have to deal Storage technology is changing a lot. We're moving away from disks in local
We should very carefully think about the technology we choose to reach that goal. CheersJens Rehsack |
On Fri, Sep 27, 2013 at 04:06:12AM -0700, Jens Rehsack wrote:
If we're going to do this, they should be distinctly separate libraries $PREFIX/lib/libstatgrab-1.so.1.0.0
$PREFIX/include/libstatgrab-1/statgrab.h
Ditto for binaries, I guess? I'm not sure what the normal thing to do is
No, we don't split binaries off from libraries... that's the Linux way.
Yes, I agree. The most recent version installs binaries and man pages,
We have a file which shows when a port is moved to another location,
Something like that. Probably -llibstatgrab-1 actually? Anyway, all I [Snip points about 2.0 - looks like it may happen!] This does generally sound like a good idea. We should resolve #24 first Tim. Tim Bishop |
A point I didn't make. The versioning is really about the API. So when 1.0 is released the API doesn't change in any incompatible way. I guess it's possible to make changes that are compatible - extra functions, for example. ABI changes are handled by the shared library version, and I guess we don't worry about breaking that? For incompatible API changes 2.0 would be needed. Think that's what I implied, but wanted to be explicit. |
Am 27.09.2013 um 16:42 schrieb Tim Bishop notifications@github.com:
This is a Linux way. Shared library versioning works great, why
When it's reasonable (and it looks in this special case it is),
Exactly. We only had to make a decision if we rely on what's the common I prefer not breaking to much and stay on what libtool and alike allow CheersJens Rehsack |
On Fri, Sep 27, 2013 at 07:57:53AM -0700, Jens Rehsack wrote:
Did you read the page referenced in the original issue? http://ometer.com/parallel.html It highlights the issue. We can't parallel install two copies of libstatgrab unless they have Tim. Tim Bishop |
I've got some feedback on this issued, based on my work updating libstatgrab to 0.90 in FreeBSD. The problem for me was that there are a number of consumers of libstatgrab in FreeBSD that haven't yet been updated to the new API. This is fairly straightforward to sort out for applications that make one or two function calls, but it's much harder for language bindings. Therefore I needed to have both the old and new API libstatgrab libraries installed in parallel. These are the options I went through, in order. Installing the libraries in the same directory So my first attempt just relied on the fact that the shared libraries have different versions. There's no reason they can't sit side-by-side in the normal lib directory. For runtime stuff this is fine. If you assume the consuming binaries are built in a clean environment with only one version of libstatgrab installed, they be linked against the correct library and it'll work fine. This is fine until you want to install them both side-by-side for building stuff, headers and all. It's not that straightforward to control the linker to make sure it picks the right one at build time. Installing in to a separate directory So I next tried putting the old API library in lib/libstatgrab-0/ and the headers in include/libstatgrab-0. This works fine, you pass in the relevant -I and -L flags at build time and it picks up the correct files. No code in the consumer needs changing. You need to modify the runtime linker (or use -R) so it can find the library at runtime, but that's fine. The problem comes when trying to get the -I and -L flags in the right place in the compiler line. If you're doing it by hand it's fine, but working with a consumer that has an exotic build system that's tricky to control and it becomes tough. At least one package (ruby stuff, maybe) kept putting the main system directories before the ones I'd specified. Installing with a different name Next I patched the old libstatgrab to install the library as libstatgrab0.so and the header as statgrab0.h (with hindsight, that could have been libstatgrab0/statgrab.h, it doesn't really matter). Then it installs side-by-side and old consuming applications just need to be tweaked to include the right header and link the right library. There's no confusion over which one they're getting. This last approach is similar in nature to what was originally suggested, just with the emphasis flipped. The old version changes, and the current version keeps the normal and expected naming. The idea being that the old version will eventually disappear. Both ports are available to view here: http://svnweb.freebsd.org/ports/head/devel/libstatgrab0/ I decided that the tools (statgrab, saidar, etc) and manual pages should come from the main port, and that the old compatibility port should only install the header and library files. I'm not sure what to suggest for libstatgrab going forward. Hopefully this won't happen too often (we should try to keep such API changes to a minimum and group them together for major releases) either. I can see some benefit in consistent behaviour going forward. If 0.90 had been released with headers in include/libstatgrab-1/ and the library as libstatgrab1.so, any updated consumers of libstatgrab would already have been tweaked accordingly. So there'd be less work as a package maintainer or end user getting things compiled. But it also creates more churn with applications having to change their include lines and build systems to find the new libraries. If any third parties are reading this I'd love to hear your views. |
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
Bumping this issue to 1.0. In my mind that's the point by which we need to make a decision one way or the other regarding parallel installation.. I'm happy we've done enough for now with these pre-1.0 releases. |
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
The caption is misleading: you proved that parallel installation works. What this topic covers is parallel development (can libstatgrab-2 while libstatgrab-1 is there and i-scream develops on both). I strongly vote against that - we don't have the manpower. |
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
No, I think you're misunderstanding. It's about parallel installation, not development. I've proved it works by hacking the code. What this issue proposed is that we do the changes in libstatgrab so that the code doesn't need hacking. So when there's next an incompatible API change we make sure things install in libstatgrab-2 (or whatever the specifics are) so that it doesn't conflict with the previous version. That would then avoid the hacks I needed to do in the FreeBSD port. I don't think it's proposing we maintain separate branches and backport fixes etc. |
You didn't need to hack libstatgrab, do you? You needed to hack depending software which wasn't pkg-config aware (so probably ancient itself and not maintained anymore). The proposed strategy in http://ometer.com/parallel.html is for parallel maintaining - which is kind of parallel development. I think I have to re-read your explanation what you finally did in detail... |
Yes, I did need to hack libstatgrab to get it to install with different names. Minimally, but still had to do it: http://svnweb.freebsd.org/ports/head/devel/libstatgrab0/Makefile?revision=353876&view=markup (two post- targets) All those changes are about renaming the library, the header and the pkg-config file. Depending software, whether pkg-config or not, needed hacking to change the include and pkg-config lookups. The strategy on that page is about parallel installation. So you can install two versions with different APIs side-by-side. Not every single version, of course, just those with incompatible APIs where you might need both installed. Yes, this could then of course lead to parallel development, but it doesn't have to... |
Am 13.06.2014 um 18:05 schrieb Tim Bishop notifications@github.com:
Reviewing your changes (and I think, some of them wouldn't be necessary when --includedir and --libdir would have been used and depending software would search those paths before standard paths...) I think, adding active support for above renaming actions would satisfy the requirement. Usually, PKG_CONFIG_* macros in autoconf check for name[]_CFLAGS/name[]_LIBS (as we do for log4cplus_CFLAGS/log4cplus_LIBS). So properly written configure scripts won't need any patching. I don't remember why it wasn't possible to install libstatgrab-0.17 into $prefix/include/lsg017 and $prefix/lib/lsg017. CheersJens Rehsack |
On Fri, Jun 13, 2014 at 09:30:20AM -0700, Jens Rehsack wrote:
Then you need to re-read my longish explanation above :-) In summary, By renaming header to statgrab0.h and library to libstatgrab0.so they The idea (if this was done properly) is that when we changed the API we |
Am 13.06.2014 um 18:37 schrieb Tim Bishop notifications@github.com:
Which sounds to me more as a bug in the build system. A better workaround
Call it resign :)
I think this solution is bad at all. I allows broken software being used gtk can do that - because the have dozens of full-time developers. They We don't. So what we should develop is a solution which helps installing several CheersJens Rehsack |
On Fri, Jun 13, 2014 at 09:44:05AM -0700, Jens Rehsack wrote:
Maybe, but we can't fix all build systems :-)
No, not for all packaged version, just ones with incompatible APIs. But yes, nothing in the default include path would go some way to fixing And in practice, what's the difference? Does it matter whether you
Not at all. It allows users to use both old and new software at the
You're again mixing up parallel development and support with parallel It would have made my life a lot easier if 0.90+ had installed headers |
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
Am 13.06.2014 um 19:04 schrieb Tim Bishop notifications@github.com:
We had a similar discussion about RPATH in Linux and a weird clang
Same same, but different - use lib subdirectory :)
Renaming has to happen at the source (read: i-scream had to deploy it IIRC invented FreeBSD (portupgrade?) the idea of lib/compat - which is
I told you send me all software at the time I worked on related stuff in I would prefer updating upstream - and where not possible, use parallel
But there is already - you just decided not to walk that way. It's a fair CheersJens Rehsack |
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
This includes a note in README that covers the RPATH/ldconfig issue found libstatgrab#37, and also a note for the parallel installation discussion in issue libstatgrab#25.
Since we're currently heading for a 1.0 release with a different API, we should consider making libstatgrab parallel-installable for future releases -- i.e. install the library as libstatgrab-1.so, and the headers into include/libstatgrab-1 (see http://ometer.com/parallel.html for more details). This is largely transparent to the pkg-config-using programmer, but it means we can have multiple versions of libstatgrab installed at the same time.
I'm not sure if this is actually worth the effort, but if we're going to do it, then now would be the time...
The text was updated successfully, but these errors were encountered: