-
Notifications
You must be signed in to change notification settings - Fork 266
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
Avoid soname version for plugins #2431
Conversation
Unfortunately, we do not routinely test on Fedora. Perhaps we should.
This appears to cause testing libraries (like noop1) to get installed when they should not be installed, Do I have that right? |
Yes, the library is simply lib__nch5deflate.so. Since that is presumably the name that is used to load it, that seems appropriate. Having lib__nch5deflate.so.0.0.0 is superfluous.
They do get copied to the install location by install-data, but then they are removed immediately by installl-data-hook. A comment about that is probably appropriate... |
Another issue - it looks like lib__nczhdf5filters.so is not linked to libnetcdf:
I've added a commit for that. |
There is also the question of how the package netcdf's HDF5 plugins. Presumably aside from nczhdf5filters the plugins are useful without netcdf installed - is that correct? |
True if someone wanted to use them with HDF5, but not using netcdf-c. |
As for installing our test filters and then deleting them, I would prefer |
The current system is a pain for packagers because all of the filters get installed into DESTDIR and need to get manually removed. This method deletes them automatically. |
I am not sure I understand. You can suppress the installation of the filters |
Would putting the test plugins in Given Lines 10 to 11 in 47d35cc
Lines 22 to 26 in 47d35cc
and Line 111 in 47d35cc
the test-only plugins should be installed under builddir only, not anywhere under prefix , unless DESTDIR puts them in $(DESTDIR)/$(abs_top_builddir) .
MinGW and Cygwin don't have a concept of |
I am completely lost here. What exactly are you trying to do that is not being done with the current build? Also where does DESTDIR come into it? I can see no reference to it in Makefile.am? |
This was partially written before your most recent comment and would be an alternative to defining I think specifying that the test plugins are not to be installed is a more natural solution than what is done here, but if it doesn't work then it doesn't actually solve anything.
For example, you could configure with Given that install-data-hook:
if test "x$(DESTDIR)" != "x"; then cd $(DESTDIR)/$(tmpdir) && rm -f $(tmp_LTLIBRARIES); fi
install-exec-hook:
if test "x$(DESTDIR)" != "x"; then cd $(DESTDIR)/$(tmpdir) && rm -f $(tmp_LTLIBRARIES:.la=.so); fi would probably delete the files (with the current netcdf-c configuration; syntax borrowed from the |
I don't want to suppress the generation of plugins - I want them installed in the proper place. Currently they get installed (also) into I tried check_LTLIBRARIES first, but that didn't work. I don't quite remember why - possibly that they were build as static convenience libraries instead of shared libs. |
The use of this by the packager is a major problem since abs_top_builddir is itself intended to be an absolute path. So, the workflow I want is:
Note that I resist moving the test libraries and then deleting them is 2-fold:
Both #1 and #2 are fixable, but irritating. So can you outline the most desirable installation situation from your point of view? That is, where ideally do you want the plugin libraries to go? |
I think we all want the same solution. I just don't think it's possible with autotools. You already have the testing libraries marked differently (tmpdir_LTLIBRARIES), this doesn't change that. |
Would providing EDIT: Just saw |
I think the solution in this situation (for packagers) is to transfer the responsibility for installing the filter libraries to be the done by the packager. This, I think, entails the following:
|
I managed to convince Also, specifying, say, One other note about building on Cygwin: the variable to link a library into a library is So, to solve the problem of the test plugins getting installed by the workflows for building packages for linux distribution repositories and the like, I think one could put the test plugins in |
I was not aware of check_LTLIBRARIES. I think your solution is correct; I will test. |
|
If I put the plugin dir ahead of all the test directories, then I think the |
It would need to be after Looking at the top-level |
So I did a test in which I used either noinst_LTLIBRARIES or check_LTLIBRARIES |
Is |
Yes, that was it. It also solves the noinst_ problem so I can use |
I prefer As you discovered |
When I run my tests with no -rpath for the installable filters, it fails. |
I suspect that particular failure is because configure defaults to |
This caused problems for packagers (Unidata#2431)
re: Unidata#2431 Hat tip to [DWesl](https://github.com/DWesl) and [opoplawski](https://github.com/opoplawski) for their help. With some help, I found out how to get rid of the tmp_LTLIBARIES hack and replace it with check_LTLIBRARIES. Using check_LTLIBRARIES means also that the test libraries are not built until "make check" is executed. This PR replaces the one above.
This should be closed in favor of PR #2440 |
This caused problems for packagers (Unidata#2431)
I've reduced this now to the last remaining item that wasn't addressed - removing to soname from the plugins. |
Merged in with #2826 |
Working on ndfcdf 4.9.0 for Fedora presented a number of issues - the first of which was installing a bunch of plugins into the DESTDIR rpm BUILDROOT in locations like /home/orion/.... After trying a few different things I settled on the scheme of removing the test plugins after install as the simplest.
Next, plugins shouldn't have SO version info so I removed that.
Finally, rpath is generally banned in Fedora so I removed that, and I'm pretty sure it wouldn't be needed elsewhere but perhaps I am mistaken.