Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937041 - [guru] sci-physics/openmodelica-1.23.1 calls gfortran directly
Summary: [guru] sci-physics/openmodelica-1.23.1 calls gfortran directly
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ivan Lloro
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qa-guru
  Show dependency tree
 
Reported: 2024-08-01 08:14 UTC by Agostino Sarubbo
Modified: 2024-08-05 05:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,406.69 KB, text/plain)
2024-08-01 08:14 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-08-01 08:14:15 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sci-physics/openmodelica-1.23.1 calls gfortran directly.
Discovered on: amd64 (internal ref: guru_ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#QA0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-08-01 08:14:16 UTC
Created attachment 898740 [details]
build.log

build log and emerge --info
Comment 2 Ivan Lloro 2024-08-02 08:36:31 UTC
Indeed, gfortran is called directly because the upstream build CMakefiles to compile that part of the package are missing from upstream in this version release.

So unless a better solution is proposed, this is a clear WON'T FIX closure for me.
Comment 3 Lucio Sauer 2024-08-03 14:08:31 UTC
(In reply to Ivan Lloro from comment #2)
> Indeed, gfortran is called directly because the upstream build CMakefiles to
> compile that part of the package are missing from upstream in this version
> release.
> 
> So unless a better solution is proposed, this is a clear WON'T FIX closure
> for me.

The issue is not that gfortran is called at all, but rather that you don't use the specific compiler for your target architecture (e.g. x86_64-pc-linux-gnu-gfortran).  This can cause issues when cross-compiling, because you might accidentally end up compiling for CBUILD instead of CHOST.
To fix this, you need to replace invocations of `gfortran` with `"$(tc-getFC)" from the toolchain-funcs eclass. 

Please revert the status back to CONFIRMED.
Comment 4 Ivan Lloro 2024-08-04 17:05:01 UTC
Thank you for the detailed description of the actual issue. The brief title was quite misleading.
Comment 5 Lucio Sauer 2024-08-04 23:45:35 UTC
When committing a change that fixes a bug, please wait for it to get merged into master before marking the bug as resolved. Also, it'd be helpful for other contributors if you explained why you closed a bug (link to commit, bug comment,...).

Since you added a 'Closes:' tag to 90899fbaa0ca329fbdfc4a43c627e4ed4c5fb470, both of these things will happen automatically once this commit gets picked up by the git hooks, which scan the master branch.
Comment 6 Lucio Sauer 2024-08-04 23:51:01 UTC
(In reply to Ivan Lloro from comment #4)
> Thank you for the detailed description of the actual issue.
You're welcome!

> The brief title was quite misleading.
> > Info about the issue:
> > https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#QA0014
Another brief, more helpful explanation was linked in comment #0.
Comment 7 Larry the Git Cow gentoo-dev 2024-08-05 05:20:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=90899fbaa0ca329fbdfc4a43c627e4ed4c5fb470

commit 90899fbaa0ca329fbdfc4a43c627e4ed4c5fb470
Author:     Ivan Lloro <ivan.lloro.boada@gmail.com>
AuthorDate: 2024-08-04 18:23:17 +0000
Commit:     Ivan Lloro <ivan.lloro.boada@gmail.com>
CommitDate: 2024-08-04 18:23:17 +0000

    sci-physics/openmodelica: gfortran -> $(tc-getFC)
    
    Closes: https://bugs.gentoo.org/937041
    Signed-off-by: Ivan Lloro <ivan.lloro.boada@gmail.com>

 sci-physics/openmodelica/openmodelica-1.23.1.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)