Created attachment 770066 [details] build log openblas failed to compile on riscv architecture.
the most obvious error is as following: =============== getarch_2nd.c: In function ‘main’: getarch_2nd.c:22:35: error: ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘SBGEMM_DEFAULT_UNROLL_M’? 22 | printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M); | ^~~~~~~~~~~~~~~~~~~~~~ | SBGEMM_DEFAULT_UNROLL_M ... riscv64-unknown-linux-gnu-gcc: error: ‘-march=loongson3a’: ISA string must begin with rv32 or rv64 =============== it fail to recognize riscv64 architecture, and thus use wrong loongson compiling flags here
I am able to get around this issue by setting OPENBLAS_TARGET=RISCV64_GENERIC in make.conf as noted in pkg_pretend() of this package's ebuild. Probably the auto detection for cpu arch was not successful.
(In reply to Atharva from comment #0) > Created attachment 770066 [details] > build log > > openblas failed to compile on riscv architecture. Can you also post your `emerge --info` output? (it's also a good idea to do so when reporting any bug since build log + emerge --info is can give more accurate picture of the environment package was tested in as mentioned in https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket)
Created attachment 770195 [details] output of emerge --info
gentoo-r720 ~/dev/openblas # cat openblas.report USE tests started on Tue Apr 26 19:28:17 -00 2022 FEATURES=' test' USE='' succeeded for =sci-libs/openblas-0.3.20 USE='-dynamic -eselect-ldso index-64bit -openmp -pthread -relapack' succeeded for =sci-libs/openblas-0.3.20 USE='dynamic -eselect-ldso index-64bit -openmp -pthread -relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_BCigv USE='dynamic -eselect-ldso -index-64bit openmp -pthread -relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_pmzD4 USE='dynamic eselect-ldso -index-64bit openmp -pthread -relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_d7H0X USE='dynamic eselect-ldso index-64bit -openmp pthread -relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_JB6GI USE='-dynamic -eselect-ldso index-64bit -openmp -pthread relapack' succeeded for =sci-libs/openblas-0.3.20 USE='-dynamic eselect-ldso -index-64bit openmp -pthread relapack' succeeded for =sci-libs/openblas-0.3.20 USE='dynamic -eselect-ldso index-64bit openmp -pthread relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_64bv3 USE='-dynamic -eselect-ldso -index-64bit -openmp pthread relapack' succeeded for =sci-libs/openblas-0.3.20 USE='dynamic eselect-ldso -index-64bit -openmp pthread relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_hQWq9 USE='dynamic -eselect-ldso index-64bit -openmp pthread relapack' failed for =sci-libs/openblas-0.3.20 log has been saved as ./tatt/logs/sci-libs_openblas-0.3.20_use_nJh6D USE='-dynamic eselect-ldso index-64bit -openmp pthread relapack' succeeded for =sci-libs/openblas-0.3.20
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47b90dedf06234195ea5eb701633396e0acb2687 commit 47b90dedf06234195ea5eb701633396e0acb2687 Author: Han Gao <rabenda.cn@gmail.com> AuthorDate: 2022-04-27 16:15:35 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2022-04-27 21:18:24 +0000 sci-libs/openblas: fix riscv detect Bug: https://bugs.gentoo.org/837806 Signed-off-by: Han Gao <rabenda.cn@gmail.com> Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> .../openblas/files/openblas-0.3.20-fix-riscv.patch | 116 +++++++++++++++++++++ sci-libs/openblas/openblas-0.3.20.ebuild | 1 + 2 files changed, 117 insertions(+)