Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 846422 - sci-mathematics/petsc-3.16.0 install arch independent files in /usr/lib64
Summary: sci-mathematics/petsc-3.16.0 install arch independent files in /usr/lib64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-19 08:03 UTC by Alessandro Barbieri
Modified: 2022-12-28 06:48 UTC (History)
1 user (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 Alessandro Barbieri 2022-05-19 08:03:25 UTC
Please move files from /usr/lib64/petsc/share/ to /usr/share/petsc
Comment 1 Matthias Maier gentoo-dev 2022-05-26 01:24:10 UTC
The choice to install everything under the rather peculiar /usr/lib/$(get_libdir)/petsc directory has a reason. Actually, we had an FSHS conformant layout before that lead nowhere:

The reason why we currently install everything under /usr/lib/lib64/petsc is due to compability. A long time ago PETSc decided to have a rather peculiar setup of PETSC_DIR and PETSC_ARCH environment variables and a strict, non-FSHS compliant layout of files (libraries, includes, etc).

Unfortunately it is impossible for us to avoid creating this level of compatibility for this layout - downstream projects using PETSc often simply assume this PETSC_DIR/PETSC_ARCH setup. This means, if we install files the correct way PETSc is not found and cannot be used.

There are two viable solutions to this problem:

 (a) Simply install petsc under /usr/lib/$(get_libdir)/petsc, alternatively, /opt/petsc, and let if have its way. This is an approach that we used heavily in the past for a number of packages. I agree that it is not the most elegant but it works reliably. 

 (b) Install everything FSHS compliant and then create a dedicated $PETSC_DIR that contains the PETSC-specific build system bits and symlinks to all files at just the right locations. This is the approach that Debian has chosen where the PETSC_DIR is "reassembled" at /etc/alternatives/petsc$PV

The reasons why we are not doing the latter is simply a lack of time on my side.
So if someone wants to go ahead and fix this properly, please go ahead and create a pull request. I suggest to make sure that
 - the new setup is easily maintainable for version bumps
 - sci-mathematics/slepc installs cleanly alongside it
 - the simple petsc "makefile"s still work.
Comment 2 Alessandro Barbieri 2022-05-26 16:48:39 UTC
In Fedora they are respecting the FHS
https://packages.fedoraproject.org/pkgs/petsc/petsc-devel/fedora-rawhide.html
Comment 3 Larry the Git Cow gentoo-dev 2022-12-28 06:48:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f36a0ce2d4741e60807bf6ff9d0858dbc96585

commit a6f36a0ce2d4741e60807bf6ff9d0858dbc96585
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2022-12-28 05:11:20 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2022-12-28 06:24:50 +0000

    sci-mathematics/petsc: add 3.18.2
    
    Closes: https://bugs.gentoo.org/722612
    Closes: https://bugs.gentoo.org/846428
    Closes: https://bugs.gentoo.org/846425
    Closes: https://bugs.gentoo.org/846422
    Closes: https://bugs.gentoo.org/846431
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.18.2.ebuild | 236 ++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)