Closed Chunosov closed 7 years ago
But after the lib has been compiled in this way, linking is failed too...
Cannot export openblas_get_parallel: symbol not defined
../libopenblas_nehalem-r0.2.19.a(cblas_saxpy.obj):axpy.c:(.text+0x52): undefined
reference to `blas_cpu_number'
../libopenblas_nehalem-r0.2.19.a(cblas_saxpy.obj):axpy.c:(.text+0xc2): undefined
reference to `blas_level1_thread'
../libopenblas_nehalem-r0.2.19.a(cblas_sscal.obj):scal.c:(.text+0x32): undefined
reference to `blas_cpu_number'
../libopenblas_nehalem-r0.2.19.a(cblas_sscal.obj):scal.c:(.text+0x9f): undefined
reference to `blas_level1_thread'
It seems that unable to buid openblas without fortran.
I have to replace make command in the file CK\ck-math\package\lib-openblas-0.2.19-universal\scripts.win\install.bat
:
mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1
replace with
make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% CC=gcc FC=gfortran
which is taken (except of PREFIX) from the 'official' installation script of openblas quickbuild.win32
and only then openblas was built successfully
I did various fixes (added Unix Utils detection from installed Git + Perl dependency) and it seems to be compiling fine on a new and clean machine (Surface Pro 4 with Win 10) ... I close this ticket. Thanks for reporting!
To make lib-openblas compile I had to add its source path (e.g. c:\Users\Administrator\CK-TOOLS\lib-openblas-0.2.19-mcl-compiler.gcc-5.3.0-windows-32\src) into PATH variable. Otherwise make cant find openblas's util getarch (that is already built at that time) and cant generate config.h properly and compilation fails. cd to this folder does't help.