-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Can not compile on FreeBSD 13 #984
Comments
I only scanned the linked topics, but this appears to be a problem upstream in FreeBSD's TL;DR: We're compiling with See: |
@juanmitaboada The following patch will make it build on FreeBSD (below is tested on 13.0) diff --git a/Makefile b/Makefile
index f30c2ac..87c79e1 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,10 @@ else
SSL_LDFLAGS+=-L$(OPENSSL_PREFIX)/lib -lssl -lcrypto
endif
+ifeq ($(uname_S),FreeBSD)
+ LDFLAGS+=-lm
+endif
+
ifeq ($(uname_S),SunOS)
IS_SUN_CC=$(shell sh -c '$(CC) -V 2>&1 |egrep -i -c "sun|studio"')
ifeq ($(IS_SUN_CC),1)
@@ -231,7 +235,7 @@ check: hiredis-test
TEST_SSL=$(USE_SSL) ./test.sh
.c.o:
- $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
+ $(CC) -std=c99 -c $(REAL_CFLAGS) $<
clean:
rm -rf $(DYLIBNAME) $(STLIBNAME) $(SSL_DYLIBNAME) $(SSL_STLIBNAME) $(TESTS) $(PKGCONFNAME) examples/hiredis-example* *.o *.gcda *.gcno *.gcov Or you can leave -pedantic in and compile with GCC I.e gmake CC=gcc |
After a fresh clone from the repo and trying with gmake, I get the next error:
The text was updated successfully, but these errors were encountered: