elmerfem icon indicating copy to clipboard operation
elmerfem copied to clipboard

fhuti has LAPACK issues on MSYS2

Open Foadsf opened this issue 4 years ago • 0 comments

I opened two new branches tonight, wip/windows for compiling on MSYS2 and a subbranch wip/metis for removing the metis blob and use off the shelf libraries. Cleaned up the Cmake files a bit. borrowed some code from Egen project.... CMake successfully generates MakeFiles but when compiling I get this error:

[ 43%] Linking C static library libumfpack.a
mingw32-make[2]: Leaving directory 'C:/foobar/elmerfem/build'
[ 43%] Built target umfpack
mingw32-make[2]: Entering directory 'C:/foobar/elmerfem/build'
mingw32-make[2]: Leaving directory 'C:/foobar/elmerfem/build'
[ 43%] Built target amdf77
mingw32-make[2]: Entering directory 'C:/foobar/elmerfem/build'
mingw32-make[2]: Leaving directory 'C:/foobar/elmerfem/build'
[ 46%] Built target amd
mingw32-make[2]: Entering directory 'C:/foobar/elmerfem/build'
mingw32-make[2]: Leaving directory 'C:/foobar/elmerfem/build'
mingw32-make[2]: Entering directory 'C:/foobar/elmerfem/build'
[ 46%] Linking Fortran shared library msys-fhuti.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.snrm2_[.refptr.snrm2_]+0x0): undefined reference to `snrm2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.sdot_[.refptr.sdot_]+0x0): undefined reference to `sdot_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.dnrm2_[.refptr.dnrm2_]+0x0): undefined reference to `dnrm2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.ddot_[.refptr.ddot_]+0x0): undefined reference to `ddot_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.cdotc_[.refptr.cdotc_]+0x0): undefined reference to `cdotc_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.scnrm2_[.refptr.scnrm2_]+0x0): undefined reference to `scnrm2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.cdotu_[.refptr.cdotu_]+0x0): undefined reference to `cdotu_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.zdotc_[.refptr.zdotc_]+0x0): undefined reference to `zdotc_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.dznrm2_[.refptr.dznrm2_]+0x0): undefined reference to `dznrm2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/fhuti.dir/huti_sfe.F90.o:huti_sfe.F90:(.rdata$.refptr.zdotu_[.refptr.zdotu_]+0x0): undefined reference to `zdotu_'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [fhutiter/src/CMakeFiles/fhuti.dir/build.make:219: fhutiter/src/msys-fhuti.dll] Error 1
mingw32-make[2]: Leaving directory 'C:/foobar/elmerfem/build'
mingw32-make[1]: *** [CMakeFiles/Makefile2:450: fhutiter/src/CMakeFiles/fhuti.dir/all] Error 2
mingw32-make[1]: Leaving directory 'C:/foobar/elmerfem/build'
mingw32-make: *** [Makefile:163: all] Error 2

which I think is because the HUTI library can't find some LAPACK routines or something. I have no idea what this library does, so some help on this would be really nice. plus if we could .gitmodules or an external package manager to get the HUTI library it would much better than just putting the code inside the codebase.

Foadsf avatar Apr 09 '20 01:04 Foadsf