Fix incorrect zlib linking in CI

When cross compiling, zlib couldn't be found because of a missing 'make
install'. As a result the compiled curl binaries do not support zlib.
Add 'make install' and also use the '--with-zlib' curl configure flag by
default to ensure a missing zlib will result in a failed build.
This commit is contained in:
lwthiker
2022-07-14 19:06:32 +03:00
parent cbbea507f6
commit 9bf6f1eb2d
2 changed files with 6 additions and 1 deletions

View File

@@ -90,8 +90,9 @@ jobs:
cd zlib-1.2.12
CHOST=${{ matrix.host }} ./configure --prefix=${{ runner.temp }}/zlib
make
make intsall
# Make sure curl will link with libz.so.1 and not libz.so
rm -f libz.so
rm -f ${{ runner.temp }}/zlib/lib/libz.so
- name: Run configure script
if: matrix.arch == 'x86_64'

View File

@@ -372,6 +372,8 @@ $(CURL_VERSION)/.firefox: $(firefox_libs) $(CURL_VERSION).tar.xz $(CURL_VERSION)
fi; \
if test -n "$(with_zlib)"; then \
config_flags+=" --with-zlib=$(with_zlib)"; \
else \
config_flags+=" --with-zlib"; \
fi; \
if test -n "$(with_libnssckbi)"; then \
config_flags+=" --with-libnssckbi=$(with_libnssckbi)"; \
@@ -410,6 +412,8 @@ $(CURL_VERSION)/.chrome: $(chrome_libs) $(CURL_VERSION).tar.xz $(CURL_VERSION)/.
fi; \
if test -n "$(with_zlib)"; then \
config_flags="$$config_flags --with-zlib=$(with_zlib)"; \
else \
config_flags+=" --with-zlib"; \
fi; \
if test -n "$(with_ca_bundle)"; then \
config_flags="$$config_flags --with-ca-bundle=$(with_ca_bundle)"; \