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
Our default installation --prefix is /usr/local #1499
Comments
This is the default for any project that uses Autotools for their build system. I would be hesitant to change it, honestly. I agree with all your points, but I also would hate to surprise someone with a different default. Yes, they could read the documentation, but then they'd also see the documentation for |
Yeah, part of the advantage of using a standard automake configure script is that people know what to expect with standard automake configure scripts, and I'd rather not break that. If they learn "prefix defaults to /usr/local" the hard way from libMesh, that sucks, but it's a lesson they can apply to literally ten thousand other projects. On the other hand, you've pointed out a bunch of non-standard things we're doing that we can fix! Make.common and examples/ belong in share/libmesh/, not at the top level. I'm not sure why we're installing our own contrib/bin/libtool, but even if there's a good reason, it belongs in bin/. If "make uninstall" doesn't work with libMesh then we should figure out why and fix it. Our inability to detect and use an external netcdf is getting to be more and more of a hassle, and we should change that soon. |
I don't know, I've been using automake for several years now and was actually surprised to discover the default was /usr/local. Also while this "standard" may be applicable to the typical GNU software package that is using automake, I don't know how relevant it is for us.
I will test this, but I don't think "make uninstall", even if it works, is actually sufficient here. It's easy to imagine someone first removing their build and/or source checkout directories and only then realizing they also need to uninstall the libraries/headers and being stuck with libmesh files spread out all over the place in /usr. |
FWIW,
|
All that said, nothing will ever beat the simplicity of being able to do |
What's the IT equivalent of "But I could have sworn it wasn't loaded!"? If you've got users running with write access to /usr subtrees, and using "make install" without having specified where the installation should go and without wondering where it will go by default, I'm pretty sure the last thing you want to teach them is to use rm -rf willy-nilly in combination with environment variables. That said, I'm not in favor of changing our default prefix, but I'm not going to fight it either. AC_PREFIX_DEFAULT() is simple enough, and anyone who really wants /usr/local/ can set it manually. What we really ought to do is make sure that "make install prefix=/usr/local/" works, and then anybody who is surprised by our change will be able to fix it without reconfiguring. Let's definitely choose a non-system location if we change the default. I kind of like $PWD/installed, actually; works with VPATH, doesn't add top-level clutter to their home directory, and makes it harder to mix up different versions/configurations. |
If a user specifies no
--prefix
during configure, the prefix currently gets set to /usr/local. This is kind of bad for a few reasons:The list of things we install:
includes some non-standard files and directories (Make.common, contrib, examples) that people probably don't want in /usr/local.
It is difficult to uninstall libmesh since the various bits are spread out all over the place in
/usr/local
instead of in a single directory.Finally, if you look at the list of things we actually install to lib/:
it's possible that the libnetcdf ones will actually overwrite existing netcdf libraries on the system of the same name.
As for choosing a better default, the main question is whether it should be a system location (/opt/libmesh, /usr/local/libmesh, etc.) or a user location ($HOME/.local/libmesh, $PWD/installed, etc.). I'm leaning toward the latter, because it can be frustrating to get a "make install" failure from a script or on a system where you aren't an admin, but I don't feel too strongly about it either way.
The text was updated successfully, but these errors were encountered: