Issues compiling in mingw-w64

88 views
Skip to first unread message

David Alldredge

unread,
Aug 27, 2020, 5:22:32 PM8/27/20
to openbla...@googlegroups.com
I generally have used Visual Studio to compile Windows applications that use the Intel MKL.  Recently, a set of codes I use from a different group at work will not work with the version of VS I have. So, instead of buying the latest version, I have gone down the path of trying to get mingw-w64 with MSYS to cross compile a Windows application.  I have everything working except the inclusion of OpenBLAS. I am sure I have made several mistakes along the way so I will lay out what I have done in hopes that someone can point me in the right direction.
First I used the mingw-w64 online installer from here and ended up with this build: x86_64-8.1.0-win32-seh-rt_v6-rev0. It installed to c:\Program Files\x86_64... but I decided to manually move it to c:\mingw-w64 such that the bin folder is at c:\mingw-w6\bin . I saw a post somewhere about not having spaces in the path so that is why I moved it.
Second, I downloaded MSYS 20111123 from here.  I placed that package at C:\msys
Third, I downloaded the OpenBLAS set of files from here. I placed those at C:\xianyi-OpenBLAS-63b03ef
Fourth, I tried to compile the OpenBLAS using the supplied make file from within MSYS. First, I added C:\mingw-w64\bin to my path in the MSYS window. Next, I tried various make commands and kept getting errors. Here is my last attempted make command:
make QUIET_MAKE=1 TARGET=SKYLAKEX DYNAMIC_ARCH=1 HOSTCC=gcc NUM_THREADS=64 BINARY=64 CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-ming32-gfortran
This got me the furthest in my many attempts. Running just Make failed as well.  For my call above, the first error I get is /bin/sh ./getarch: Bad file number. It seems to make it past this one but I assume this means it is not auto detecting my architecture hence some of the options in my call. The first fatal error I get is trsm.c error: 'GEMM_MULTITHREAD_THRESHOLD' undeclared (first use in this function). Another error is common_param.h: error 'GEMM_DEFAULT_ALIGN' undeclared (first use in this function). Sorry for the long post but I wanted to add too much info and not enough. Thanks in advance for any help.
David
Reply all
Reply to author
Forward
0 new messages