Kagami/go-face

windows run : running g++ failed: exit status 1 cannot find -lblas: No such file or directory

Closed this issue · 5 comments

$ go run main.go

command-line-arguments

C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe
: cannot find -lblas: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe
: cannot find -lcblas: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe
: cannot find -llapack: No such file or directory
collect2.exe: error: ld returned 1 exit status

how dou you solve it?

I solve it by :
pacman -S mingw-w64-x86_64-lapack

I solve it by : pacman -S mingw-w64-x86_64-lapack

I have the same issue, and running that command didn't solve it, and I still encounter the error below.
Can anyone help me to solve it, please ?

$ go run main.go

command-line-arguments

C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcblas: No such file or directory
collect2.exe: error: ld returned 1 exit status

I solve it by : pacman -S mingw-w64-x86_64-lapack

I have the same issue, and running that command didn't solve it, and I still encounter the error below. Can anyone help me to solve it, please ?

$ go run main.go

command-line-arguments

C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcblas: No such file or directory collect2.exe: error: ld returned 1 exit status

i solve it by :
// #cgo CXXFLAGS: -std=c++1z -Wall -O3 -DNDEBUG -march=native
// #cgo LDFLAGS: -ldlib -lblas -lcblas -llapack -ljpeg
// #include <stdlib.h>
// #include <stdint.h>
// #include "facerec.h"

change this to :

// #cgo CXXFLAGS: -std=c++1z -Wall -O3 -DNDEBUG -march=x86-64
// #cgo LDFLAGS: -ldlib -lopenblas -ljpeg
// #include <stdlib.h>
// #include <stdint.h>
// #include "facerec.h"

已解决