-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to build on macOS (m2 max, sonoma 14.2) with stablediffusion
enabled.
#1443
Comments
|
I have the same issue. Any idea how to solve it? |
Any update on this? I got it on Sonoma with another software, but linker error looks identical. |
No, I was not able to compile it with stable diffusion enabled. Meanwhile I could not even get the latest version compiled anymore. But I haven't had time to look into it in the last 4 weeks, maybe things changed again. |
I reproduced the issue. Still
|
Aye, I could build it with stable diffusion support. after I had the failure, I checked the archive with
as we can see, 2 SYMDEF Files, which is what the error message says. In the makefile for go-stable-diffusion we create a list of files from the folder unpack/*
In this folder, there exists a file called __.SYMDEF which I removed.
Seems like the linker on linux just takes the first SYMDEF file and tolerates multiple of them in the archive while on Mac, the linker fails and does not link against an archive with multiples of them.. |
Currently it's still failing, but with another error message:
Even with your fixes applied @jamu85 (it looks like some of the fixes have been reverted from |
just cloned https://github.com/Tencent/ncnn in sources/go-stable-diffusion removed the error. But i still have some linking errors on my side. |
LocalAI version:
commit: 7641f92
Environment, CPU architecture, OS, and Version:
Mac Studio 2023
M2 max 32 GB
mac0S sonoma 14.2
Describe the bug
It cannot be built with
stablediffusion
enabled on my macOS box. There are serveral issues resulting to the failure. I fixed part of them.Header issues:
Missing opencv headers. I solved this issue by installing the opencv library by homebrew:
and create a symbolic link to it in the
sources/go-stable-diffusion/
directory manually.The ncnn header file paths are incorrect in the
sources/go-stable-diffusion/stablediffusion.hpp
file, which will result in header file not found error.Library issues:
I cannot link to the
gomp
library. I modified thesources/go-stable-diffusion/stablediffusion.go
to make it to link to theomp
library, after installing it withLink issue:
It reports "ld: multiple SYMDEF member files found in an archive in '/path/to/LocalAI/sources/go-stable-diffusion/libstablediffusion.a'", which is beyond my ability to solve the problem.
To Reproduce
make BUILD_TYPE=metal GO_TAGS="tts stablediffusion" build
cd sources/go-stable-diffusion/ git apply modifications.patch ln -s /opt/homebrew/include/opencv4/opencv2 ln -s /opt/homebrew/Cellar/opencv/4.8.1_5/lib/libopencv_core.a ln -s /opt/homebrew/Cellar/opencv/4.8.1_5/lib/libopencv_imgcodecs.a ln -s /opt/homebrew/Cellar/libomp/17.0.6/lib/libomp.a
Expected behavior
Successful build with 'stablediffusion' enabled.
Logs
Additional context
modifications.patch
The text was updated successfully, but these errors were encountered: