Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 802153 - fortran-2.eclass: missing BDEPEND declarations for EAPI 7+
Summary: fortran-2.eclass: missing BDEPEND declarations for EAPI 7+
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-14 12:30 UTC by Marek Szuba
Modified: 2021-07-20 16:36 UTC (History)
2 users (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 Marek Szuba archtester gentoo-dev 2021-07-14 12:30:27 UTC
At present the eclass only adds virtual/fortran to DEPEND if FORTRAN_NEEDED=test, or to DEPEND and RDEPEND for all other modes (except "no", of course). This should be extended to cover BDEPEND if used in EAPI-7, and soon EAPI-8, ebuilds.
Comment 1 Marek Szuba archtester gentoo-dev 2021-07-14 12:40:00 UTC
My take on this as follows:
 - for FORTRAN_NEEDED=test we clearly need both the compiler and the test executables to run on the build host, therefore newer EAPIS should set BDEPEND only in this mode;
 - for other modes, as things stand we need virtual/fortran in both BDEPEND (so that the compiler can run) and DEPEND (so that binaries we build for the target system can link against appropriate libraries).

On a related note, question to our resident gfortran experts: is it possible to have a binary compiled from Fortran source code which does NOT link against libgfortran? If it is, we might want to think about extending the eclass logic so that it is possible to add virtual/fortran to BDEPEND but not DEPEND.
Comment 2 François Bissey 2021-07-14 20:21:43 UTC
(In reply to Marek Szuba from comment #1) 
> On a related note, question to our resident gfortran experts: is it possible
> to have a binary compiled from Fortran source code which does NOT link
> against libgfortran? If it is, we might want to think about extending the
> eclass logic so that it is possible to add virtual/fortran to BDEPEND but
> not DEPEND.

Unless you compile static, I have no idea how you would perform such a trick.
Comment 3 Larry the Git Cow gentoo-dev 2021-07-20 16:36:39 UTC
The bug has been closed via the following commit(s):

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

commit b40ddb4f450aa66f3021f31991dafc1fd1e97733
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-07-16 11:53:57 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-07-20 16:36:33 +0000

    fortran-2.eclass: use BDEPEND on EAPI 7+
    
    For FORTRAN_NEEDED=test we need both the compiler and the test binaries
    to run on the build host only, hence new EAPIs only set BDEPEND here;
    
    For other modes (other than "no", of course), we need a Fortran compiler
    running on the build host as well as the runtime libraries built for the
    target arch, necessitating the use of both DEPEND and BDEPEND on newer
    EAPIs.
    
    Closes: https://bugs.gentoo.org/802153
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 eclass/fortran-2.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)