Open luoweb opened 1 year ago
you seem to miss opencv2 header files. you can either drop stablediffusion
from your GO_TAGS
or install opencv2.
unset GO_TAGS; exec " make build" still compile error:
d531acb055ac8a858f032d3e19"" -tags "" -o local-ai ./
# github.com/go-skynet/LocalAI/pkg/whisper
pkg/whisper/whisper.go:76:34: not enough arguments in call to context.Process
have ([]float32, nil)
want ([]float32, "github.com/ggerganov/whisper.cpp/bindings/go/pkg/whisper".SegmentCallback, "github.com/ggerganov/whisper.cpp/bindings/go/pkg/whisper".ProgressCallback)
# github.com/go-skynet/go-bert.cpp
In file included from gobert.cpp:6:
go-bert/bert.cpp/bert.cpp:693:74: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
# github.com/go-skynet/go-llama.cpp
binding.cpp:634:15: warning: 'llama_init_from_file' is deprecated: please use llama_load_model_from_file combined with llama_new_context_with_model instead [-Wdeprecated-declarations]
go-llama/llama.cpp/llama.h:162:15: note: 'llama_init_from_file' has been explicitly marked deprecated here
go-llama/llama.cpp/llama.h:30:56: note: expanded from macro 'DEPRECATED'
# github.com/go-skynet/go-ggml-transformers.cpp
replit.cpp:65:50: warning: format specifies type 'int' but the argument has type 'std::vector<unsigned long>::value_type' (aka 'unsigned long') [-Wformat]
make: *** [build] Error 1
seems you are using master, that was just fixed in https://github.com/go-skynet/LocalAI/pull/702.
run git pull
again
you seem to miss opencv2 header files. you can either drop
stablediffusion
from yourGO_TAGS
or install opencv2. opencv@2 has been disabled
(base) block@192 LocalAI % brew install opencv@2
Warning: No remote 'origin' in /opt/homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
Running brew update --auto-update
...
Error: opencv@2 has been disabled because it is not supported upstream!
seems you are using master, that was just fixed in #702.
run
git pull
again
it's OK now without GO_TAGS
I had the same issue and resolved it by:
cd go-stable-diffusion
ln -s /usr/include/opencv4/opencv2 opencv2
It may be worth noting that I did this on a linux box and not on MacOS, though it seemed to solve the same problem.
Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!
_but.... I can also be funny or helpful :smilecat: and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.
Don't engage in conversation with me, I don't support (yet) replying!
The issue seems to be related to the use of C++11 atomic operations in the NCNN library, which are not supported on macOS Mojave (released in 2018) and earlier. The error message suggests that the code is compiled with -std=c++17 flag, which may also be causing issues with the older version of OpenCV used by the LocalAI project. To fix this issue, you can try the following:
Sources:
I got the same error
LocalAI version: git commit: commit 0780be022cb709d531acb055ac8a858f032d3e19 (HEAD -> master, origin/master, origin/HEAD)
Environment, CPU architecture, OS, and Version: Mac OS 13.4 M2 Pro
Describe the bug compile error with BUILD_TYPE=metal build GO_TAGS=stablediffusion,tts
To Reproduce make BUILD_TYPE=metal build
Expected behavior build local-ai
Logs as bug describes
Additional context v1.19.2 compile normal