Compilation of lapack 3.8.0 under MinGW 64bits

Post here if you are having problem installing LAPACK on a Windows machine

Compilation of lapack 3.8.0 under MinGW 64bits

Postby Bentoy » Wed Dec 12, 2018 5:50 am

Hi,

I want to compile BLAS and LAPACKe version 3.8.0 as shared libraries under MinGW 64 bits.
I have performed the compilation under MinGW 5.3.0 32 bits successfully, very straightforward without modifying anything.

Under 64 bits, I have changed all tool paths during cmake configuration for 64 bits tools. Also I have added the option -m64 in CMAKE_Fortran_FLAGS.
Everything is fine for BLAS, but some link errors appear for the test programs, more specifically for the program xblat2c (xblat1x compile without error, strangely), where I get a bunch of redefinition errors like this one:

Code: Select all
C:/Qt/Qt5.9.5/Tools/mingw64_810/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libgfortran.a(open.o):(.text$_gfortran_st_open+0x0): multiple definition of `_gfortran_st_open'
../../lib/libblas.dll.a(d000025.o):(.text+0x0): first defined here

I have about 16 errors of the same kind, all of them pointing on functions on libgfortran.

I turned on the verbose make, to check the command line of this compilation step, I don't see any problem:
Code: Select all
C:\Qt\Qt5.9.5\Tools\mingw64_810\mingw64\bin\gfortran.exe -m64 -O2 -DNDEBUG -O2   -Wl,--whole-archive CMakeFiles\xblat2c.dir/objects.a -Wl,--no-whole-archive  -o ..\..\bin\xblat2c.exe -Wl,--out-implib,..\..\lib\libxblat2c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\xblat2c.dir\linklibs.rsp


To avoid this problem on test programs, I tried to desactivate the compilation of test programs; then I get the same errors during the link of liblapack.

I don't know what to do now to fix this problem. Any help on this will be highly appreciated.

Best,
Benoit
Bentoy
 
Posts: 1
Joined: Tue Dec 11, 2018 12:46 pm

Return to Windows

Who is online

Users browsing this forum: No registered users and 2 guests