Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827042 - sci-libs/netcdf-4.7.4: nc_test fails when optimization level is -O2
Summary: sci-libs/netcdf-4.7.4: nc_test fails when optimization level is -O2
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL: https://github.com/Unidata/netcdf-c/i...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: riscv-keywording
  Show dependency tree
 
Reported: 2021-11-24 07:52 UTC by Alex Fan
Modified: 2021-11-25 01:43 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge.info,5.70 KB, text/plain)
2021-11-24 07:53 UTC, Alex Fan
Details
LastTest.log (LastTest.log,543.07 KB, text/plain)
2021-11-24 07:53 UTC, Alex Fan
Details
build log (netcdf-4.7.4:20211124-060503.log,388.17 KB, text/plain)
2021-11-24 07:53 UTC, Alex Fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fan archtester 2021-11-24 07:52:42 UTC
happens on Sifive Unmatched (riscv64 lp64d). This seems only due to strict aliasing in gcc11. Aarch64 and ppc64le also have report of this issue from other distros, but I was not able to test them on Gentoo.

Appending -fno-strict-aliasing can fix the problem.

...
*** testing nc_get_var_uchar ... 
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1485 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	### 20 FAILURES TESTING nc_get_var_uchar! ###
*** testing nc_get_var_schar ... 
	FAILURE at line 1612 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: value read not that expected
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
	FAILURE at line 1599 of /var/tmp/portage/sci-libs/netcdf-4.7.4/work/netcdf-c-4.7.4/nc_test/test_get.c: expecting NC_ERANGE but got NC_NOERR
...
Comment 1 Alex Fan archtester 2021-11-24 07:53:07 UTC
Created attachment 755798 [details]
emerge --info
Comment 2 Alex Fan archtester 2021-11-24 07:53:33 UTC
Created attachment 755802 [details]
LastTest.log
Comment 3 Alex Fan archtester 2021-11-24 07:53:51 UTC
Created attachment 755806 [details]
build log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 00:30:32 UTC
Let's build it without strict aliasing for now.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 00:33:25 UTC
(In reply to Sam James from comment #4)
> Let's build it without strict aliasing for now.

From a63978b50b3fd36bf8198a9823cbe1f1a9e467b6 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Thu, 25 Nov 2021 00:31:31 +0000
Subject: [PATCH] sci-libs/netcdf: disable strict aliasing for now

Causes test failures.

Bug: https://bugs.gentoo.org/827042
Signed-off-by: Sam James <sam@gentoo.org>
---
 sci-libs/netcdf/netcdf-4.7.4.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)