Build errors on macOS
-
./configure
fails with syntax error:
./configure: line 15229: syntax error near unexpected token `-fsanitize-address-use-after-scope,'
./configure: line 15229: ` AX_CHECK_COMPILE_FLAG(-fsanitize-address-use-after-scope, CFLAGS="$CFLAGS -fsanitize-address-use-after-scope")'
I've found a reference to a similar error with libpsl
, but could not locate the fix itself:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881397
Then I tried copying this file:
https://github.com/rockdaboot/libpsl/blob/master/m4/ax_check_compile_flag.m4
to an m4
directory inside libhsts
, and it made the error disappear. I'm not sure if this is the ultimate solution though.
-
sed
doesn't have a-i
option on macOS. The fix is to updatetests/Makefile.am
as follows:
--- tests/Makefile.am-ORI 2018-09-29 15:07:44.000000000 +0000
+++ tests/Makefile.am 2018-10-01 12:33:09.000000000 +0000
@@ -24,7 +24,7 @@
$(HSTS_FILE):
if ! test -f $(HSTS_FILE); then \
wget -O$(HSTS_FILE) https://raw.github.com/chromium/chromium/master/net/http/transport_security_state_static.json && \
- sed -i 's/^ *\/\/.*$$//g' $(HSTS_FILE); \
+ sed 's/^ *\/\/.*$$//g' $(HSTS_FILE) > $(HSTS_FILE).tmp && mv -f $(HSTS_FILE).tmp $(HSTS_FILE); \
fi
EXTRA_DIST = $(HSTS_FILE) hsts.dafsa hsts_ascii.dafsa
Edited by Ghost User