I've modified build system again. please consider that as a final effort from me. If you are not happy enough with it, you are free to improve it.
пт, 31 июл. 2020 г. в 14:24, Илья Шипицин <[email protected]>: > > > пт, 31 июл. 2020 г. в 14:14, Willy Tarreau <[email protected]>: > >> On Fri, Jul 31, 2020 at 01:01:49PM +0500, ???? ??????? wrote: >> > From 2fd7431ed6e94fb48332e57ae569f194e38c1b11 Mon Sep 17 00:00:00 2001 >> > From: Ilya Shipitsin <[email protected]> >> > Date: Fri, 31 Jul 2020 12:57:33 +0500 >> > Subject: [PATCH] BUILD: simplify usage of env defined variables >> > >> > if SLZ_INC, SLZ_LIB, ZLIB_INC, ZLIB_LIB, ADDLIB, ADDINC are defined >> > as environment variables they might be picked from Makefile easy. >> >> No, please don't inherit environment variables in makefiles, >> this is a disaster and must never ever be done. This is one >> of the main problems causing builds to randomly fail at various >> places and is the reason why some tools have to perform >> preliminary checks to force you to unset some variables to >> avoid this risk. >> >> The variables in the makefile were purposely defined as empty >> so that they are not accidently inherited from the environment. >> If anyone wants to use them from environment, it's trivial >> enough to pass SSL_LIB=$SSL_LIB SSL_INC=$SSL_INC etc. >> >> > The same way SSL_LIB, SSL_INC are used. >> >> I'd rather take a patch so that SSL_LIB and SSL_INC are purposely >> pre-initialized to empty values for the same reason, and to ensure >> consistency! I think the only reason why it's not the case is that >> given they are conditionally used we didn't notice. >> > > > oooooooooook > > >> >> Thanks! >> Willy >> >
From 80dfadec358d9509c2e56e3fdd9103e88412e00a Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <[email protected]> Date: Tue, 4 Aug 2020 15:36:24 +0500 Subject: [PATCH 1/2] BUILD: require SSL_LIB, SSL_INC to be explicitly set --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 2077ca833..3bfc84b64 100644 --- a/Makefile +++ b/Makefile @@ -533,6 +533,8 @@ OPTIONS_LDFLAGS += -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic) endif ifneq ($(USE_OPENSSL),) +SSL_INC = +SSL_LIB = # OpenSSL is packaged in various forms and with various dependencies. # In general -lssl is enough, but on some platforms, -lcrypto may be needed, # reason why it's added by default. Some even need -lz, then you'll need to -- 2.26.2
From be15b4b6b29b46e640bc74ebbec17b20d526055f Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin <[email protected]> Date: Tue, 4 Aug 2020 15:39:41 +0500 Subject: [PATCH 2/2] CI: travis-ci: specify SSL_LIB, SSL_INC, SLZ_LIB, SLZ_INC for travis builds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca6073ee7..ca867d967 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,7 +133,7 @@ install: script: - if [ "${CC%-*}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi - make -C contrib/wurfl - - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="$ADDLIB" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS + - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="$ADDLIB" SSL_LIB="$SSL_LIB" SSL_INC="$SSL_INC" SLZ_LIB="$SLZ_LIB" SLZ_INC="$SLZ_INC" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS - ./haproxy -vv - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi -- 2.26.2

