Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899452 - dev-lang/cfortran-20210827: stablereq
Summary: dev-lang/cfortran-20210827: stablereq
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: CC-ARCHES, PullRequest
Depends on:
Blocks: -fno-common
  Show dependency tree
 
Reported: 2023-03-04 04:37 UTC by Sam James
Modified: 2024-03-15 06:47 UTC (History)
1 user (show)

See Also:
Package list:
=dev-lang/cfortran-20210827
Runtime testing required: ---
nattka: sanity-check+


Attachments
build.log (file_899452.txt,26.26 KB, text/plain)
2023-11-29 01:13 UTC, matoro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-04 04:37:40 UTC
Please stabilize
Comment 1 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-03-04 08:07:21 UTC
x86 done
Comment 2 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-03-04 08:49:00 UTC
amd64 done
Comment 3 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-03-04 08:49:48 UTC
ppc done
Comment 4 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2023-03-04 11:37:12 UTC
ppc64 done
Comment 5 matoro archtester 2023-11-29 01:13:42 UTC
Created attachment 875909 [details]
build.log

One alignment failure on sparc.
Comment 6 matoro archtester 2023-12-06 05:00:25 UTC
Okay...this was tricky and I had to dig into it but the unaligned access is NOT due to incorrect code.  It's actually due to a symbol conflict...which is caused by -fno-common!  Applying -fcommon solves the issue.

Maskray's great writeup at https://maskray.me/blog/2022-02-06-all-about-common-symbols helped me understand this a lot.
Comment 7 Larry the Git Cow gentoo-dev 2023-12-14 04:22:18 UTC
The bug has been referenced in the following commit(s):

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

commit 42c3c45c2ae81d83676fa8573ee531ae21400fa1
Author:     Matoro Mahri <matoro_gentoo@matoro.tk>
AuthorDate: 2023-12-06 06:24:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-14 04:20:40 +0000

    dev-lang/cfortran: add -fcommon to CFLAGS for tests
    
    In the failing test, both the Fortran code and the C code have a symbol
    called _fcb.  The test expects it to be in the common section in both
    objects, such that when it gets linked, they both refer to the same
    symbol, such that changes on the C side to the variable are reflected on
    the Fortran side and vice versa.  However with -fno-common then it's
    still placed in the common section in Fortran, but in C it's placed in
    the BSS section, so now they refer to different objects.  The linker
    actually emits a warning for this, something like "alignment 1 is less
    than 16".
    
    When there are two symbols in different sections with the same name,
    this is an ODR violation which is UB on all platforms.
    
    Bug: https://bugs.gentoo.org/899452
    Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
    Closes: https://github.com/gentoo/gentoo/pull/34143
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/cfortran/cfortran-20210827.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 8 matoro archtester 2023-12-20 02:36:00 UTC
sparc done

all arches done