8.27. curl 8.19.0
Build curl and libcurl in the final target environment using LibreSSL and zlib-ng.
Input assumption: curl-8.19.0.tar.xz is already present in /sources from the chapter 4 source staging step.
Source URL: https://curl.se/download/curl-8.19.0.tar.xz
Upstream build note: the release tarball includes a generated configure script. Upstream documents the normal Unix flow as ./configure, make, optional make test, and make install. It also documents that a TLS backend must be selected explicitly unless TLS is disabled.
Documentation note: curl's generated command and library man pages use Perl during the build. This system does not include Perl, so this section disables generated docs and the built-in curl --manual text.
Licenses:
- curl license
Dependencies:
- musl (libc)
- make
- pkgconf
- LibreSSL
- zlib-ng
curl is a URL transfer tool and client-side transfer library. we need it to provide the final target curl command and libcurl for fetching network resources over HTTP, HTTPS, FTP, and related protocols.
Extract and Enter the Source Tree
cd /sources
rm -rf curl-8.19.0
tar -xf curl-8.19.0.tar.xz
cd curl-8.19.0
Configure curl
PERL=false \
lbi_configure \
--with-openssl \
--with-zlib \
--with-ca-bundle=/system/configuration/ssl/cert.pem \
--without-brotli \
--with-zstd \
--without-libpsl \
--without-libidn2 \
--without-nghttp2 \
--without-ngtcp2 \
--without-nghttp3 \
--without-quiche \
--without-libssh2 \
--without-libssh \
--without-librtmp \
--without-libgsasl \
--without-ldap \
--without-libuv \
--without-zsh-functions-dir \
--without-fish-functions-dir \
--disable-ldap \
--disable-ldaps \
--disable-manual \
--disable-docs \
--disable-static \
--enable-shared
--with-openssl option also covers LibreSSL. With pkgconf available, curl uses the installed openssl.pc and zlib.pc metadata instead of assuming the conventional /system/include layout.
Build curl
make $LWI_MAKE_FLAGS
Install curl
make install
Verify curl
curl --version
curl-config --features
/sources if you do not plan to rebuild curl again.
Command Explanations
rm -rf curl-...andtar -xf: Recreate a clean curl source tree.PERL=false: Prevents curl's build from depending on Perl helpers.lbi_configure: Applies the book's/systeminstall layout.--with-openssl,--with-zlib, and--with-ca-bundle=...: Enable TLS, zlib support, and the installed CA bundle path.--without-brotli,--without-zstd,--without-libpsl, and related toggles: Disable optional dependencies not selected for this curl build.make $LWI_MAKE_FLAGSandmake install: Build and install curl.curl --versionandcurl-config --features: Verify the command and installed feature metadata.