Open kmilner opened 8 months ago
Hi, does it work for previous versions before 1.48? I didn't change the macOs makefile. New issue?
This is the first time I've seen the issue myself. Just tested and the base makefile works fine in v1.47.2 and v1.46.1 using the same clang version.
Unfortunately some code change must have caused the linker to hit a bug (in it, not in this repo) it wasn't hitting before.
https://github.com/godotengine/godot/pull/83088/files looks like -ld_classic
does not exist prior to clang 15 based on what godot had to do for fixing builds, so that's not great.
If you want a (hacky) patch that checks the clang version:
diff --git a/Makefile b/Makefile
index 43381581..03086e6a 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,10 @@ endif
ifeq ($(UNAME_S),Darwin)
CFLAGS += -pthread
CXXFLAGS += -pthread
+ CLANG_VER = $(shell clang -v 2>&1 | head -n 1 | awk 'BEGIN {FS="[. ]"};{print $$1 $$2 $$4}')
+ ifeq ($(CLANG_VER),Appleclang15)
+ LDFLAGS += -ld_classic
+ endif
endif
ifeq ($(UNAME_S),FreeBSD)
CFLAGS += -pthread
I don't have a macOS device to test with, but i'll merge the hacky patch. Please let me know if it causes issues. https://github.com/LostRuins/koboldcpp/commit/2b32b170a1473172f26e8954943265978f5b70ac
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
make
compiles the program on ARM MacOSCurrent Behavior
Environment and Context
ARM MacOS Sonoma
Failure Information (for bugs)
This appears to be a bug with the new Apple clang 15 linker.
On Sonoma, it can be fixed with the following patch, which adds the
-ld_classic
linker flag for MacOS:I don't know whether this will cause problems with earlier versions of MacOS though, I'm not sure how long the ld_classic flag has existed.