Skip to content

Install make.config with header files#1969

Merged
ZedThree merged 1 commit intomasterfrom
make-config-install
Mar 19, 2020
Merged

Install make.config with header files#1969
ZedThree merged 1 commit intomasterfrom
make-config-install

Conversation

@dschwoerer
Copy link
Contributor

Installing into datadir causes issues as make.config contains many
settings and is thus not interchangable between different setups. If
the FHS [1] is used, different installations would conflict. This
has caused issues for fedora, where different MPI installations
share @datadir@.

[1] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

@dschwoerer dschwoerer added this to the BOUT-4.3.1 milestone Mar 19, 2020
@ZedThree
Copy link
Member

Did you mean to also remove the mpark variant stuff?

Installing into datadir causes issues as make.config contains many
settings and is thus not interchangable between different setups. If
the FHS [1] is used, different installations would conflict. This
has caused issues for fedora, where different MPI installations
share @datadir@.

[1] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
@dschwoerer dschwoerer force-pushed the make-config-install branch from a3b52db to 6cc918f Compare March 19, 2020 13:41
@dschwoerer
Copy link
Contributor Author

Would you consider merging?

No, was an accident. Should be fixed now 👍

@ZedThree
Copy link
Member

It's not clear to me that @includedir@ is definitely the correct place given that this isn't a header file, but as you point out, @datadir@ is supposed to be architecture-independent. I'm not suggesting we copy PETSc, but they put their equivalent files under lib/petsc/conf. CMake and pkg-config both install their files under @libdir@ for me.

The GNU installation standard suggests maybe @sysconfdir@, ${prefix}/etc? https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

Also, I'm currently on a Fedora machine, and there's a /usr/lib64/openmpi/share directory -- is this not datadir? Is Fedora doing something other than setting prefix=/usr/lib64/openmpi?

I'm a bit less sure about this than I was initially. To install multiple versions of BOUT++, presumably you'd need to set prefix differently. Why then would they end up installing make.config in the same place?

I think this is likely fine, I'd just like to understand why it's necessary!

@dschwoerer
Copy link
Contributor Author

Fedora is doing something different. For example header files are in /usr/include/openmpi-x86_64/bout++/
More documentation:
https://fedoraproject.org/wiki/Packaging:MPI#Packaging_of_MPI_compilers

We could use a different @datadir@, but that would result in duplicated .mo files, which isn't as nice. Also it violates the idea that datadir should be arch-independent. Some paths are arch-dependent, mostly due to multilib support.

@sysconfdir@ would avoid the conflict, but that would suggest the user can edit those files. However, this will most likely brake the installation, so I don't think that will work. @libdir@ might be better ...

@ZedThree
Copy link
Member

@sysconfdir@ should be for read-only files according to that GNU document.

I don't have a strong opinion, as long as it works and is not obviously wrong.

@ZedThree ZedThree merged commit a9aaa13 into master Mar 19, 2020
@ZedThree ZedThree deleted the make-config-install branch March 19, 2020 15:08
@dschwoerer
Copy link
Contributor Author

I think read-only refers to the program. This is basically /etc where the user/sysadmin can edit config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants