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 ...
Created attachment 755798 [details] emerge --info
Created attachment 755802 [details] LastTest.log
Created attachment 755806 [details] build log
Let's build it without strict aliasing for now.
(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(-)