On Fri, Jan 26, 2024 at 06:57:57PM +0100, Willy Tarreau wrote: > On Fri, Jan 26, 2024 at 05:38:20PM +0000, David Carlier wrote: > > I m good with your version. Thanks ! > > Great, now merged, thanks! > Willy
It broke the CI on the "all features" build: https://github.com/haproxy/haproxy/actions/runs/7671640626/job/20910459829 /usr/bin/ld: cannot find -lcurl: No such file or directory /usr/bin/ld: cannot find -lzip: No such file or directory I'm surprised because CURL_LDFLAGS and LDFLAGS didn't change from the previous one: -CURL_LDFLAGS := $(shell $(CURL_CONFIG) --libs 2>/dev/null || echo -L /usr/local/lib -lcurl) -LDFLAGS += $(CURL_LDFLAGS) $(PCRE2_LDFLAGS) -lz -lzip -lpthread +CURL_LDFLAGS := $(shell $(CURL_CONFIG) --libs 2>/dev/null || echo -L /usr/local/lib -lcurl) +OPTIONS_LDFLAGS += $(CURL_LDFLAGS) -lz -lzip -lpthread I guess it's definitely because these libs are not in the VM, and maybe they'll either need to be added or we need to make it possible to disable them (particularly if they were not needed previously), but if you could figure why it used to work previously, that would be great. Apparently they were just not used with the dummy lib, as you can see on 2.9: $ ldd ./haproxy linux-vdso.so.1 (0x00007ffc74dee000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f09d7013000) libssl.so.1 => /lib64/libssl.so.1 (0x00007f09d6da0000) libcrypto.so.1 => /lib64/libcrypto.so.1 (0x00007f09d6948000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f09d6744000) librt.so.1 => /lib64/librt.so.1 (0x00007f09d653c000) libm.so.6 => /lib64/libm.so.6 (0x00007f09d6233000) libpcreposix.so.0 => /lib64/libpcreposix.so.0 (0x00007f09d6030000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f09d5dbe000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f09d5ba1000) libc.so.6 => /lib64/libc.so.6 (0x00007f09d57d8000) /lib64/ld-linux-x86-64.so.2 (0x00007f09d724b000) OK that's it, the flags were only used to build "dadwsch". Apparently there's no longer such a utility in the dummy directory, nor is there anything providing a main() anymore, so we can safely get rid of these build flags, right ? With this it looks like it fixes it: diff --git a/addons/deviceatlas/Makefile.inc b/addons/deviceatlas/Makefile.inc index 63719bf50..8b29559f2 100644 --- a/addons/deviceatlas/Makefile.inc +++ b/addons/deviceatlas/Makefile.inc @@ -4,19 +4,12 @@ CXX := c++ CXXLIB := -lstdc++ -CURL_CONFIG := curl-config -CURLDIR := $(shell $(CURL_CONFIG) --prefix 2>/dev/null || echo /usr/local) -CURL_INC := $(CURLDIR)/include -CURL_LIB := $(CURLDIR)/lib -CURL_LDFLAGS := $(shell $(CURL_CONFIG) --libs 2>/dev/null || echo -L /usr/local/lib -lcurl) - ifeq ($(DEVICEATLAS_SRC),) OPTIONS_LDFLAGS += -lda else DEVICEATLAS_INC = $(DEVICEATLAS_SRC) DEVICEATLAS_LIB = $(DEVICEATLAS_SRC) -OPTIONS_LDFLAGS += $(CURL_LDFLAGS) -lz -lzip -lpthread -OPTIONS_CFLAGS += -DDATLAS_CURL -DDATLAS_CURLSSET -DDATLAS_GZ -DDATLAS_ZIP +OPTIONS_LDFLAGS += -lpthread OPTIONS_CFLAGS += -I$(DEVICEATLAS_INC) -I$(CURL_INC) ifeq ($(DEVICEATLAS_NOCACHE),) CXXFLAGS := $(OPTIONS_CFLAGS) -std=gnu++11 $ ldd ./haproxy linux-vdso.so.1 (0x00007ffc82b2e000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0863fc4000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f0863c43000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f0863a0b000) libssl.so.1 => /lib64/libssl.so.1 (0x00007f0863798000) libcrypto.so.1 => /lib64/libcrypto.so.1 (0x00007f0863340000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f086313c000) librt.so.1 => /lib64/librt.so.1 (0x00007f0862f34000) libm.so.6 => /lib64/libm.so.6 (0x00007f0862c2b000) libpcreposix.so.0 => /lib64/libpcreposix.so.0 (0x00007f0862a28000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f08627b6000) libc.so.6 => /lib64/libc.so.6 (0x00007f08623ed000) /lib64/ld-linux-x86-64.so.2 (0x00007f08641e1000) libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f08621d6000) What do you think ? Willy