I am trying to build OpenBLAS on Windows 10, strictly following the instruction in this link under the section "Build OpenBLAS on Windows OS". The environment I'm using is Windows 10, Intel core i5-6200u, MinGW64 from http://www.msys2.org. The following is the full message shown in the MSYS2 MinGW 64-bit shell after rerunning the command again after the first error.
DESKTOP-DI9LHTR /d/Downloads/OpenBLAS/OpenBLAS-0.2.20
$ make BINARY=64 CC=gcc FC=gfortran
make[1]: Entering directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/interface'
ar -ru ../libopenblas_haswellp-r0.2.20.a saxpy.obj sswap.obj scopy.obj sscal.obj sdot.obj sdsdot.obj dsdot.obj sasum.obj snrm2.obj smax.obj samax.obj ismax.obj isamax.obj smin.obj samin.obj ismin.obj isamin.obj srot.obj srotg.obj srotm.obj srotmg.obj saxpby.obj cblas_isamax.obj cblas_sasum.obj cblas_saxpy.obj cblas_scopy.obj cblas_sdot.obj cblas_sdsdot.obj cblas_dsdot.obj cblas_srot.obj cblas_srotg.obj cblas_srotm.obj cblas_srotmg.obj cblas_sscal.obj cblas_sswap.obj cblas_snrm2.obj cblas_saxpby.obj sgemv.obj sger.obj strsv.obj strmv.obj ssymv.obj ssyr.obj ssyr2.obj sgbmv.obj ssbmv.obj sspmv.obj sspr.obj sspr2.obj stbsv.obj stbmv.obj stpsv.obj stpmv.obj cblas_sgemv.obj cblas_sger.obj cblas_ssymv.obj cblas_strmv.obj cblas_strsv.obj cblas_ssyr.obj cblas_ssyr2.obj cblas_sgbmv.obj cblas_ssbmv.obj cblas_sspmv.obj cblas_sspr.obj cblas_sspr2.obj cblas_stbmv.obj cblas_stbsv.obj cblas_stpmv.obj cblas_stpsv.obj sgemm.obj ssymm.obj strmm.obj strsm.obj ssyrk.obj ssyr2k.obj somatcopy.obj simatcopy.obj sgeadd.obj cblas_sgemm.obj cblas_ssymm.obj cblas_strmm.obj cblas_strsm.obj cblas_ssyrk.obj cblas_ssyr2k.obj cblas_somatcopy.obj cblas_simatcopy.obj cblas_sgeadd.obj sgetrf.obj sgetrs.obj spotrf.obj sgetf2.obj spotf2.obj slaswp.obj sgesv.obj slauu2.obj slauum.obj strti2.obj strtri.obj daxpy.obj dswap.obj dcopy.obj dscal.obj ddot.obj dasum.obj dnrm2.obj dmax.obj damax.obj idmax.obj idamax.obj dmin.obj damin.obj idmin.obj idamin.obj drot.obj drotg.obj drotm.obj drotmg.obj daxpby.obj cblas_idamax.obj cblas_dasum.obj cblas_daxpy.obj cblas_dcopy.obj cblas_ddot.obj cblas_drot.obj cblas_drotg.obj cblas_drotm.obj cblas_drotmg.obj cblas_dscal.obj cblas_dswap.obj cblas_dnrm2.obj cblas_daxpby.obj dgemv.obj dger.obj dtrsv.obj dtrmv.obj dsymv.obj dsyr.obj dsyr2.obj dgbmv.obj dsbmv.obj dspmv.obj dspr.obj dspr2.obj dtbsv.obj dtbmv.obj dtpsv.obj dtpmv.obj cblas_dgemv.obj cblas_dger.obj cblas_dsymv.obj cblas_dtrmv.obj cblas_dtrsv.obj cblas_dsyr.obj cblas_dsyr2.obj cblas_dgbmv.obj cblas_dsbmv.obj cblas_dspmv.obj cblas_dspr.obj cblas_dspr2.obj cblas_dtbmv.obj cblas_dtbsv.obj cblas_dtpmv.obj cblas_dtpsv.obj dgemm.obj dsymm.obj dtrmm.obj dtrsm.obj dsyrk.obj dsyr2k.obj domatcopy.obj dimatcopy.obj dgeadd.obj cblas_dgemm.obj cblas_dsymm.obj cblas_dtrmm.obj cblas_dtrsm.obj cblas_dsyrk.obj cblas_dsyr2k.obj cblas_domatcopy.obj cblas_dimatcopy.obj cblas_dgeadd.obj dgetrf.obj dgetrs.obj dpotrf.obj dgetf2.obj dpotf2.obj dlaswp.obj dgesv.obj dlauu2.obj dlauum.obj dtrti2.obj dtrtri.obj caxpy.obj caxpyc.obj cswap.obj ccopy.obj cscal.obj csscal.obj cdotc.obj cdotu.obj scasum.obj scnrm2.obj scamax.obj icamax.obj scamin.obj icamin.obj csrot.obj crotg.obj caxpby.obj cblas_icamax.obj cblas_scasum.obj cblas_caxpy.obj cblas_ccopy.obj cblas_cdotc.obj cblas_cdotu.obj cblas_cdotc_sub.obj cblas_cdotu_sub.obj cblas_cscal.obj cblas_csscal.obj cblas_cswap.obj cblas_scnrm2.obj cblas_caxpby.obj cgemv.obj cgeru.obj cgerc.obj ctrsv.obj ctrmv.obj csyr2.obj cgbmv.obj csbmv.obj cspr2.obj ctbsv.obj ctbmv.obj ctpsv.obj ctpmv.obj chemv.obj chbmv.obj cher.obj cher2.obj chpmv.obj chpr.obj chpr2.obj cblas_cgemv.obj cblas_cgerc.obj cblas_cgeru.obj cblas_cgbmv.obj cblas_chbmv.obj cblas_chemv.obj cblas_cher.obj cblas_cher2.obj cblas_chpmv.obj cblas_chpr.obj cblas_chpr2.obj cblas_ctbmv.obj cblas_ctbsv.obj cblas_ctpmv.obj cblas_ctpsv.obj cblas_ctrmv.obj cblas_ctrsv.obj cgemm.obj csymm.obj ctrmm.obj ctrsm.obj csyrk.obj csyr2k.obj chemm.obj cherk.obj cher2k.obj comatcopy.obj cimatcopy.obj cgeadd.obj cgemm3m.obj cblas_cgemm.obj cblas_csymm.obj cblas_ctrmm.obj cblas_ctrsm.obj cblas_csyrk.obj cblas_csyr2k.obj cblas_chemm.obj cblas_cherk.obj cblas_cher2k.obj cblas_comatcopy.obj cblas_cimatcopy.obj cblas_cgeadd.obj cblas_xerbla.obj cblas_cgemm3m.obj cgetrf.obj cgetrs.obj cpotrf.obj cgetf2.obj cpotf2.obj claswp.obj cgesv.obj clauu2.obj clauum.obj ctrti2.obj ctrtri.obj zaxpy.obj zaxpyc.obj zswap.obj zcopy.obj zscal.obj zdscal.obj zdotc.obj zdotu.obj dzasum.obj dznrm2.obj dzamax.obj izamax.obj dzamin.obj izamin.obj zdrot.obj zrotg.obj zaxpby.obj cblas_izamax.obj cblas_dzasum.obj cblas_zaxpy.obj cblas_zcopy.obj cblas_zdotc.obj cblas_zdotu.obj cblas_zdotc_sub.obj cblas_zdotu_sub.obj cblas_zscal.obj cblas_zdscal.obj cblas_zswap.obj cblas_dznrm2.obj cblas_zaxpby.obj zgemv.obj zgeru.obj zgerc.obj ztrsv.obj ztrmv.obj zsyr2.obj zgbmv.obj zsbmv.obj zspr2.obj ztbsv.obj ztbmv.obj ztpsv.obj ztpmv.obj zhemv.obj zhbmv.obj zher.obj zher2.obj zhpmv.obj zhpr.obj zhpr2.obj cblas_zgemv.obj cblas_zgerc.obj cblas_zgeru.obj cblas_zgbmv.obj cblas_zhbmv.obj cblas_zhemv.obj cblas_zher.obj cblas_zher2.obj cblas_zhpmv.obj cblas_zhpr.obj cblas_zhpr2.obj cblas_ztbmv.obj cblas_ztbsv.obj cblas_ztpmv.obj cblas_ztpsv.obj cblas_ztrmv.obj cblas_ztrsv.obj zgemm.obj zsymm.obj ztrmm.obj ztrsm.obj zsyrk.obj zsyr2k.obj zhemm.obj zherk.obj zher2k.obj zomatcopy.obj zimatcopy.obj zgeadd.obj zgemm3m.obj cblas_zgemm.obj cblas_zsymm.obj cblas_ztrmm.obj cblas_ztrsm.obj cblas_zsyrk.obj cblas_zsyr2k.obj cblas_zhemm.obj cblas_zherk.obj cblas_zher2k.obj cblas_zomatcopy.obj cblas_zimatcopy.obj cblas_zgeadd.obj cblas_zgemm3m.obj zgetrf.obj zgetrs.obj zpotrf.obj zgetf2.obj zpotf2.obj zlaswp.obj zgesv.obj zlauu2.obj zlauum.obj ztrti2.obj ztrtri.obj
make[1]: Leaving directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/interface'
make[1]: Entering directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/driver/level2'
ar -ru ../../libopenblas_haswellp-r0.2.20.a sgbmv_n.obj sgbmv_t.obj ssbmv_U.obj ssbmv_L.obj sspmv_U.obj sspmv_L.obj sspr_U.obj sspr_L.obj sspr2_U.obj sspr2_L.obj ssyr_U.obj ssyr_L.obj ssyr2_U.obj ssyr2_L.obj stbmv_NUU.obj stbmv_NUN.obj stbmv_NLU.obj stbmv_NLN.obj stbmv_TUU.obj stbmv_TUN.obj stbmv_TLU.obj stbmv_TLN.obj stbsv_NUU.obj stbsv_NUN.obj stbsv_NLU.obj stbsv_NLN.obj stbsv_TUU.obj stbsv_TUN.obj stbsv_TLU.obj stbsv_TLN.obj stpmv_NUU.obj stpmv_NUN.obj stpmv_NLU.obj stpmv_NLN.obj stpmv_TUU.obj stpmv_TUN.obj stpmv_TLU.obj stpmv_TLN.obj stpsv_NUU.obj stpsv_NUN.obj stpsv_NLU.obj stpsv_NLN.obj stpsv_TUU.obj stpsv_TUN.obj stpsv_TLU.obj stpsv_TLN.obj strmv_NUU.obj strmv_NUN.obj strmv_NLU.obj strmv_NLN.obj strmv_TUU.obj strmv_TUN.obj strmv_TLU.obj strmv_TLN.obj strsv_NUU.obj strsv_NUN.obj strsv_NLU.obj strsv_NLN.obj strsv_TUU.obj strsv_TUN.obj strsv_TLU.obj strsv_TLN.obj sgemv_thread_n.obj sgemv_thread_t.obj sger_thread.obj ssymv_thread_U.obj ssymv_thread_L.obj ssyr_thread_U.obj ssyr_thread_L.obj ssyr2_thread_U.obj ssyr2_thread_L.obj sspr_thread_U.obj sspr_thread_L.obj sspr2_thread_U.obj sspr2_thread_L.obj strmv_thread_NUU.obj strmv_thread_NUN.obj strmv_thread_NLU.obj strmv_thread_NLN.obj strmv_thread_TUU.obj strmv_thread_TUN.obj strmv_thread_TLU.obj strmv_thread_TLN.obj sspmv_thread_U.obj sspmv_thread_L.obj stpmv_thread_NUU.obj stpmv_thread_NUN.obj stpmv_thread_NLU.obj stpmv_thread_NLN.obj stpmv_thread_TUU.obj stpmv_thread_TUN.obj stpmv_thread_TLU.obj stpmv_thread_TLN.obj sgbmv_thread_n.obj sgbmv_thread_t.obj ssbmv_thread_U.obj ssbmv_thread_L.obj stbmv_thread_NUU.obj stbmv_thread_NUN.obj stbmv_thread_NLU.obj stbmv_thread_NLN.obj stbmv_thread_TUU.obj stbmv_thread_TUN.obj stbmv_thread_TLU.obj stbmv_thread_TLN.obj dgbmv_n.obj dgbmv_t.obj dsbmv_U.obj dsbmv_L.obj dspmv_U.obj dspmv_L.obj dspr_U.obj dspr_L.obj dspr2_U.obj dspr2_L.obj dsyr_U.obj dsyr_L.obj dsyr2_U.obj dsyr2_L.obj dtbmv_NUU.obj dtbmv_NUN.obj dtbmv_NLU.obj dtbmv_NLN.obj dtbmv_TUU.obj dtbmv_TUN.obj dtbmv_TLU.obj dtbmv_TLN.obj dtbsv_NUU.obj dtbsv_NUN.obj dtbsv_NLU.obj dtbsv_NLN.obj dtbsv_TUU.obj dtbsv_TUN.obj dtbsv_TLU.obj dtbsv_TLN.obj dtpmv_NUU.obj dtpmv_NUN.obj dtpmv_NLU.obj dtpmv_NLN.obj dtpmv_TUU.obj dtpmv_TUN.obj dtpmv_TLU.obj dtpmv_TLN.obj dtpsv_NUU.obj dtpsv_NUN.obj dtpsv_NLU.obj dtpsv_NLN.obj dtpsv_TUU.obj dtpsv_TUN.obj dtpsv_TLU.obj dtpsv_TLN.obj dtrmv_NUU.obj dtrmv_NUN.obj dtrmv_NLU.obj dtrmv_NLN.obj dtrmv_TUU.obj dtrmv_TUN.obj dtrmv_TLU.obj dtrmv_TLN.obj dtrsv_NUU.obj dtrsv_NUN.obj dtrsv_NLU.obj dtrsv_NLN.obj dtrsv_TUU.obj dtrsv_TUN.obj dtrsv_TLU.obj dtrsv_TLN.obj dgemv_thread_n.obj dgemv_thread_t.obj dger_thread.obj dsymv_thread_U.obj dsymv_thread_L.obj dsyr_thread_U.obj dsyr_thread_L.obj dsyr2_thread_U.obj dsyr2_thread_L.obj dspr_thread_U.obj dspr_thread_L.obj dspr2_thread_U.obj dspr2_thread_L.obj dtrmv_thread_NUU.obj dtrmv_thread_NUN.obj dtrmv_thread_NLU.obj dtrmv_thread_NLN.obj dtrmv_thread_TUU.obj dtrmv_thread_TUN.obj dtrmv_thread_TLU.obj dtrmv_thread_TLN.obj dspmv_thread_U.obj dspmv_thread_L.obj dtpmv_thread_NUU.obj dtpmv_thread_NUN.obj dtpmv_thread_NLU.obj dtpmv_thread_NLN.obj dtpmv_thread_TUU.obj dtpmv_thread_TUN.obj dtpmv_thread_TLU.obj dtpmv_thread_TLN.obj dgbmv_thread_n.obj dgbmv_thread_t.obj dsbmv_thread_U.obj dsbmv_thread_L.obj dtbmv_thread_NUU.obj dtbmv_thread_NUN.obj dtbmv_thread_NLU.obj dtbmv_thread_NLN.obj dtbmv_thread_TUU.obj dtbmv_thread_TUN.obj dtbmv_thread_TLU.obj dtbmv_thread_TLN.obj cgbmv_n.obj cgbmv_t.obj cgbmv_r.obj cgbmv_c.obj cgbmv_o.obj cgbmv_u.obj cgbmv_s.obj cgbmv_d.obj chbmv_U.obj chbmv_L.obj chbmv_V.obj chbmv_M.obj cher_U.obj cher_L.obj cher_V.obj cher_M.obj cher2_U.obj cher2_L.obj cher2_V.obj cher2_M.obj chpmv_U.obj chpmv_L.obj chpmv_V.obj chpmv_M.obj chpr_U.obj chpr_L.obj chpr_V.obj chpr_M.obj chpr2_U.obj chpr2_L.obj chpr2_V.obj chpr2_M.obj csbmv_U.obj csbmv_L.obj cspmv_U.obj cspmv_L.obj cspr_U.obj cspr_L.obj cspr2_U.obj cspr2_L.obj csyr_U.obj csyr_L.obj csyr2_U.obj csyr2_L.obj ctbmv_NUU.obj ctbmv_NUN.obj ctbmv_NLU.obj ctbmv_NLN.obj ctbmv_TUU.obj ctbmv_TUN.obj ctbmv_TLU.obj ctbmv_TLN.obj ctbmv_RUU.obj ctbmv_RUN.obj ctbmv_RLU.obj ctbmv_RLN.obj ctbmv_CUU.obj ctbmv_CUN.obj ctbmv_CLU.obj ctbmv_CLN.obj ctbsv_NUU.obj ctbsv_NUN.obj ctbsv_NLU.obj ctbsv_NLN.obj ctbsv_TUU.obj ctbsv_TUN.obj ctbsv_TLU.obj ctbsv_TLN.obj ctbsv_RUU.obj ctbsv_RUN.obj ctbsv_RLU.obj ctbsv_RLN.obj ctbsv_CUU.obj ctbsv_CUN.obj ctbsv_CLU.obj ctbsv_CLN.obj ctpmv_NUU.obj ctpmv_NUN.obj ctpmv_NLU.obj ctpmv_NLN.obj ctpmv_TUU.obj ctpmv_TUN.obj ctpmv_TLU.obj ctpmv_TLN.obj ctpmv_RUU.obj ctpmv_RUN.obj ctpmv_RLU.obj ctpmv_RLN.obj ctpmv_CUU.obj ctpmv_CUN.obj ctpmv_CLU.obj ctpmv_CLN.obj ctpsv_NUU.obj ctpsv_NUN.obj ctpsv_NLU.obj ctpsv_NLN.obj ctpsv_TUU.obj ctpsv_TUN.obj ctpsv_TLU.obj ctpsv_TLN.obj ctpsv_RUU.obj ctpsv_RUN.obj ctpsv_RLU.obj ctpsv_RLN.obj ctpsv_CUU.obj ctpsv_CUN.obj ctpsv_CLU.obj ctpsv_CLN.obj ctrmv_NUU.obj ctrmv_NUN.obj ctrmv_NLU.obj ctrmv_NLN.obj ctrmv_TUU.obj ctrmv_TUN.obj ctrmv_TLU.obj ctrmv_TLN.obj ctrmv_RUU.obj ctrmv_RUN.obj ctrmv_RLU.obj ctrmv_RLN.obj ctrmv_CUU.obj ctrmv_CUN.obj ctrmv_CLU.obj ctrmv_CLN.obj ctrsv_NUU.obj ctrsv_NUN.obj ctrsv_NLU.obj ctrsv_NLN.obj ctrsv_TUU.obj ctrsv_TUN.obj ctrsv_TLU.obj ctrsv_TLN.obj ctrsv_RUU.obj ctrsv_RUN.obj ctrsv_RLU.obj ctrsv_RLN.obj ctrsv_CUU.obj ctrsv_CUN.obj ctrsv_CLU.obj ctrsv_CLN.obj cgemv_thread_n.obj cgemv_thread_t.obj cgemv_thread_r.obj cgemv_thread_c.obj cgemv_thread_o.obj cgemv_thread_u.obj cgemv_thread_s.obj cgemv_thread_d.obj cger_thread_U.obj cger_thread_C.obj cger_thread_V.obj cger_thread_D.obj csymv_thread_U.obj csymv_thread_L.obj chemv_thread_U.obj chemv_thread_L.obj chemv_thread_V.obj chemv_thread_M.obj csyr_thread_U.obj csyr_thread_L.obj cher_thread_U.obj cher_thread_L.obj cher_thread_V.obj cher_thread_M.obj csyr2_thread_U.obj csyr2_thread_L.obj cher2_thread_U.obj cher2_thread_L.obj cher2_thread_V.obj cher2_thread_M.obj cspr_thread_U.obj cspr_thread_L.obj chpr_thread_U.obj chpr_thread_L.obj chpr_thread_V.obj chpr_thread_M.obj cspr2_thread_U.obj cspr2_thread_L.obj chpr2_thread_U.obj chpr2_thread_L.obj chpr2_thread_V.obj chpr2_thread_M.obj ctrmv_thread_NUU.obj ctrmv_thread_NUN.obj ctrmv_thread_NLU.obj ctrmv_thread_NLN.obj ctrmv_thread_TUU.obj ctrmv_thread_TUN.obj ctrmv_thread_TLU.obj ctrmv_thread_TLN.obj ctrmv_thread_RUU.obj ctrmv_thread_RUN.obj ctrmv_thread_RLU.obj ctrmv_thread_RLN.obj ctrmv_thread_CUU.obj ctrmv_thread_CUN.obj ctrmv_thread_CLU.obj ctrmv_thread_CLN.obj cspmv_thread_U.obj cspmv_thread_L.obj chpmv_thread_U.obj chpmv_thread_L.obj chpmv_thread_V.obj chpmv_thread_M.obj ctpmv_thread_NUU.obj ctpmv_thread_NUN.obj ctpmv_thread_NLU.obj ctpmv_thread_NLN.obj ctpmv_thread_TUU.obj ctpmv_thread_TUN.obj ctpmv_thread_TLU.obj ctpmv_thread_TLN.obj ctpmv_thread_RUU.obj ctpmv_thread_RUN.obj ctpmv_thread_RLU.obj ctpmv_thread_RLN.obj ctpmv_thread_CUU.obj ctpmv_thread_CUN.obj ctpmv_thread_CLU.obj ctpmv_thread_CLN.obj cgbmv_thread_n.obj cgbmv_thread_t.obj cgbmv_thread_r.obj cgbmv_thread_c.obj cgbmv_thread_o.obj cgbmv_thread_u.obj cgbmv_thread_s.obj cgbmv_thread_d.obj csbmv_thread_U.obj csbmv_thread_L.obj chbmv_thread_U.obj chbmv_thread_L.obj chbmv_thread_V.obj chbmv_thread_M.obj ctbmv_thread_NUU.obj ctbmv_thread_NUN.obj ctbmv_thread_NLU.obj ctbmv_thread_NLN.obj ctbmv_thread_TUU.obj ctbmv_thread_TUN.obj ctbmv_thread_TLU.obj ctbmv_thread_TLN.obj ctbmv_thread_RUU.obj ctbmv_thread_RUN.obj ctbmv_thread_RLU.obj ctbmv_thread_RLN.obj ctbmv_thread_CUU.obj ctbmv_thread_CUN.obj ctbmv_thread_CLU.obj ctbmv_thread_CLN.obj zgbmv_n.obj zgbmv_t.obj zgbmv_r.obj zgbmv_c.obj zgbmv_o.obj zgbmv_u.obj zgbmv_s.obj zgbmv_d.obj zhbmv_U.obj zhbmv_L.obj zhbmv_V.obj zhbmv_M.obj zher_U.obj zher_L.obj zher_V.obj zher_M.obj zher2_U.obj zher2_L.obj zher2_V.obj zher2_M.obj zhpmv_U.obj zhpmv_L.obj zhpmv_V.obj zhpmv_M.obj zhpr_U.obj zhpr_L.obj zhpr_V.obj zhpr_M.obj zhpr2_U.obj zhpr2_L.obj zhpr2_V.obj zhpr2_M.obj zsbmv_U.obj zsbmv_L.obj zspmv_U.obj zspmv_L.obj zspr_U.obj zspr_L.obj zspr2_U.obj zspr2_L.obj zsyr_U.obj zsyr_L.obj zsyr2_U.obj zsyr2_L.obj ztbmv_NUU.obj ztbmv_NUN.obj ztbmv_NLU.obj ztbmv_NLN.obj ztbmv_TUU.obj ztbmv_TUN.obj ztbmv_TLU.obj ztbmv_TLN.obj ztbmv_RUU.obj ztbmv_RUN.obj ztbmv_RLU.obj ztbmv_RLN.obj ztbmv_CUU.obj ztbmv_CUN.obj ztbmv_CLU.obj ztbmv_CLN.obj ztbsv_NUU.obj ztbsv_NUN.obj ztbsv_NLU.obj ztbsv_NLN.obj ztbsv_TUU.obj ztbsv_TUN.obj ztbsv_TLU.obj ztbsv_TLN.obj ztbsv_RUU.obj ztbsv_RUN.obj ztbsv_RLU.obj ztbsv_RLN.obj ztbsv_CUU.obj ztbsv_CUN.obj ztbsv_CLU.obj ztbsv_CLN.obj ztpmv_NUU.obj ztpmv_NUN.obj ztpmv_NLU.obj ztpmv_NLN.obj ztpmv_TUU.obj ztpmv_TUN.obj ztpmv_TLU.obj ztpmv_TLN.obj ztpmv_RUU.obj ztpmv_RUN.obj ztpmv_RLU.obj ztpmv_RLN.obj ztpmv_CUU.obj ztpmv_CUN.obj ztpmv_CLU.obj ztpmv_CLN.obj ztpsv_NUU.obj ztpsv_NUN.obj ztpsv_NLU.obj ztpsv_NLN.obj ztpsv_TUU.obj ztpsv_TUN.obj ztpsv_TLU.obj ztpsv_TLN.obj ztpsv_RUU.obj ztpsv_RUN.obj ztpsv_RLU.obj ztpsv_RLN.obj ztpsv_CUU.obj ztpsv_CUN.obj ztpsv_CLU.obj ztpsv_CLN.obj ztrmv_NUU.obj ztrmv_NUN.obj ztrmv_NLU.obj ztrmv_NLN.obj ztrmv_TUU.obj ztrmv_TUN.obj ztrmv_TLU.obj ztrmv_TLN.obj ztrmv_RUU.obj ztrmv_RUN.obj ztrmv_RLU.obj ztrmv_RLN.obj ztrmv_CUU.obj ztrmv_CUN.obj ztrmv_CLU.obj ztrmv_CLN.obj ztrsv_NUU.obj ztrsv_NUN.obj ztrsv_NLU.obj ztrsv_NLN.obj ztrsv_TUU.obj ztrsv_TUN.obj ztrsv_TLU.obj ztrsv_TLN.obj ztrsv_RUU.obj ztrsv_RUN.obj ztrsv_RLU.obj ztrsv_RLN.obj ztrsv_CUU.obj ztrsv_CUN.obj ztrsv_CLU.obj ztrsv_CLN.obj zgemv_thread_n.obj zgemv_thread_t.obj zgemv_thread_r.obj zgemv_thread_c.obj zgemv_thread_o.obj zgemv_thread_u.obj zgemv_thread_s.obj zgemv_thread_d.obj zger_thread_U.obj zger_thread_C.obj zger_thread_V.obj zger_thread_D.obj zsymv_thread_U.obj zsymv_thread_L.obj zhemv_thread_U.obj zhemv_thread_L.obj zhemv_thread_V.obj zhemv_thread_M.obj zsyr_thread_U.obj zsyr_thread_L.obj zher_thread_U.obj zher_thread_L.obj zher_thread_V.obj zher_thread_M.obj zsyr2_thread_U.obj zsyr2_thread_L.obj zher2_thread_U.obj zher2_thread_L.obj zher2_thread_V.obj zher2_thread_M.obj zspr_thread_U.obj zspr_thread_L.obj zhpr_thread_U.obj zhpr_thread_L.obj zhpr_thread_V.obj zhpr_thread_M.obj zspr2_thread_U.obj zspr2_thread_L.obj zhpr2_thread_U.obj zhpr2_thread_L.obj zhpr2_thread_V.obj zhpr2_thread_M.obj ztrmv_thread_NUU.obj ztrmv_thread_NUN.obj ztrmv_thread_NLU.obj ztrmv_thread_NLN.obj ztrmv_thread_TUU.obj ztrmv_thread_TUN.obj ztrmv_thread_TLU.obj ztrmv_thread_TLN.obj ztrmv_thread_RUU.obj ztrmv_thread_RUN.obj ztrmv_thread_RLU.obj ztrmv_thread_RLN.obj ztrmv_thread_CUU.obj ztrmv_thread_CUN.obj ztrmv_thread_CLU.obj ztrmv_thread_CLN.obj zspmv_thread_U.obj zspmv_thread_L.obj zhpmv_thread_U.obj zhpmv_thread_L.obj zhpmv_thread_V.obj zhpmv_thread_M.obj ztpmv_thread_NUU.obj ztpmv_thread_NUN.obj ztpmv_thread_NLU.obj ztpmv_thread_NLN.obj ztpmv_thread_TUU.obj ztpmv_thread_TUN.obj ztpmv_thread_TLU.obj ztpmv_thread_TLN.obj ztpmv_thread_RUU.obj ztpmv_thread_RUN.obj ztpmv_thread_RLU.obj ztpmv_thread_RLN.obj ztpmv_thread_CUU.obj ztpmv_thread_CUN.obj ztpmv_thread_CLU.obj ztpmv_thread_CLN.obj zgbmv_thread_n.obj zgbmv_thread_t.obj zgbmv_thread_r.obj zgbmv_thread_c.obj zgbmv_thread_o.obj zgbmv_thread_u.obj zgbmv_thread_s.obj zgbmv_thread_d.obj zsbmv_thread_U.obj zsbmv_thread_L.obj zhbmv_thread_U.obj zhbmv_thread_L.obj zhbmv_thread_V.obj zhbmv_thread_M.obj ztbmv_thread_NUU.obj ztbmv_thread_NUN.obj ztbmv_thread_NLU.obj ztbmv_thread_NLN.obj ztbmv_thread_TUU.obj ztbmv_thread_TUN.obj ztbmv_thread_TLU.obj ztbmv_thread_TLN.obj ztbmv_thread_RUU.obj ztbmv_thread_RUN.obj ztbmv_thread_RLU.obj ztbmv_thread_RLN.obj ztbmv_thread_CUU.obj ztbmv_thread_CUN.obj ztbmv_thread_CLU.obj ztbmv_thread_CLN.obj
make[1]: Leaving directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/driver/level2'
make[1]: Entering directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/driver/level3'
gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=cgemm_cr -DASMFNAME=cgemm_cr_ -DNAME=cgemm_cr_ -DCNAME=cgemm_cr -DCHAR_NAME=\"cgemm_cr_\" -DCHAR_CNAME=\"cgemm_cr\" -DNO_AFFINITY -I../.. -UDOUBLE -DCOMPLEX -c -UDOUBLE -DCOMPLEX -DCR gemm.c -o cgemm_cr.obj
<command-line>:0:4: error: expected identifier or '(' before numeric constant
make[1]: *** [cgemm_cr.obj] Error 1
make[1]: Leaving directory `/d/Downloads/OpenBLAS/OpenBLAS-0.2.20/driver/level3'
make: *** [libs] Error 1
DESKTOP-DI9LHTR /d/Downloads/OpenBLAS/OpenBLAS-0.2.20
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-7.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 7.3.0 (Rev1, Built by MSYS2 project)
DESKTOP-DI9LHTR /d/Downloads/OpenBLAS/OpenBLAS-0.2.20
$ gfortran -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gfortran.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-7.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 7.3.0 (Rev1, Built by MSYS2 project)
What could be the source of this error?
<command-line>:0:4: error: expected identifier or '(' before numeric constant
Sorry, I have no idea right now what could have happened here. gemm.c basically just includes other files and the error message makes it hard to determine which line could not be interpreted. Could you try building from a snapshot of the current develop branch rather than 0.2.20 to see if it is something that was incidentally fixed in the meantime ?
Still have the same error. Also, I haven't mentioned that it had 2 warnings during the compilation (if it matters).
$ ./quickbuild.win64
Please read https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio
ln: failed to create symbolic link 'libopenblas.a': No such file or directory
make: [Makefile:138: libs] Error 1 (ignored)
make[1]: Entering directory '/d/Downloads/OpenBLAS/OpenBLAS-develop/interface'
gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=saxpy -DASMFNAME=saxpy_ -DNAME=saxpy_ -DCNAME=saxpy -DCHAR_NAME=\"saxpy_\" -DCHAR_CNAME=\"saxpy\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX -c axpy.c -o saxpy.obj
...
...
...
gcc -c -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=slaswp -DASMFNAME=slaswp_ -DNAME=slaswp_ -DCNAME=slaswp -DCHAR_NAME=\"slaswp_\" -DCHAR_CNAME=\"slaswp\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX lapack/laswp.c -o slaswp.obj
lapack/laswp.c: In function 'slaswp_':
lapack/laswp.c:100:8: warning: passing argument 12 of 'blas_level1_thread' from incompatible pointer type [-Wincompatible-pointer-types]
laswp[flag], nthreads);
^~~~~
In file included from ../common.h:777:0,
from lapack/laswp.c:40:
../common_thread.h:177:5: note: expected 'int (*)()' but argument is of type 'int (*)(BLASLONG, BLASLONG, BLASLONG, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG) {aka int (*)(long long int, long long int, long long int, float, float *, long long int, float *, long long int, int *, long long int)}'
int blas_level1_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha,
^~~~~~~~~~~~~~~~~~
gcc -c -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=sgesv -DASMFNAME=sgesv_ -DNAME=sgesv_ -DCNAME=sgesv -DCHAR_NAME=\"sgesv_\" -DCHAR_CNAME=\"sgesv\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX lapack/gesv.c -o sgesv.obj
...
...
...
gcc -c -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=claswp -DASMFNAME=claswp_ -DNAME=claswp_ -DCNAME=claswp -DCHAR_NAME=\"claswp_\" -DCHAR_CNAME=\"claswp\" -DNO_AFFINITY -I.. -I. -UDOUBLE -DCOMPLEX lapack/zlaswp.c -o claswp.obj
lapack/zlaswp.c: In function 'claswp_':
lapack/zlaswp.c:99:80: warning: passing argument 12 of 'blas_level1_thread' from incompatible pointer type [-Wincompatible-pointer-types]
blas_level1_thread(mode, n, k1, k2, dummyalpha, a, lda, NULL, 0, ipiv, incx, laswp[flag], nthreads);
^~~~~
In file included from ../common.h:777:0,
from lapack/zlaswp.c:40:
../common_thread.h:177:5: note: expected 'int (*)()' but argument is of type 'int (*)(BLASLONG, BLASLONG, BLASLONG, float, float, float *, BLASLONG, float *, BLASLONG, blasint *, BLASLONG) {aka int (*)(long long int, long long int, long long int, float, float, float *, long long int, float *, long long int, int *, long long int)}'
int blas_level1_thread(int mode, BLASLONG m, BLASLONG n, BLASLONG k, void *alpha,
^~~~~~~~~~~~~~~~~~
gcc -c -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=cgesv -DASMFNAME=cgesv_ -DNAME=cgesv_ -DCNAME=cgesv -DCHAR_NAME=\"cgesv_\" -DCHAR_CNAME=\"cgesv\" -DNO_AFFINITY -I.. -I. -UDOUBLE -DCOMPLEX lapack/gesv.c -o cgesv.obj
...
...
...
gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=cgemm_tr -DASMFNAME=cgemm_tr_ -DNAME=cgemm_tr_ -DCNAME=cgemm_tr -DCHAR_NAME=\"cgemm_tr_\" -DCHAR_CNAME=\"cgemm_tr\" -DNO_AFFINITY -I../.. -UDOUBLE -DCOMPLEX -c -UDOUBLE -DCOMPLEX -DTR gemm.c -o cgemm_tr.obj
gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=cgemm_cr -DASMFNAME=cgemm_cr_ -DNAME=cgemm_cr_ -DCNAME=cgemm_cr -DCHAR_NAME=\"cgemm_cr_\" -DCHAR_CNAME=\"cgemm_cr\" -DNO_AFFINITY -I../.. -UDOUBLE -DCOMPLEX -c -UDOUBLE -DCOMPLEX -DCR gemm.c -o cgemm_cr.obj
<command-line>:0:4: error: expected identifier or '(' before numeric constant
make[1]: *** [Makefile:365: cgemm_cr.obj] Error 1
make[1]: Leaving directory '/d/Downloads/OpenBLAS/OpenBLAS-develop/driver/level3'
make: *** [Makefile:139: libs] Error 1
I really have no idea, maybe the problem with the compiler? So basically, I installed MinGW from the above site and just installed mingw64, msys, gcc, and gfortran package using pacman -S command. Should I try with another compiler?
Maybe try an older version of the mingw gcc.
Had the same <command-line>:0:4: error: expected identifier or '(' before numeric constant error.
Following steps helped me:
pacman -S make - installs make util.pacman -S gcc-fortran - installs gfortran together with gcc and all needed. By default provides older 6.4.0 version.pacman -S perl - installs Perl (required for build process). After that I was able to build library, though got strange linking-error at the very begin and a bunch of warnings during build process
Thank you very much for that feedback, I have updated the wiki page accordingly (I hope).
Please correct me if I am wrong, but doesn't @nikudyshko instructions link in the MSYS2 library and not create a native windows binary? I believe the MinGW compiler must be used, in which case I am getting the same error that @wittgithub was getting.
I do not understand your comment about "believe the MinGW compiler must be used" - msys2 alone (without the pacman -S gcc) does not provide a compiler, or does it ?
The standard MSYS2 subsystem alone does not provide a compiler, but one can be added using pacman as you described. I believe the one added through pacman -S gcc is not the MinGW compiler, but one specific to the MSYS2 subsystem. For native windows programs the mingw32 or mingw64 subsystems should be used (pacman -S mingw-w64-i686-toolchain or pacman -S mingw-w64-x86_64-toolchain).
Here is a page I found with more info about the subsystems:
https://github.com/msys2/msys2/wiki/MSYS2-introduction
So the instructions in the wiki should be for mingw-w64-gcc-fortran rather than gcc-fortran... and if that is expected to produce more windows-like binaries perhaps it pulls in a windows10 header that contains some confliction declaration of a variable or similar.
Unfortunately the error location of <command line>:0:4 is not likely to help track this down.
I have reverted my wiki change now.
Unfortunately, @Draino23 has right - dynamic library indeed links with some msys2 dll-s. I didn't realized it in time becouse I use static OpenBLAS lib, which works fine for me. But of course, it's better to find another way to build library. My apologies.
The offending file (driver/level3/gemm.c) boils down to
#include <stdio.h>
#include "common.h"
#include "level3.c"
if the problem was with the actual header files, it should have occured earlier. So this seems to leave level3.c itself which starts with lots of macro definitions. The last change of that file removed a number of seemingly unnnecessary parentheses, but that happened months after 0.2.20 was released (which seems to be what at least wittgithub was building) so probably unrelated.
Perhaps if you tried to invoke the mingw-gcc on level3.c directly, it would be able to give a better location for the error ?
(Searching for the message brought up mingw bug 2183, where definitions from the gcc command line were applied case-insensitive. so could clash with lowercase variable names in the code. But that was supposedly fixed with their version of gcc 4.8.2)
@martin-frbg So, I've tried to invoke mingw-gcc (7.3.0) on level3.c and got the following:
Desktop\OpenBLAS\driver\level3>gcc level3.c
level3.c:172:11: error: unknown type name 'blas_arg_t'
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
level3.c:172:29: error: unknown type name 'BLASLONG'
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
level3.c:172:48: error: unknown type name 'BLASLONG'
int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n,
level3.c:173:5: error: unknown type name 'XFLOAT'
XFLOAT *sa, XFLOAT *sb, BLASLONG dummy){
level3.c:173:17: error: unknown type name 'XFLOAT'
XFLOAT *sa, XFLOAT *sb, BLASLONG dummy){
level3.c:173:29: error: unknown type name 'BLASLONG'
XFLOAT *sa, XFLOAT *sb, BLASLONG dummy){
Update 1: got the same errors with command line gcc -m64 -I../.. -DCR ../../param.h gemm.c level3.c
Update 2: added #include "common.h to level3.c-file and run gcc -O2 -m64 -I../.. -c -DCR level3.c -o lev.obj and it has been successfully executed without any error. I have no idea what's wrong...
After that I decided to try direct execution of this single line
gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DASMNAME=cgemm_cr -DASMFNAME=cgemm_cr_ -DNAME=cgemm_cr_ -DCNAME=cgemm_cr -DCHAR_NAME=\"cgemm_cr_\" -DCHAR_CNAME=\"cgemm_cr\" -DNO_AFFINITY -I../.. -UDOUBLE -DCOMPLEX -c -UDOUBLE -DCOMPLEX -DCR gemm.c -o cgemm_cr.obj
and it has been successfully executed without any error
@rathaROG how did you build it ? If it is a pure VS build, performance will probably be not optimal as the Microsoft tools cannot handle the assembly kernels.
@martin-frbg yes it is pure VS an it does not include all like lapacke & cblas.. that's why I deleted my previous comment. My apology.
So, I now have been able to build OpenBlas 2.20 using mingw-64 (x86_64-7.3.0-posix-seg-rt_v5-rev0) that I installed using the online installer from source forge (https://sourceforge.net/projects/mingw-w64/).
I am using the MSYS subsystem base (so no gcc in in PATH) with make and perl installed through pacman, and then add the new mingw-64 bin directory to PATH. Then I am able to make with no errors. I also had it work with the gcc 6.3 version from the sourceforge installer.
Perhaps something is wrong with the gcc installed through pacman in MSYS2?
@rathaROG, could you detail the steps you used? Were they different from what's on the wiki?
Finaly built this lib (with gcc 7.3.0). I used the way, similar to @Draino23 described. The main point is to install mingw64 with original installation file from sourceforge but not via pacman.
@kernhanda I just followed the wiki. It's simple like that.
This is how I did it:
@ratharog so you used the msys and mingw from sourceforge (original mingw-w64 project I think), not the msys2 from msys2.org that is currently suggested in the wiki ? It seems the switch from one to the other was made in early january by xoviat so the implication is that it should have worked at that point. (Seems that account no longer exists unfortunately, so not possible to ask directly)
@martin-frbg there are many update revisions for the instruction lately... and yes, you're correct that I use the original mingw & msys. Since I'm happy with the original mingw & msys and they never bother me, I have never tried that msys2 from msys2.org.
I know about the revisions (and I am guilty of some of them myself), that is where I found out when msys2.org was introduced. (I think this was also discussed in an issue or PR at the time, but cannot seem to find it).
Reproducible with Win10, msys2 from msys2.org and pacman installation of mingw-w64-x86_64_gcc, the causal factor appears to be the -DCR (though -DNR, which maps to the same ifdefs in the .c file works fine)
This indeed looks as if mingw bug 2183 (as I mentioned earlier) either was never fixed in the branch used by the msys2 folks, or it somehow reappeared: If I change all the "CR" to "CRX" both in the level3 Makefile and in the files that have "if defined(CR)", the build completes without further issues.
I have now changed the wiki page to (again) recommend getting mingw-w64 from sourceforge.net, and have added a note about the problem with the version from msys2/pacman.
For those who use something like pacman -S mingw-w64-x86_64-toolchain to install gcc, please downgrade mingw-w64-x86_64-crt-git, mingw-w64-x86_64-headers-git, and mingw-w64-x86_64-tools-git by (assume x64):
pacman -U mingw-w64-x86_64-crt-git-6.0.0.5100.739199f8-1-any.pkg.tar.xz
pacman -U mingw-w64-x86_64-headers-git-6.0.0.5102.2f16a8c7-1-any.pkg.tar.xz
pacman -U mingw-w64-x86_64-tools-git-6.0.0.5079.3b7a42fd-1-any.pkg.tar.xz
All packages can be downloaded from http://repo.msys2.org/
So is/was this a known problem in recent msys2 toolchains @econwang, or did you happen to know from experience that building with that particular version worked before ? In any case I have updated the wiki page with that information now, thank you very much.
This is the most recent version I have tested with gcc version 7.3.0 (Rev1, Built by MSYS2 project) @martin-frbg
Just trying to gather some information that would allow the msys2 folks to fix the underlying problem, I must admit I do not know the mingw code layout (as compared to gcc on Linux). crt is probably the runtime library (equivalent of libc.so), headers sounds like just that, so that would leave only something in the "tools" package as the culprit if the core gcc 7.3.0 itself works ?
From the msys2 issue ticket, this problem appears to have been introduced only very recently - probably at most four weeks before the start of this issue thread.
Sure first go /var/cache/pacman/pkg/ and download these packets from the http://repo.msys2.org/ to this folder.Then you can downgrade with pacman -U
For those who use something like pacman -S mingw-w64-x86_64-toolchain to install gcc, please downgrade mingw-w64-x86_64-crt-git, mingw-w64-x86_64-headers-git, and mingw-w64-x86_64-tools-git by (assume x64):
pacman -U mingw-w64-x86_64-crt-git-6.0.0.5100.739199f8-1-any.pkg.tar.xz
pacman -U mingw-w64-x86_64-headers-git-6.0.0.5102.2f16a8c7-1-any.pkg.tar.xz
pacman -U mingw-w64-x86_64-tools-git-6.0.0.5079.3b7a42fd-1-any.pkg.tar.xz
All packages can be downloaded from http://repo.msys2.org/
Had the same problem with MinGW from msys2.org and can confirm the steps from @hsntgm and @econwang work.
The same problem in Arch Linux with mingw-w64-headers-git.
This problem seems start from this commit in mingw-w64 https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0f9569488ba7e48472183765a7ae6555ed990f4a
Thank you for tracking down this commit, I admit I was not even sure which tree msys2 was pulling from.
struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY near the end of that commit at least defines a dword CR that appears to be clashing with OpenBLAS' -DCR. Now are these clashes between compiler-specific headers and user code expected on Windows (seems like everybody using latin alphabet would run out of identifiers fast if that were the case), or did the header change just precipitate a pre-existing problem in a parser ?
That struct actually seems to originate from the Windows10 winnt.h, still not sure if it should legitimately clash with our #define (and if so, why this did not come up with VS or clang on Windows).
workaround: use -DCR=CR to define CR and leave 'CR' in weinnt.h untouched
Thanks. If this turns out to be a real OS header clash (even if forced on us by the OS vendor), it might make sense to rename the OpenBLAS parameters to something like OB_NN,...,OB_CR,...,OB_RR to reduce the risk of further conflicts.
at winnt.h line 7241:
DWORD CR : 2;
but the macro -DCR in the commandline make this wrong .
Maybe you can edit Makefile in driver/level3, replace -DCR into -DCR=CR as pingplug suggested, then it work.
Clang can track it but gcc cannot.
Got it now, thanks. PR incoming, and I guess I need to apologize to the msys2 folks...
Most helpful comment
workaround: use -DCR=CR to define CR and leave 'CR' in weinnt.h untouched