| Cost | $0.046 |
| Total elapsed time | 5m4s |
| LLM inference time | 4m44s |
| Command execution time | 20s |
| Commands executed | 25 |
All details >
| Attempt ID | 9x5acpazx08ff | Attempt group | run-16-09-22-05 |
| Revision | fb5c74bd2fee | AWS Instance | m8i.2xlarge |
| Start time | 2025-09-16T20:31:55.628Z | End time | 2025-09-16T20:37:00.271Z |
| Task | curl | Environment | ubuntu-22.04-amd64-offline |
| Model | | OpenRouter slug | openai/gpt-5-mini |
| Temperature | 1 | Explicit prompt caching | false |
| User msg after tool call | false | Max tool calls | 70 |
| Total timeout seconds | 900 | Single command timeout | 600 |
| Cost | $0.046 | Duration | 5m4s |
| LLM inference time | 4m44s | Command execution time | 20s |
| Final context tokens | 28,529 | Total output tokens | 9,024 |
| Output reasoning tokens | 7,232 | Messages | 53 |
| Assistant messages | 26 | User messages | 1 |
| System messages | 1 | Commands executed | 25 |
curl 8.16.0 is a command-line HTTP client.
Project link: curl.se
Task:
Compile and install curl to a specific location.
Difficulties:
Standard build, nothing special.
Environment:
Ubuntu 22.04 on amd64, without internet access.
You are a package-building specialist operating a Ubuntu 22.04 bash shell via one tool: run_terminal_cmd.
The current working directory of every run_terminal_cmd is /home/peter.
Execution rules:
- Always pass non-interactive flags for any command that could prompt (e.g., -y, --yes, DEBIAN_FRONTEND=noninteractive).
- Don't include any newlines in the command.
- The environment is offline, assume you have all the necessary tools already installed.
If you encounter any errors or issues while doing the user's request, you must fix them and continue the task.
At the end verify you did the user request correctly.
You are given a curl v8.16.0 source code at /home/peter/curl.tar.gz. Please compile curl and install it to /home/peter/result. Create a symlink from /home/peter/result/curl to the actual binary. Make it build even if some third party dependencies are not available.
compile-bench> ls -l /home/peter total 4080
-rw-r--r-- 1 peter peter 4176617 Sep 16 20:31 curl.tar.gz
↓ 3 lines
total 4080 -rw-r--r-- 1 peter peter 4176617 Sep 16 20:31 curl.tar.gz
compile-bench> tar -tzf /home/peter/curl.tar.gz | head -n 20 curl-8.16.0/
curl-8.16.0/.editorconfig
curl-8.16.0/CHANGES.md
curl-8.16.0/CMake/
curl-8.16.0/CMake/CMakeConfigurableFile.in
curl-8.16.0/CMake/CurlSymbolHiding.cmake
curl-8.16.0/CMake/CurlTests.c
curl-8.16.0/CMake/FindBrotli.cmake
curl-8.16.0/CMake/FindCares.cmake
curl-8.16.0/CMake/FindGSS.cmake
curl-8.16.0/CMake/FindLDAP.cmake
curl-8.16.0/CMake/FindLibgsasl.cmake
curl-8.16.0/CMake/FindLibidn2.cmake
curl-8.16.0/CMake/FindLibpsl.cmake
curl-8.16.0/CMake/FindLibrtmp.cmake
curl-8.16.0/CMake/FindLibssh.cmake
curl-8.16.0/CMake/FindLibssh2.cmake
curl-8.16.0/CMake/FindLibuv.cmake
curl-8.16.0/CMake/FindMbedTLS.cmake
curl-8.16.0/CMake/FindNGHTTP2.cmake
↓ 21 lines
curl-8.16.0/ curl-8.16.0/.editorconfig curl-8.16.0/CHANGES.md curl-8.16.0/CMake/ curl-8.16.0/CMake/CMakeConfigurableFile.in curl-8.16.0/CMake/CurlSymbolHiding.cmake curl-8.16.0/CMake/CurlTests.c curl-8.16.0/CMake/FindBrotli.cmake curl-8.16.0/CMake/FindCares.cmake curl-8.16.0/CMake/FindGSS.cmake curl-8.16.0/CMake/FindLDAP.cmake curl-8.16.0/CMake/FindLibgsasl.cmake curl-8.16.0/CMake/FindLibidn2.cmake curl-8.16.0/CMake/FindLibpsl.cmake curl-8.16.0/CMake/FindLibrtmp.cmake curl-8.16.0/CMake/FindLibssh.cmake curl-8.16.0/CMake/FindLibssh2.cmake curl-8.16.0/CMake/FindLibuv.cmake curl-8.16.0/CMake/FindMbedTLS.cmake curl-8.16.0/CMake/FindNGHTTP2.cmake
[empty output]
compile-bench> ls -la curl-8.16.0 | sed -n '1,200p' total 2312
drwxr-xr-x 14 peter peter 4096 Sep 10 05:43 .
drwxr-x--- 1 peter peter 4096 Sep 16 20:32 ..
-rw-r--r-- 1 peter peter 284 Sep 10 05:43 .editorconfig
-rw-r--r-- 1 peter peter 438 Sep 10 05:43 CHANGES.md
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 CMake
-rw-r--r-- 1 peter peter 92961 Sep 10 05:43 CMakeLists.txt
-rw-r--r-- 1 peter peter 1088 Sep 10 05:43 COPYING
-rw-r--r-- 1 peter peter 1712 Sep 10 05:43 Dockerfile
-rw-r--r-- 1 peter peter 6930 Sep 10 05:43 Makefile.am
-rw-r--r-- 1 peter peter 39602 Sep 10 05:43 Makefile.in
-rw-r--r-- 1 peter peter 1664 Sep 10 05:43 README
-rw-r--r-- 1 peter peter 28109 Sep 10 05:43 RELEASE-NOTES
-rw-r--r-- 1 peter peter 44196 Sep 10 05:43 acinclude.m4
-rw-r--r-- 1 peter peter 45838 Sep 10 05:43 aclocal.m4
-rwxr-xr-x 1 peter peter 7400 Sep 10 05:43 compile
-rwxr-xr-x 1 peter peter 49482 Sep 10 05:43 config.guess
-rwxr-xr-x 1 peter peter 35406 Sep 10 05:43 config.sub
-rwxr-xr-x 1 peter peter 1349020 Sep 10 05:43 configure
-rw-r--r-- 1 peter peter 166752 Sep 10 05:43 configure.ac
-rw-r--r-- 1 peter peter 4778 Sep 10 05:43 curl-config.in
-rwxr-xr-x 1 peter peter 23568 Sep 10 05:43 depcomp
drwxr-xr-x 7 peter peter 4096 Sep 10 05:43 docs
drwxr-xr-x 3 peter peter 4096 Sep 10 05:43 include
-rwxr-xr-x 1 peter peter 15358 Sep 10 05:43 install-sh
drwxr-xr-x 7 peter peter 12288 Sep 10 05:43 lib
-rw-r--r-- 1 peter peter 1586 Sep 10 05:43 libcurl.pc.in
-rwxr-xr-x 1 peter peter 333057 Sep 10 05:43 ltmain.sh
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 m4
-rwxr-xr-x 1 peter peter 6878 Sep 10 05:43 missing
drwxr-xr-x 4 peter peter 4096 Sep 10 05:43 packages
drwxr-xr-x 5 peter peter 4096 Sep 10 05:43 plan9
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 projects
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 scripts
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 src
drwxr-xr-x 10 peter peter 4096 Sep 10 05:43 tests
drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 winbuild
↓ 38 lines
total 2312 drwxr-xr-x 14 peter peter 4096 Sep 10 05:43 . drwxr-x--- 1 peter peter 4096 Sep 16 20:32 .. -rw-r--r-- 1 peter peter 284 Sep 10 05:43 .editorconfig -rw-r--r-- 1 peter peter 438 Sep 10 05:43 CHANGES.md drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 CMake -rw-r--r-- 1 peter peter 92961 Sep 10 05:43 CMakeLists.txt -rw-r--r-- 1 peter peter 1088 Sep 10 05:43 COPYING -rw-r--r-- 1 peter peter 1712 Sep 10 05:43 Dockerfile -rw-r--r-- 1 peter peter 6930 Sep 10 05:43 Makefile.am -rw-r--r-- 1 peter peter 39602 Sep 10 05:43 Makefile.in -rw-r--r-- 1 peter peter 1664 Sep 10 05:43 README -rw-r--r-- 1 peter peter 28109 Sep 10 05:43 RELEASE-NOTES -rw-r--r-- 1 peter peter 44196 Sep 10 05:43 acinclude.m4 -rw-r--r-- 1 peter peter 45838 Sep 10 05:43 aclocal.m4 -rwxr-xr-x 1 peter peter 7400 Sep 10 05:43 compile -rwxr-xr-x 1 peter peter 49482 Sep 10 05:43 config.guess -rwxr-xr-x 1 peter peter 35406 Sep 10 05:43 config.sub -rwxr-xr-x 1 peter peter 1349020 Sep 10 05:43 configure -rw-r--r-- 1 peter peter 166752 Sep 10 05:43 configure.ac -rw-r--r-- 1 peter peter 4778 Sep 10 05:43 curl-config.in -rwxr-xr-x 1 peter peter 23568 Sep 10 05:43 depcomp drwxr-xr-x 7 peter peter 4096 Sep 10 05:43 docs drwxr-xr-x 3 peter peter 4096 Sep 10 05:43 include -rwxr-xr-x 1 peter peter 15358 Sep 10 05:43 install-sh drwxr-xr-x 7 peter peter 12288 Sep 10 05:43 lib -rw-r--r-- 1 peter peter 1586 Sep 10 05:43 libcurl.pc.in -rwxr-xr-x 1 peter peter 333057 Sep 10 05:43 ltmain.sh drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 m4 -rwxr-xr-x 1 peter peter 6878 Sep 10 05:43 missing drwxr-xr-x 4 peter peter 4096 Sep 10 05:43 packages drwxr-xr-x 5 peter peter 4096 Sep 10 05:43 plan9 drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 projects drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 scripts drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 src drwxr-xr-x 10 peter peter 4096 Sep 10 05:43 tests drwxr-xr-x 2 peter peter 4096 Sep 10 05:43 winbuild
compile-bench> cd curl-8.16.0 && ./configure --help | sed -n '1,240p' `configure' configures curl - to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/curl]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-
[command output truncated]
digest authentication (default)
--disable-digest-auth Disable digest authentication
--enable-kerberos-auth Enable kerberos authentication (default)
--disable-kerberos-auth Disable kerberos authentication
--enable-negotiate-auth Enable negotiate authentication (default)
--disable-negotiate-auth
Disable negotiate authentication
--enable-aws Enable AWS sig support (default)
--disable-aws Disable AWS sig support
--enable-ntlm Enable NTLM support
--disable-ntlm Disable NTLM support
--enable-tls-srp Enable TLS-SRP authentication
--disable-tls-srp Disable TLS-SRP authentication
--enable-unix-sockets Enable Unix domain sockets
--disable-unix-sockets Disable Unix domain sockets
--enable-cookies Enable cookies support
--disable-cookies Disable cookies support
--enable-socketpair Enable socketpair support
--disable-socketpair Disable socketpair support
--enable-http-auth Enable HTTP authentication support
--disable-http-auth Disable HTTP authentication support
--enable-doh Enable DoH support
--disable-doh Disable DoH support
--enable-mime Enable mime API support
--disable-mime Disable mime API support
--enable-bindlocal Enable local binding support
--disable-bindlocal Disable local binding support
--enable-form-api Enable form API support
--disable-form-api Disable form API support
--enable-dateparse Enable date parsing
--disable-dateparse Disable date parsing
--enable-netrc Enable netrc parsing
--disable-netrc Disable netrc parsing
--enable-progress-meter Enable progress-meter
--disable-progress-meter
Disable progress-meter
--enable-sha512-256 Enable SHA-512/256 hash algorithm (default)
--disable-sha512-256 Disable SHA-512/256 hash algorithm
--enable-dnsshuffle Enable DNS shuffling
--disable-dnsshuffle Disable DNS shuffling
--enable-get-easy-options
Enable curl_easy_options
--disable-get-easy-options
Disable curl_easy_options
--enable-alt-svc Enable alt-svc support
--disable-alt-svc Disable alt-svc support
--enable-headers-api Enable headers-api support
--disable-headers-api Disable headers-api support
--enable-hsts Enable HSTS support
--disable-hsts Disable HSTS support
--enable-websockets Enable WebSockets support
--disable-websockets Disable WebSockets support
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-schannel enable Windows native SSL/TLS
--with-amissl enable Amiga native SSL/TLS (AmiSSL)
--with-ssl=PATH old version of --with-openssl
↓ 120 lines
`configure' configures curl - to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/curl]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-
[command output truncated]
digest authentication (default)
--disable-digest-auth Disable digest authentication
--enable-kerberos-auth Enable kerberos authentication (default)
--disable-kerberos-auth Disable kerberos authentication
--enable-negotiate-auth Enable negotiate authentication (default)
--disable-negotiate-auth
Disable negotiate authentication
--enable-aws Enable AWS sig support (default)
--disable-aws Disable AWS sig support
--enable-ntlm Enable NTLM support
--disable-ntlm Disable NTLM support
--enable-tls-srp Enable TLS-SRP authentication
--disable-tls-srp Disable TLS-SRP authentication
--enable-unix-sockets Enable Unix domain sockets
--disable-unix-sockets Disable Unix domain sockets
--enable-cookies Enable cookies support
--disable-cookies Disable cookies support
--enable-socketpair Enable socketpair support
--disable-socketpair Disable socketpair support
--enable-http-auth Enable HTTP authentication support
--disable-http-auth Disable HTTP authentication support
--enable-doh Enable DoH support
--disable-doh Disable DoH support
--enable-mime Enable mime API support
--disable-mime Disable mime API support
--enable-bindlocal Enable local binding support
--disable-bindlocal Disable local binding support
--enable-form-api Enable form API support
--disable-form-api Disable form API support
--enable-dateparse Enable date parsing
--disable-dateparse Disable date parsing
--enable-netrc Enable netrc parsing
--disable-netrc Disable netrc parsing
--enable-progress-meter Enable progress-meter
--disable-progress-meter
Disable progress-meter
--enable-sha512-256 Enable SHA-512/256 hash algorithm (default)
--disable-sha512-256 Disable SHA-512/256 hash algorithm
--enable-dnsshuffle Enable DNS shuffling
--disable-dnsshuffle Disable DNS shuffling
--enable-get-easy-options
Enable curl_easy_options
--disable-get-easy-options
Disable curl_easy_options
--enable-alt-svc Enable alt-svc support
--disable-alt-svc Disable alt-svc support
--enable-headers-api Enable headers-api support
--disable-headers-api Disable headers-api support
--enable-hsts Enable HSTS support
--disable-hsts Disable HSTS support
--enable-websockets Enable WebSockets support
--disable-websockets Disable WebSockets support
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-schannel enable Windows native SSL/TLS
--with-amissl enable Amiga native SSL/TLS (AmiSSL)
--with-ssl=PATH old version of --with-openssl
compile-bench> cd curl-8.16.0 && ./configure --help | sed -n '240,520p' --with-ssl=PATH old version of --with-openssl
--without-ssl build without any TLS library
--with-openssl=PATH Where to look for OpenSSL, PATH points to the SSL
installation (default: /usr/local/ssl); when
possible, set the PKG_CONFIG_PATH environment
variable instead of using this option
--with-gnutls=PATH where to look for GnuTLS, PATH points to the
installation root
--with-mbedtls=PATH where to look for mbedTLS, PATH points to the
installation root
--with-wolfssl=PATH where to look for wolfSSL, PATH points to the
installation root (default: system lib default)
--with-rustls=PATH where to look for Rustls, PATH points to the
installation root
--with-test-nghttpx=PATH
where to find nghttpx for testing
--with-test-caddy=PATH where to find caddy for testing
--with-test-vsftpd=PATH where to find vsftpd for testing
--with-test-httpd=PATH where to find httpd/apache2 for testing
--with-test-danted=PATH where to find danted socks daemon for testing
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
shared library versioning (aka "SONAME") variant to
provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-zlib=PATH search for zlib in PATH
--without-zlib disable use of zlib
--with-brotli=PATH Where to look for brotli, PATH points to the BROTLI
installation; when possible, set the PKG_CONFIG_PATH
environment variable instead of using this option
--without-brotli disable BROTLI
--with-zstd=PATH Where to look for libzstd, PATH points to the
libzstd installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--without-zstd disable libzstd
--with-gssapi-includes=DIR
Specify location of GSS-API headers
--with-gssapi-libs=DIR Specify location of GSS-API libs
--with-gssapi=DIR Where to look for GSS-API
--with-default-ssl-backend=NAME
Use NAME as default SSL backend
--without-default-ssl-backend
Use implicit default SSL backend
--with-ca-bundle=FILE Absolute path to a file containing CA certificates
(example: /etc/ca-bundle.crt)
--without-ca-bundle Don't use a de
[command output truncated]
ith-wolfssh=PATH Where to look for wolfssh, PATH points to the
wolfSSH installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--with-wolfssh enable wolfssh
--with-ldap-lib=libname Specify name of ldap lib file
--with-lber-lib=libname Specify name of lber lib file
--with-ldap=PATH Where to look for LDAP, PATH points to the LDAP
installation; when possible, set the PKG_CONFIG_PATH
environment variable instead of using this option
--without-ldap disable LDAP
--with-librtmp=PATH Where to look for librtmp, PATH points to the
LIBRTMP installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--without-librtmp disable LIBRTMP
--with-winidn=PATH enable Windows native IDN
--without-winidn disable Windows native IDN
--with-apple-idn Enable AppleIDN
--without-apple-idn Disable AppleIDN
--with-libidn2=PATH Enable libidn2 usage
--without-libidn2 Disable libidn2 usage
--with-nghttp2=PATH Enable nghttp2 usage
--without-nghttp2 Disable nghttp2 usage
--with-ngtcp2=PATH Enable ngtcp2 usage
--without-ngtcp2 Disable ngtcp2 usage
--with-openssl-quic Enable OpenSSL QUIC usage
--without-openssl-quic Disable OpenSSL QUIC usage
--with-nghttp3=PATH Enable nghttp3 usage
--without-nghttp3 Disable nghttp3 usage
--with-quiche=PATH Enable quiche usage
--without-quiche Disable quiche usage
--with-libuv=PATH Enable libuv
--without-libuv Disable libuv
--with-zsh-functions-dir=PATH
Install zsh completions to PATH
--without-zsh-functions-dir
Do not install zsh completions
--with-fish-functions-dir=PATH
Install fish completions to PATH
--without-fish-functions-dir
Do not install fish completions
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
↓ 112 lines
--with-ssl=PATH old version of --with-openssl
--without-ssl build without any TLS library
--with-openssl=PATH Where to look for OpenSSL, PATH points to the SSL
installation (default: /usr/local/ssl); when
possible, set the PKG_CONFIG_PATH environment
variable instead of using this option
--with-gnutls=PATH where to look for GnuTLS, PATH points to the
installation root
--with-mbedtls=PATH where to look for mbedTLS, PATH points to the
installation root
--with-wolfssl=PATH where to look for wolfSSL, PATH points to the
installation root (default: system lib default)
--with-rustls=PATH where to look for Rustls, PATH points to the
installation root
--with-test-nghttpx=PATH
where to find nghttpx for testing
--with-test-caddy=PATH where to find caddy for testing
--with-test-vsftpd=PATH where to find vsftpd for testing
--with-test-httpd=PATH where to find httpd/apache2 for testing
--with-test-danted=PATH where to find danted socks daemon for testing
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
shared library versioning (aka "SONAME") variant to
provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-zlib=PATH search for zlib in PATH
--without-zlib disable use of zlib
--with-brotli=PATH Where to look for brotli, PATH points to the BROTLI
installation; when possible, set the PKG_CONFIG_PATH
environment variable instead of using this option
--without-brotli disable BROTLI
--with-zstd=PATH Where to look for libzstd, PATH points to the
libzstd installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--without-zstd disable libzstd
--with-gssapi-includes=DIR
Specify location of GSS-API headers
--with-gssapi-libs=DIR Specify location of GSS-API libs
--with-gssapi=DIR Where to look for GSS-API
--with-default-ssl-backend=NAME
Use NAME as default SSL backend
--without-default-ssl-backend
Use implicit default SSL backend
--with-ca-bundle=FILE Absolute path to a file containing CA certificates
(example: /etc/ca-bundle.crt)
--without-ca-bundle Don't use a de
[command output truncated]
ith-wolfssh=PATH Where to look for wolfssh, PATH points to the
wolfSSH installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--with-wolfssh enable wolfssh
--with-ldap-lib=libname Specify name of ldap lib file
--with-lber-lib=libname Specify name of lber lib file
--with-ldap=PATH Where to look for LDAP, PATH points to the LDAP
installation; when possible, set the PKG_CONFIG_PATH
environment variable instead of using this option
--without-ldap disable LDAP
--with-librtmp=PATH Where to look for librtmp, PATH points to the
LIBRTMP installation; when possible, set the
PKG_CONFIG_PATH environment variable instead of
using this option
--without-librtmp disable LIBRTMP
--with-winidn=PATH enable Windows native IDN
--without-winidn disable Windows native IDN
--with-apple-idn Enable AppleIDN
--without-apple-idn Disable AppleIDN
--with-libidn2=PATH Enable libidn2 usage
--without-libidn2 Disable libidn2 usage
--with-nghttp2=PATH Enable nghttp2 usage
--without-nghttp2 Disable nghttp2 usage
--with-ngtcp2=PATH Enable ngtcp2 usage
--without-ngtcp2 Disable ngtcp2 usage
--with-openssl-quic Enable OpenSSL QUIC usage
--without-openssl-quic Disable OpenSSL QUIC usage
--with-nghttp3=PATH Enable nghttp3 usage
--without-nghttp3 Disable nghttp3 usage
--with-quiche=PATH Enable quiche usage
--without-quiche Disable quiche usage
--with-libuv=PATH Enable libuv
--without-libuv Disable libuv
--with-zsh-functions-dir=PATH
Install zsh completions to PATH
--without-zsh-functions-dir
Do not install zsh completions
--with-fish-functions-dir=PATH
Install fish completions to PATH
--without-fish-functions-dir
Do not install fish completions
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <a suitable curl mailing list: https://curl.se/mail/>.
compile-bench> cd curl-8.16.0 && ./configure --prefix=/home/peter/result --disable-shared --enable-static --without-ssl --without-libidn2 --without-librtmp --without-libpsl --without-nghttp2 --without-nghttp3 --without-ngtcp2 --without-quiche --without-zlib --without-brotli --without-zstd --without-libssh2 --without-libssh --without-ldap --without-libuv --without-ares --without-winidn --disable-doh configure: WARNING: unrecognized options: --without-ares
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking whether to enable SSL session export support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking curl version... 8.16.0
checking for perl... /usr/bin/perl
checking for httpd... no
checking for apache2... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for danted... no
checking for danted... no
checking for nghttpx... no
checking for caddy... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _AL
[command output truncated]
status: creating tests/configurehelp.pm
config.status: creating tests/certs/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/tunit/Makefile
config.status: creating tests/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating libcurl.pc
config.status: creating curl-config
config.status: creating lib/curl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --without-ares
configure: Configured to build curl/libcurl:
Host setup: x86_64-pc-linux-gnu
Install prefix: /home/peter/result
Compiler: gcc
CFLAGS: -Werror-implicit-function-declaration -O2 -Wno-system-headers
CFLAGS extras:
CPPFLAGS: -D_GNU_SOURCE
LDFLAGS:
curl-config:
LIBS:
curl version: 8.16.0
SSL: no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,amissl,rustls} )
SSH: no (--with-{libssh,libssh2})
zlib: no (--with-zlib)
brotli: no (--with-brotli)
zstd: no (--with-zstd)
GSS-API: no (--with-gssapi)
GSASL: no (libgsasl not found)
TLS-SRP: no (--enable-tls-srp)
resolver: POSIX threaded
IPv6: enabled
Unix sockets: enabled
IDN: no (--with-{libidn2,winidn})
Build docs: enabled (--disable-docs)
Build libcurl: Shared=no, Static=yes
Built-in manual: enabled
--libcurl option: enabled (--disable-libcurl-option)
Verbose errors: enabled (--disable-verbose)
Code coverage: disabled
SSPI: no (--enable-sspi)
ca cert bundle: no
ca cert path:
ca cert embed: no
ca fallback:
LDAP: enabled (ancient OpenLDAP)
LDAPS: enabled
IPFS/IPNS: enabled
RTSP: enabled
RTMP: no (--with-librtmp)
PSL: no (--with-libpsl)
Alt-svc: enabled (--disable-alt-svc)
Headers API: enabled (--disable-headers-api)
HSTS: no (--enable-hsts)
HTTP1: enabled (internal)
HTTP2: no (--with-nghttp2)
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic)
ECH: no (--enable-ech)
HTTPS RR: no (--enable-httpsrr)
SSLS-EXPORT: no (--enable-ssls-export)
Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
↓ 139 lines
configure: WARNING: unrecognized options: --without-ares
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking whether to enable SSL session export support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking curl version... 8.16.0
checking for perl... /usr/bin/perl
checking for httpd... no
checking for apache2... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for danted... no
checking for danted... no
checking for nghttpx... no
checking for caddy... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _AL
[command output truncated]
status: creating tests/configurehelp.pm
config.status: creating tests/certs/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/tunit/Makefile
config.status: creating tests/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating libcurl.pc
config.status: creating curl-config
config.status: creating lib/curl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --without-ares
configure: Configured to build curl/libcurl:
Host setup: x86_64-pc-linux-gnu
Install prefix: /home/peter/result
Compiler: gcc
CFLAGS: -Werror-implicit-function-declaration -O2 -Wno-system-headers
CFLAGS extras:
CPPFLAGS: -D_GNU_SOURCE
LDFLAGS:
curl-config:
LIBS:
curl version: 8.16.0
SSL: no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,amissl,rustls} )
SSH: no (--with-{libssh,libssh2})
zlib: no (--with-zlib)
brotli: no (--with-brotli)
zstd: no (--with-zstd)
GSS-API: no (--with-gssapi)
GSASL: no (libgsasl not found)
TLS-SRP: no (--enable-tls-srp)
resolver: POSIX threaded
IPv6: enabled
Unix sockets: enabled
IDN: no (--with-{libidn2,winidn})
Build docs: enabled (--disable-docs)
Build libcurl: Shared=no, Static=yes
Built-in manual: enabled
--libcurl option: enabled (--disable-libcurl-option)
Verbose errors: enabled (--disable-verbose)
Code coverage: disabled
SSPI: no (--enable-sspi)
ca cert bundle: no
ca cert path:
ca cert embed: no
ca fallback:
LDAP: enabled (ancient OpenLDAP)
LDAPS: enabled
IPFS/IPNS: enabled
RTSP: enabled
RTMP: no (--with-librtmp)
PSL: no (--with-libpsl)
Alt-svc: enabled (--disable-alt-svc)
Headers API: enabled (--disable-headers-api)
HSTS: no (--enable-hsts)
HTTP1: enabled (internal)
HTTP2: no (--with-nghttp2)
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic)
ECH: no (--enable-ech)
HTTPS RR: no (--enable-httpsrr)
SSLS-EXPORT: no (--enable-ssls-export)
Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
Show reasoning
Compiling with care
I've configured successfully, but there was an issue with an unrecognized option. The c-ares feature is disabled, but that's not a problem. Now, I want to run make -j$(nproc) to compile, but I need to be careful since parallel builds can use a lot of CPU. I’ll execute the command to change into the directory and run the make command. The environment is offline, but the compilers are available, so I’m hopeful about the build succeeding despite potential warnings.
compile-bench> cd curl-8.16.0 && make -j$(nproc) Making all in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make all-am
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
CC libcurl_la-altsvc.lo
CC libcurl_la-amigaos.lo
CC libcurl_la-asyn-ares.lo
CC libcurl_la-asyn-base.lo
CC libcurl_la-asyn-thrdd.lo
CC libcurl_la-bufq.lo
CC libcurl_la-bufref.lo
CC libcurl_la-cf-h1-proxy.lo
CC libcurl_la-cf-h2-proxy.lo
CC libcurl_la-cf-haproxy.lo
CC libcurl_la-cf-https-connect.lo
CC libcurl_la-cf-ip-happy.lo
CC libcurl_la-cf-socket.lo
CC libcurl_la-cfilters.lo
CC libcurl_la-conncache.lo
CC libcurl_la-connect.lo
CC libcurl_la-content_encoding.lo
CC libcurl_la-cookie.lo
CC libcurl_la-cshutdn.lo
CC libcurl_la-curl_addrinfo.lo
CC libcurl_la-curl_des.lo
CC libcurl_la-curl_endian.lo
CC libcurl_la-curl_fnmatch.lo
CC libcurl_la-curl_get_line.lo
CC libcurl_la-curl_gethostname.lo
CC libcurl_la-curl_gssapi.lo
CC libcurl_la-curl_memrchr.lo
CC libcurl_la-curl_ntlm_core.lo
CC libcurl_la-curl_range.lo
CC libcurl_la-curl_rtmp.lo
CC libcurl_la-curl_sasl.lo
CC libcurl_la-curl_sha512_256.lo
CC libcurl_la-curl_sspi.lo
CC libcurl_la-curl_threads.lo
CC libcurl_la-curl_trc.lo
CC libcurl_la-cw-out.lo
CC libcurl_la-cw-pause.lo
CC libcurl_la-dict.lo
CC libcurl_la-doh.lo
CC libcurl_la-dynhds.lo
CC libcurl_la-easy.lo
CC libcurl_la-easygetopt.lo
CC libcurl_la-easyoptions.lo
CC libcurl_la-escape.lo
CC libcurl_la-fake_addrinfo.lo
CC libcurl_la-file.lo
CC libcurl_la-fileinfo.lo
CC libcurl_la-fopen.lo
CC libcurl_la-formdata.lo
CC libcurl_la-ftp.lo
CC libcurl_la-ftplistparser.lo
CC libcurl_la-getenv.lo
CC libcurl_la-getinfo.lo
CC libcurl_la-gopher.lo
CC libcurl_la-hash.lo
CC libcurl_la-headers.lo
CC libcurl_la-hmac.lo
CC libcurl_la-hostip.lo
CC libcurl_la-hostip4.lo
CC libcurl_la-hostip6.lo
CC libcurl_la-hsts.lo
CC libcurl_la-http.lo
CC libcurl_la-http1.lo
CC libcurl_la-http2.lo
CC libcurl_la-http_aws_sigv4.lo
CC libcurl_la-http_chunks.lo
CC libcurl_la-http_digest.lo
CC libcurl_la-http_negotiate.lo
CC libcurl_la-http_ntlm.lo
CC libcurl_la-http_proxy.lo
CC libcurl_la-httpsrr.lo
CC libcurl_la-idn.lo
CC libcurl_la-if2ip.lo
CC libcurl_la-imap.lo
CC libcurl_la-krb5.lo
CC libcurl_la-ldap.lo
CC libcurl_la-llist.lo
CC libcurl_la-macos.lo
CC libcurl_la-md4.lo
CC libcurl_la-md5.lo
ldap.c:78:11: fatal error: ldap.h: No such file or directory
78 | # include <ldap.h>
| ^~~~~~~~
compilation terminated.
make[2]: *** [Makefile:2925: libcurl_la-ldap.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: *** [Makefile:1658: all] Error 2
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
make: *** [Makefile:620: all-recursive] Error 1
↓ 95 lines
Making all in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make all-am
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
CC libcurl_la-altsvc.lo
CC libcurl_la-amigaos.lo
CC libcurl_la-asyn-ares.lo
CC libcurl_la-asyn-base.lo
CC libcurl_la-asyn-thrdd.lo
CC libcurl_la-bufq.lo
CC libcurl_la-bufref.lo
CC libcurl_la-cf-h1-proxy.lo
CC libcurl_la-cf-h2-proxy.lo
CC libcurl_la-cf-haproxy.lo
CC libcurl_la-cf-https-connect.lo
CC libcurl_la-cf-ip-happy.lo
CC libcurl_la-cf-socket.lo
CC libcurl_la-cfilters.lo
CC libcurl_la-conncache.lo
CC libcurl_la-connect.lo
CC libcurl_la-content_encoding.lo
CC libcurl_la-cookie.lo
CC libcurl_la-cshutdn.lo
CC libcurl_la-curl_addrinfo.lo
CC libcurl_la-curl_des.lo
CC libcurl_la-curl_endian.lo
CC libcurl_la-curl_fnmatch.lo
CC libcurl_la-curl_get_line.lo
CC libcurl_la-curl_gethostname.lo
CC libcurl_la-curl_gssapi.lo
CC libcurl_la-curl_memrchr.lo
CC libcurl_la-curl_ntlm_core.lo
CC libcurl_la-curl_range.lo
CC libcurl_la-curl_rtmp.lo
CC libcurl_la-curl_sasl.lo
CC libcurl_la-curl_sha512_256.lo
CC libcurl_la-curl_sspi.lo
CC libcurl_la-curl_threads.lo
CC libcurl_la-curl_trc.lo
CC libcurl_la-cw-out.lo
CC libcurl_la-cw-pause.lo
CC libcurl_la-dict.lo
CC libcurl_la-doh.lo
CC libcurl_la-dynhds.lo
CC libcurl_la-easy.lo
CC libcurl_la-easygetopt.lo
CC libcurl_la-easyoptions.lo
CC libcurl_la-escape.lo
CC libcurl_la-fake_addrinfo.lo
CC libcurl_la-file.lo
CC libcurl_la-fileinfo.lo
CC libcurl_la-fopen.lo
CC libcurl_la-formdata.lo
CC libcurl_la-ftp.lo
CC libcurl_la-ftplistparser.lo
CC libcurl_la-getenv.lo
CC libcurl_la-getinfo.lo
CC libcurl_la-gopher.lo
CC libcurl_la-hash.lo
CC libcurl_la-headers.lo
CC libcurl_la-hmac.lo
CC libcurl_la-hostip.lo
CC libcurl_la-hostip4.lo
CC libcurl_la-hostip6.lo
CC libcurl_la-hsts.lo
CC libcurl_la-http.lo
CC libcurl_la-http1.lo
CC libcurl_la-http2.lo
CC libcurl_la-http_aws_sigv4.lo
CC libcurl_la-http_chunks.lo
CC libcurl_la-http_digest.lo
CC libcurl_la-http_negotiate.lo
CC libcurl_la-http_ntlm.lo
CC libcurl_la-http_proxy.lo
CC libcurl_la-httpsrr.lo
CC libcurl_la-idn.lo
CC libcurl_la-if2ip.lo
CC libcurl_la-imap.lo
CC libcurl_la-krb5.lo
CC libcurl_la-ldap.lo
CC libcurl_la-llist.lo
CC libcurl_la-macos.lo
CC libcurl_la-md4.lo
CC libcurl_la-md5.lo
ldap.c:78:11: fatal error: ldap.h: No such file or directory
78 | # include <ldap.h>
| ^~~~~~~~
compilation terminated.
make[2]: *** [Makefile:2925: libcurl_la-ldap.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: *** [Makefile:1658: all] Error 2
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
make: *** [Makefile:620: all-recursive] Error 1
Show reasoning
Troubleshooting compilation issues
I need to consider re-running the configure command with the flag --without-ldap explicitly again, then rebuild. I realize cached configuration files might be causing issues, so using "make distclean" could help. After that, I could rerun configure with explicit flags and CPPFLAGS to skip LDAP detection. It seems like there’s confusion over the presence of LDAP components, possibly due to library detection without the appropriate header files. To sidestep complications, passing --without-ldap could be the simplest solution.Examining LDAP configuration
I’m considering checking the configure --help again for LDAP options. I remember seeing options regarding LDAP libraries and paths, including the --without-ldap flag that should disable it. I thought I included that in my earlier configure command when I was setting up curl. Yet somehow LDAP was still enabled, which is puzzling. Maybe it recognized “ancient OpenLDAP” despite that flag. I think looking into config.log might shed some light, but rerunning configure with a clear --without-ldap option and perhaps setting CPPFLAGS could also help.Exploring LDAP compilation issues
I’m considering that instead of manually editing the Makefile or skipping ldap.c, it might be better to reconfigure with a --disable-ldap option. I should check if both --without-ldap and --disable-ldap are valid options by running configure --help. The summary mentions "LDAP: enabled (ancient OpenLDAP)," which makes me think it uses a system function that doesn’t require the header. Yet, compilation fails because ldap.h is missing. I need to inspect lib/ldap.c for conditional includes to figure out why that check didn’t happen.Investigating config.log
I’m considering that the configure script might have detected the presence of a library but failed to find the necessary header file. Ideally, it should disable LDAP if the header isn’t found. To understand what happened, I need to examine the config.log for any hints. I’ll search for "ldap" in that log using grep, which should help me identify where the configuration might have gone wrong or any relevant details about the detection process.
compile-bench> grep -n "ldap" -n curl-8.16.0/config.log | sed -n '1,200p' 7: $ ./configure --prefix=/home/peter/result --disable-shared --enable-static --without-ssl --without-libidn2 --without-librtmp --without-libpsl --without-nghttp2 --without-nghttp3 --without-ngtcp2 --without-quiche --without-zlib --without-brotli --without-zstd --without-libssh2 --without-libssh --without-ldap --without-libuv --without-ares --without-winidn --disable-doh
858:configure:22049: checking whether to support ldap
860:configure:22080: checking whether to support ldaps
1148:configure:29934: checking for ldap_url_parse
1151:conftest.c:(.text.startup+0xb): undefined reference to `ldap_url_parse'
1189:| #define ldap_url_parse innocuous_ldap_url_parse
1195:| #undef ldap_url_parse
1199:| char ldap_url_parse ();
1200:| #if defined __stub_ldap_url_parse || defined __stub___ldap_url_parse
1206:| return ldap_url_parse ();
1210:configure:29940: checking for ldap_init_fd
1213:conftest.c:(.text.startup+0xb): undefined reference to `ldap_init_fd'
1251:| #define ldap_init_fd innocuous_ldap_init_fd
1257:| #undef ldap_init_fd
1261:| char ldap_init_fd ();
1262:| #if defined __stub_ldap_init_fd || defined __stub___ldap_init_fd
1268:| return ldap_init_fd ();
6539: Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws
6585:ac_cv_func_ldap_init_fd=no
6586:ac_cv_func_ldap_url_parse=no
6816:CONFIGURE_OPTIONS='" '\''--prefix=/home/peter/result'\'' '\''--disable-shared'\'' '\''--enable-static'\'' '\''--without-ssl'\'' '\''--without-libidn2'\'' '\''--without-librtmp'\'' '\''--without-libpsl'\'' '\''--without-nghttp2'\'' '\''--without-nghttp3'\'' '\''--without-ngtcp2'\'' '\''--without-quiche'\'' '\''--without-zlib'\'' '\''--without-brotli'\'' '\''--without-zstd'\'' '\''--without-libssh2'\'' '\''--without-libssh'\'' '\''--without-ldap'\'' '\''--without-libuv'\'' '\''--without-ares'\'' '\''--without-winidn'\'' '\''--disable-doh'\''"'
↓ 22 lines
7: $ ./configure --prefix=/home/peter/result --disable-shared --enable-static --without-ssl --without-libidn2 --without-librtmp --without-libpsl --without-nghttp2 --without-nghttp3 --without-ngtcp2 --without-quiche --without-zlib --without-brotli --without-zstd --without-libssh2 --without-libssh --without-ldap --without-libuv --without-ares --without-winidn --disable-doh 858:configure:22049: checking whether to support ldap 860:configure:22080: checking whether to support ldaps 1148:configure:29934: checking for ldap_url_parse 1151:conftest.c:(.text.startup+0xb): undefined reference to `ldap_url_parse' 1189:| #define ldap_url_parse innocuous_ldap_url_parse 1195:| #undef ldap_url_parse 1199:| char ldap_url_parse (); 1200:| #if defined __stub_ldap_url_parse || defined __stub___ldap_url_parse 1206:| return ldap_url_parse (); 1210:configure:29940: checking for ldap_init_fd 1213:conftest.c:(.text.startup+0xb): undefined reference to `ldap_init_fd' 1251:| #define ldap_init_fd innocuous_ldap_init_fd 1257:| #undef ldap_init_fd 1261:| char ldap_init_fd (); 1262:| #if defined __stub_ldap_init_fd || defined __stub___ldap_init_fd 1268:| return ldap_init_fd (); 6539: Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws 6585:ac_cv_func_ldap_init_fd=no 6586:ac_cv_func_ldap_url_parse=no 6816:CONFIGURE_OPTIONS='" '\''--prefix=/home/peter/result'\'' '\''--disable-shared'\'' '\''--enable-static'\'' '\''--without-ssl'\'' '\''--without-libidn2'\'' '\''--without-librtmp'\'' '\''--without-libpsl'\'' '\''--without-nghttp2'\'' '\''--without-nghttp3'\'' '\''--without-ngtcp2'\'' '\''--without-quiche'\'' '\''--without-zlib'\'' '\''--without-brotli'\'' '\''--without-zstd'\'' '\''--without-libssh2'\'' '\''--without-libssh'\'' '\''--without-ldap'\'' '\''--without-libuv'\'' '\''--without-ares'\'' '\''--without-winidn'\'' '\''--disable-doh'\''"'
[empty output]
compile-bench> sed -n '6520,6860p' curl-8.16.0/config.log ca cert bundle: no
ca cert path:
ca cert embed: no
ca fallback:
LDAP: enabled (ancient OpenLDAP)
LDAPS: enabled
IPFS/IPNS: enabled
RTSP: enabled
RTMP: no (--with-librtmp)
PSL: no (--with-libpsl)
Alt-svc: enabled (--disable-alt-svc)
Headers API: enabled (--disable-headers-api)
HSTS: no (--enable-hsts)
HTTP1: enabled (internal)
HTTP2: no (--with-nghttp2)
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic)
ECH: no (--enable-ech)
HTTPS RR: no (--enable-httpsrr)
SSLS-EXPORT: no (--enable-ssls-export)
Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_c_undeclared_builtin_options='none needed'
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_accept4=yes
ac_cv_func_arc4random=no
ac_cv_func_eventfd=yes
ac_cv_func_fnmatch=yes
ac_cv_func_fseeko=yes
ac_cv_func_geteuid=yes
ac_cv_func_gethostbyname=yes
ac_cv_func_getpass_r=no
ac_cv_func_getppid=yes
ac_cv_func_getpwuid=yes
ac_cv_func_getpwuid_r=yes
ac_cv_func_getrlimit=yes
ac_cv_func_gettimeofday=yes
ac_cv_func_if_nametoindex=yes
ac_cv_func_ldap_init_fd=no
ac_cv_func_ldap_url_parse=no
ac_cv_func_mach_absolute_time=no
ac_cv_func_opendir=yes
ac_cv_func_pipe2=yes
[command output truncated]
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
APXS=''
AR='/usr/bin/ar'
AR_FLAGS='cr'
AS='as'
AUTOCONF='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' autoconf'
AUTOHEADER='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' autoheader'
AUTOMAKE='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' automake-1.16'
AWK='mawk'
BLANK_AT_MAKETIME=''
BUILD_DOCS_FALSE='#'
BUILD_DOCS_TRUE=''
BUILD_STUB_GSS_FALSE=''
BUILD_STUB_GSS_TRUE='#'
BUILD_UNITTESTS_FALSE='#'
BUILD_UNITTESTS_TRUE=''
CADDY=''
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-Werror-implicit-function-declaration -O2 -Wno-system-headers'
CFLAG_CURL_SYMBOL_HIDING='-fvisibility=hidden'
CONFIGURE_OPTIONS='" '\''--prefix=/home/peter/result'\'' '\''--disable-shared'\'' '\''--enable-static'\'' '\''--without-ssl'\'' '\''--without-libidn2'\'' '\''--without-librtmp'\'' '\''--without-libpsl'\'' '\''--without-nghttp2'\'' '\''--without-nghttp3'\'' '\''--without-ngtcp2'\'' '\''--without-quiche'\'' '\''--without-zlib'\'' '\''--without-brotli'\'' '\''--without-zstd'\'' '\''--without-libssh2'\'' '\''--without-libssh'\'' '\''--without-ldap'\'' '\''--without-libuv'\'' '\''--without-ares'\'' '\''--without-winidn'\'' '\''--disable-doh'\''"'
CPP='gcc -E'
CPPFLAGS='-D_GNU_SOURCE'
CROSSCOMPILING_FALSE=''
CROSSCOMPILING_TRUE='#'
CSCOPE='cscope'
CTAGS='ctags'
CURLDEBUG_FALSE=''
CURLDEBUG_TRUE='#'
CURLVERSION='8.16.0'
CURL_CA_BUNDLE=''
CURL_CA_EMBED=''
CURL_CA_EMBED_SET_FALSE=''
CURL_CA_EMBED_SET_TRUE='#'
CURL_CFLAG_EXTRAS=''
CURL_CPP='gcc -E -D_GNU_SOURCE'
CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX=''
CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME='4'
CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE=''
CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#'
CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE=''
CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#'
CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE=''
CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE='#'
CURL_LT_SHLIB_USE_VERSION_INFO_FALSE='#'
CURL_LT_SHLIB_USE_VERSION_INFO_TRUE=''
CURL_NETWORK_AND_TIME_LIBS=''
CURL_WERROR_FALSE=''
CURL_WERROR_TRUE='#'
CYGPATH_W='echo'
DANTED=''
DEBUGBUILD_FALSE=''
DEBUGBUILD_TRUE='#'
DEFS='-DHAVE_CONFIG_H'
DEPDIR='.deps'
DLLTOOL='false'
DOING_CURL_SYMBOL_HIDING_FALSE='#'
DOING_CURL_SYMBOL_HIDING_TRUE=''
DOING_NATIVE_WINDOWS_FALSE=''
DOING_NATIVE_WINDOWS_TRUE='#'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
↓ 141 lines
ca cert bundle: no
ca cert path:
ca cert embed: no
ca fallback:
LDAP: enabled (ancient OpenLDAP)
LDAPS: enabled
IPFS/IPNS: enabled
RTSP: enabled
RTMP: no (--with-librtmp)
PSL: no (--with-libpsl)
Alt-svc: enabled (--disable-alt-svc)
Headers API: enabled (--disable-headers-api)
HSTS: no (--enable-hsts)
HTTP1: enabled (internal)
HTTP2: no (--with-nghttp2)
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic)
ECH: no (--enable-ech)
HTTPS RR: no (--enable-httpsrr)
SSLS-EXPORT: no (--enable-ssls-export)
Protocols: dict file ftp gopher http imap ipfs ipns ldap ldaps mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_c_undeclared_builtin_options='none needed'
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_accept4=yes
ac_cv_func_arc4random=no
ac_cv_func_eventfd=yes
ac_cv_func_fnmatch=yes
ac_cv_func_fseeko=yes
ac_cv_func_geteuid=yes
ac_cv_func_gethostbyname=yes
ac_cv_func_getpass_r=no
ac_cv_func_getppid=yes
ac_cv_func_getpwuid=yes
ac_cv_func_getpwuid_r=yes
ac_cv_func_getrlimit=yes
ac_cv_func_gettimeofday=yes
ac_cv_func_if_nametoindex=yes
ac_cv_func_ldap_init_fd=no
ac_cv_func_ldap_url_parse=no
ac_cv_func_mach_absolute_time=no
ac_cv_func_opendir=yes
ac_cv_func_pipe2=yes
[command output truncated]
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
APXS=''
AR='/usr/bin/ar'
AR_FLAGS='cr'
AS='as'
AUTOCONF='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' autoconf'
AUTOHEADER='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' autoheader'
AUTOMAKE='${SHELL} '\''/home/peter/curl-8.16.0/missing'\'' automake-1.16'
AWK='mawk'
BLANK_AT_MAKETIME=''
BUILD_DOCS_FALSE='#'
BUILD_DOCS_TRUE=''
BUILD_STUB_GSS_FALSE=''
BUILD_STUB_GSS_TRUE='#'
BUILD_UNITTESTS_FALSE='#'
BUILD_UNITTESTS_TRUE=''
CADDY=''
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-Werror-implicit-function-declaration -O2 -Wno-system-headers'
CFLAG_CURL_SYMBOL_HIDING='-fvisibility=hidden'
CONFIGURE_OPTIONS='" '\''--prefix=/home/peter/result'\'' '\''--disable-shared'\'' '\''--enable-static'\'' '\''--without-ssl'\'' '\''--without-libidn2'\'' '\''--without-librtmp'\'' '\''--without-libpsl'\'' '\''--without-nghttp2'\'' '\''--without-nghttp3'\'' '\''--without-ngtcp2'\'' '\''--without-quiche'\'' '\''--without-zlib'\'' '\''--without-brotli'\'' '\''--without-zstd'\'' '\''--without-libssh2'\'' '\''--without-libssh'\'' '\''--without-ldap'\'' '\''--without-libuv'\'' '\''--without-ares'\'' '\''--without-winidn'\'' '\''--disable-doh'\''"'
CPP='gcc -E'
CPPFLAGS='-D_GNU_SOURCE'
CROSSCOMPILING_FALSE=''
CROSSCOMPILING_TRUE='#'
CSCOPE='cscope'
CTAGS='ctags'
CURLDEBUG_FALSE=''
CURLDEBUG_TRUE='#'
CURLVERSION='8.16.0'
CURL_CA_BUNDLE=''
CURL_CA_EMBED=''
CURL_CA_EMBED_SET_FALSE=''
CURL_CA_EMBED_SET_TRUE='#'
CURL_CFLAG_EXTRAS=''
CURL_CPP='gcc -E -D_GNU_SOURCE'
CURL_LIBCURL_VERSIONED_SYMBOLS_PREFIX=''
CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME='4'
CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE=''
CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#'
CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE=''
CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#'
CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE=''
CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE='#'
CURL_LT_SHLIB_USE_VERSION_INFO_FALSE='#'
CURL_LT_SHLIB_USE_VERSION_INFO_TRUE=''
CURL_NETWORK_AND_TIME_LIBS=''
CURL_WERROR_FALSE=''
CURL_WERROR_TRUE='#'
CYGPATH_W='echo'
DANTED=''
DEBUGBUILD_FALSE=''
DEBUGBUILD_TRUE='#'
DEFS='-DHAVE_CONFIG_H'
DEPDIR='.deps'
DLLTOOL='false'
DOING_CURL_SYMBOL_HIDING_FALSE='#'
DOING_CURL_SYMBOL_HIDING_TRUE=''
DOING_NATIVE_WINDOWS_FALSE=''
DOING_NATIVE_WINDOWS_TRUE='#'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
Show reasoning
Troubleshooting LDAP Configuration
I'm noticing that even though the config.log indicates that ac_cv_func_ldap_init_fd and url_parse are not present, the configure process still enables LDAP. There might be some logic at play here, especially if an old LDAP library is detected that lacks these functions but still requires ldap.h. Our system doesn't have the header, which hints that configure mistakenly identified LDAP. I should consider how to bypass this LDAP build issue—maybe by modifying the Makefile to exclude ldap.c altogether.Modifying the Makefile
I think the best approach is to modify the Makefile to stop building the ldap.c file. I need to locate where lib/Makefile lists the source files. I’ll open lib/Makefile to check the libcurl_la_SOURCES section. This Makefile comes from Makefile.in, which is located inside the build directory for curl-8.16.0. I can use a command like sed -n to focus on the relevant parts of that file. This should make it clearer what needs to be changed.
compile-bench> sed -n '1,240p' curl-8.16.0/lib/Makefile # Makefile.in generated by automake 1.16.5 from Makefile.am.
# lib/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Shared between CMakeLists.txt and Makefile.am
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Shared between CMakeLists.txt and Makefile.am
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
[command output truncated]
clude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = curl_config.h
CONFIG_CLEAN_FILES = libcurl.vers
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libcurl_la_LIBADD =
am__libcurl_la_SOURCES_DIST = altsvc.c amigaos.c asyn-ares.c \
asyn-base.c asyn-thrdd.c bufq.c bufref.c cf-h1-proxy.c \
cf-h2-proxy.c cf-haproxy.c cf-https-connect.c cf-ip-happy.c \
cf-socket.c cfilters.c conncache.c connect.c \
content_encoding.c cookie.c cshutdn.c curl_addrinfo.c \
curl_des.c curl_endian.c curl_fnmatch.c curl_get_line.c \
curl_gethostname.c curl_gssapi.c curl_memrchr.c \
curl_ntlm_core.c curl_range.c curl_rtmp.c curl_sasl.c \
curl_sha512_256.c curl_sspi.c curl_threads.c curl_trc.c \
cw-out.c cw-pause.c dict.c doh.c dynhds.c easy.c easygetopt.c \
easyoptions.c escape.c fake_addrinfo.c file.c fileinfo.c \
fopen.c formdata.c ftp.c ftplistparser.c getenv.c getinfo.c \
gopher.c hash.c headers.c hmac.c hostip.c hostip4.c hostip6.c \
hsts.c http.c http1.c http2.c http_aws_sigv4.c http_chunks.c \
http_digest.c http_negotiate.c http_ntlm.c http_proxy.c \
httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \
md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c multi.c \
multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \
pop3.c progress.c psl.c rand.c rename.c request.c rtsp.c \
select.c sendf.c setopt.c sha256.c share.c slist.c smb.c \
smtp.c socketpair.c socks.c socks_gssapi.c socks_sspi.c \
speedcheck.c splay.c strcase.c strdup.c strequal.c strerror.c \
↓ 137 lines
# Makefile.in generated by automake 1.16.5 from Makefile.am. # lib/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # # Copyright (C) Daniel Stenberg, <[email protected]>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # # SPDX-License-Identifier: curl # ########################################################################### # Shared between CMakeLists.txt and Makefile.am #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # # Copyright (C) Daniel Stenberg, <[email protected]>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # # SPDX-License-Identifier: curl # ########################################################################### # Shared between CMakeLists.txt and Makefile.am am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ [command output truncated] clude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = curl_config.h CONFIG_CLEAN_FILES = libcurl.vers CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libcurl_la_LIBADD = am__libcurl_la_SOURCES_DIST = altsvc.c amigaos.c asyn-ares.c \ asyn-base.c asyn-thrdd.c bufq.c bufref.c cf-h1-proxy.c \ cf-h2-proxy.c cf-haproxy.c cf-https-connect.c cf-ip-happy.c \ cf-socket.c cfilters.c conncache.c connect.c \ content_encoding.c cookie.c cshutdn.c curl_addrinfo.c \ curl_des.c curl_endian.c curl_fnmatch.c curl_get_line.c \ curl_gethostname.c curl_gssapi.c curl_memrchr.c \ curl_ntlm_core.c curl_range.c curl_rtmp.c curl_sasl.c \ curl_sha512_256.c curl_sspi.c curl_threads.c curl_trc.c \ cw-out.c cw-pause.c dict.c doh.c dynhds.c easy.c easygetopt.c \ easyoptions.c escape.c fake_addrinfo.c file.c fileinfo.c \ fopen.c formdata.c ftp.c ftplistparser.c getenv.c getinfo.c \ gopher.c hash.c headers.c hmac.c hostip.c hostip4.c hostip6.c \ hsts.c http.c http1.c http2.c http_aws_sigv4.c http_chunks.c \ http_digest.c http_negotiate.c http_ntlm.c http_proxy.c \ httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \ md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c multi.c \ multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \ pop3.c progress.c psl.c rand.c rename.c request.c rtsp.c \ select.c sendf.c setopt.c sha256.c share.c slist.c smb.c \ smtp.c socketpair.c socks.c socks_gssapi.c socks_sspi.c \ speedcheck.c splay.c strcase.c strdup.c strequal.c strerror.c \
Show reasoning
Analyzing source files in libcurl
I see the libcurl_la_SOURCES_DIST lists files like ldap.c and openldap.c. It seems there are some conditional inclusions in the Makefile. These source files might be compiled based on certain config flags specified in the Makefile. I need to look further down for any conditionals or references to libcurl_la_SOURCES = ... since there may be macros that include or exclude files based on the configure variables. I'll search for that expression to get more clarity.
compile-bench> grep -n "libcurl_la_SOURCES" -n curl-8.16.0/lib/Makefile | sed -n '1,200p' 219:am__libcurl_la_SOURCES_DIST = altsvc.c amigaos.c asyn-ares.c \
979:SOURCES = $(libcurl_la_SOURCES) $(nodist_libcurl_la_SOURCES) \
981:DIST_SOURCES = $(am__libcurl_la_SOURCES_DIST) \
1614:#nodist_libcurl_la_SOURCES = libcurl_unity.c
1615:libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) \
1617:#libcurl_la_SOURCES = $(am__append_10)
↓ 7 lines
219:am__libcurl_la_SOURCES_DIST = altsvc.c amigaos.c asyn-ares.c \ 979:SOURCES = $(libcurl_la_SOURCES) $(nodist_libcurl_la_SOURCES) \ 981:DIST_SOURCES = $(am__libcurl_la_SOURCES_DIST) \ 1614:#nodist_libcurl_la_SOURCES = libcurl_unity.c 1615:libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) \ 1617:#libcurl_la_SOURCES = $(am__append_10)
compile-bench> sed -n '1560,1660p' curl-8.16.0/lib/Makefile speedcheck.h \
splay.h \
strcase.h \
strdup.h \
strerror.h \
system_win32.h \
telnet.h \
tftp.h \
transfer.h \
uint-bset.h \
uint-hash.h \
uint-spbset.h \
uint-table.h \
url.h \
urlapi-int.h \
urldata.h \
ws.h
LIB_RCFILES = libcurl.rc
CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \
$(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES) $(LIB_CURLX_CFILES) \
$(am__append_3)
HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \
$(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES) $(LIB_CURLX_HFILES)
# Get CSOURCES, HHEADERS, LIB_RCFILES variables
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
CHECKSRC_DIST = .checksrc \
curlx/.checksrc vauth/.checksrc vquic/.checksrc vssh/.checksrc vtls/.checksrc
EXTRA_DIST = config-mac.h config-os400.h config-plan9.h config-riscos.h \
config-win32.h curl_config.h.in $(LIB_RCFILES) libcurl.def \
$(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST)
lib_LTLIBRARIES = libcurl.la
#noinst_LTLIBRARIES =
noinst_LTLIBRARIES = libcurlu.la
# generate a file with "private" prototypes for unit testing
UNITPROTOS = unitprotos.h
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(srcdir) for the generated unity source to find included sources
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/lib \
-I$(srcdir) $(am__append_1) $(am__append_2) -DBUILDING_LIBCURL
AM_LDFLAGS =
AM_CFLAGS =
#nodist_libcurl_la_SOURCES = libcurl_unity.c
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) \
$(am__append_10)
#libcurl_la_SOURCES = $(am__append_10)
#nodist_libcurlu_la_SOURCES = libcurl_unity.c
libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
#libcurlu_la_SOURCES =
CLEANFILES = $(UNITPROTOS)
#CLEANFILES = libcurl_unity.c $(UNITPROTOS)
libcurl_la_CPPFLAGS_EXTRA = $(am__append_9) $(am__append_11)
libcurl_la_LDFLAGS_EXTRA = $(am__append_4) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8)
libcurl_la_CFLAGS_EXTRA = $(am__append_12)
# Keep in sync with CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME in configure.ac
VERSIONCHANGE = 12
VERSIONADD = 0
VERSIONDEL = 8
# libtool version:
VERSIONINFO = -version-info $(VERSIONCHANGE):$(VERSIONADD):$(VERSIONDEL)
libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA)
libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(CURL_LDFLAGS_LIB) $(LIBCURL_PC_LIBS_PRIVATE)
libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA)
libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS
libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_PC_LIBS_PRIVATE)
libcurlu_la_CFLAGS = $(AM_CFLAGS)
CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)
# for debug builds, we scan the sources on all regular make invokes
#CHECKSOURCES = checksrc
UNIT_V = $(UNITV_$(V))
UNITV_0 = @echo " UNITPR " $@;
UNITV_1 =
UNITV_ = $(UNITV_0)
# disable the tests that are mostly causing false positives
TIDYFLAGS := -checks=-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.ArrayBound,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling \
-quiet $(am__append_13)
TIDY := clang-tidy
all: curl_config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
↓ 102 lines
speedcheck.h \ splay.h \ strcase.h \ strdup.h \ strerror.h \ system_win32.h \ telnet.h \ tftp.h \ transfer.h \ uint-bset.h \ uint-hash.h \ uint-spbset.h \ uint-table.h \ url.h \ urlapi-int.h \ urldata.h \ ws.h LIB_RCFILES = libcurl.rc CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \ $(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES) $(LIB_CURLX_CFILES) \ $(am__append_3) HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \ $(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES) $(LIB_CURLX_HFILES) # Get CSOURCES, HHEADERS, LIB_RCFILES variables CMAKE_DIST = CMakeLists.txt curl_config.h.cmake CHECKSRC_DIST = .checksrc \ curlx/.checksrc vauth/.checksrc vquic/.checksrc vssh/.checksrc vtls/.checksrc EXTRA_DIST = config-mac.h config-os400.h config-plan9.h config-riscos.h \ config-win32.h curl_config.h.in $(LIB_RCFILES) libcurl.def \ $(CMAKE_DIST) Makefile.soname optiontable.pl $(CHECKSRC_DIST) lib_LTLIBRARIES = libcurl.la #noinst_LTLIBRARIES = noinst_LTLIBRARIES = libcurlu.la # generate a file with "private" prototypes for unit testing UNITPROTOS = unitprotos.h # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library # being currently built and tested are searched before the library which # might possibly already be installed in the system. # # $(top_srcdir)/include is for libcurl's external include files # $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file # $(srcdir) for the generated unity source to find included sources AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/lib \ -I$(srcdir) $(am__append_1) $(am__append_2) -DBUILDING_LIBCURL AM_LDFLAGS = AM_CFLAGS = #nodist_libcurl_la_SOURCES = libcurl_unity.c libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS) \ $(am__append_10) #libcurl_la_SOURCES = $(am__append_10) #nodist_libcurlu_la_SOURCES = libcurl_unity.c libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS) #libcurlu_la_SOURCES = CLEANFILES = $(UNITPROTOS) #CLEANFILES = libcurl_unity.c $(UNITPROTOS) libcurl_la_CPPFLAGS_EXTRA = $(am__append_9) $(am__append_11) libcurl_la_LDFLAGS_EXTRA = $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) libcurl_la_CFLAGS_EXTRA = $(am__append_12) # Keep in sync with CURL_LIBCURL_VERSIONED_SYMBOLS_SONAME in configure.ac VERSIONCHANGE = 12 VERSIONADD = 0 VERSIONDEL = 8 # libtool version: VERSIONINFO = -version-info $(VERSIONCHANGE):$(VERSIONADD):$(VERSIONDEL) libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(CURL_LDFLAGS_LIB) $(LIBCURL_PC_LIBS_PRIVATE) libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_PC_LIBS_PRIVATE) libcurlu_la_CFLAGS = $(AM_CFLAGS) CHECKSRC = $(CS_$(V)) CS_0 = @echo " RUN " $@; CS_1 = CS_ = $(CS_0) # for debug builds, we scan the sources on all regular make invokes #CHECKSOURCES = checksrc UNIT_V = $(UNITV_$(V)) UNITV_0 = @echo " UNITPR " $@; UNITV_1 = UNITV_ = $(UNITV_0) # disable the tests that are mostly causing false positives TIDYFLAGS := -checks=-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.ArrayBound,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling \ -quiet $(am__append_13) TIDY := clang-tidy all: curl_config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES:
Show reasoning
Investigating file appends
I need to examine the variables that handle file appending. First, I’ll check the Makefile for any conditionals affecting LIB_VAUTH_CFILES and LIB_VTLS_CFILES. There are specific blocks like am__append_3 and am__append_10. I’ll search for occurrences of 'append_10' to see exactly what am__append_10 contains. This should clarify how files are being appended! It's a bit of a detailed task, but it’s necessary to understand the structure better.
compile-bench> grep -n "am__append_10\|am__append_9\|am__append_11\|am__append_3" curl-8.16.0/lib/Makefile | sed -n '1,200p' 143:#am__append_3 = dllmain.c
152:am__append_9 = -DCURL_STATICLIB
153:##am__append_10 = $(LIB_RCFILES)
154:am__append_11 = -DCURL_HIDDEN_SYMBOLS
1581: $(am__append_3)
1616: $(am__append_10)
1617:#libcurl_la_SOURCES = $(am__append_10)
1623:libcurl_la_CPPFLAGS_EXTRA = $(am__append_9) $(am__append_11)
↓ 9 lines
143:#am__append_3 = dllmain.c 152:am__append_9 = -DCURL_STATICLIB 153:##am__append_10 = $(LIB_RCFILES) 154:am__append_11 = -DCURL_HIDDEN_SYMBOLS 1581: $(am__append_3) 1616: $(am__append_10) 1617:#libcurl_la_SOURCES = $(am__append_10) 1623:libcurl_la_CPPFLAGS_EXTRA = $(am__append_9) $(am__append_11)
compile-bench> grep -n "ldap.c" -n curl-8.16.0/lib/Makefile | sed -n '1,200p' 234: httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \
236: multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \
421: httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \
423: multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \
1390: ldap.c \
1403: openldap.c \
2924:libcurl_la-ldap.lo: ldap.c
2925: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ldap.Tpo -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
2927:# $(AM_V_CC)source='ldap.c' object='libcurl_la-ldap.lo' libtool=yes \
2929:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
3015:libcurl_la-openldap.lo: openldap.c
3016: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-openldap.Tpo -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
3018:# $(AM_V_CC)source='openldap.c' object='libcurl_la-openldap.lo' libtool=yes \
3020:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
4184:libcurlu_la-ldap.lo: ldap.c
4185: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ldap.Tpo -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
4187:# $(AM_V_CC)source='ldap.c' object='libcurlu_la-ldap.lo' libtool=yes \
4189:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c
4275:libcurlu_la-openldap.lo: openldap.c
4276: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-openldap.Tpo -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
4278:# $(AM_V_CC)source='openldap.c' object='libcurlu_la-openldap.lo' libtool=yes \
4280:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
↓ 23 lines
234: httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \ 236: multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \ 421: httpsrr.c idn.c if2ip.c imap.c krb5.c ldap.c llist.c macos.c \ 423: multi_ev.c netrc.c noproxy.c openldap.c parsedate.c pingpong.c \ 1390: ldap.c \ 1403: openldap.c \ 2924:libcurl_la-ldap.lo: ldap.c 2925: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-ldap.Tpo -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c 2927:# $(AM_V_CC)source='ldap.c' object='libcurl_la-ldap.lo' libtool=yes \ 2929:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c 3015:libcurl_la-openldap.lo: openldap.c 3016: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurl_la-openldap.Tpo -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c 3018:# $(AM_V_CC)source='openldap.c' object='libcurl_la-openldap.lo' libtool=yes \ 3020:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c 4184:libcurlu_la-ldap.lo: ldap.c 4185: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-ldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-ldap.Tpo -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c 4187:# $(AM_V_CC)source='ldap.c' object='libcurlu_la-ldap.lo' libtool=yes \ 4189:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-ldap.lo `test -f 'ldap.c' || echo '$(srcdir)/'`ldap.c 4275:libcurlu_la-openldap.lo: openldap.c 4276: $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-openldap.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-openldap.Tpo -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c 4278:# $(AM_V_CC)source='openldap.c' object='libcurlu_la-openldap.lo' libtool=yes \ 4280:# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-openldap.lo `test -f 'openldap.c' || echo '$(srcdir)/'`openldap.c
Show reasoning
Evaluating LDAP inclusion
I'm looking at the Makefile that lists ldap.c without conditional guards, indicating that configure may have set variables for inclusion. There could be preprocessor guards within ldap.c to avoid including ldap.h if it's missing, but the inclusion is still unconditional. I want to figure out why configure allowed ldap.c to be included. It seems like editing lib/ldap.c to compile as a stub might help, or simply removing it from the Makefile sources may be the quickest solution. However, deleting or renaming ldap.c could cause build issues due to potential references in other files.Analyzing LDAP functionality
I'm thinking that the LDAP functions are mainly utilized when the LDAP protocol is enabled. Since configure included LDAP before, removing ldap.c might lead to the library not including LDAP support. There could be other code with conditional #ifdefs linked to LDAP functions. I should check for other files that reference LDAP features, like those including "ldap.h". Removing the file could break the build since functions in ldap.c are likely called elsewhere. There’s also the chance those calls have preprocessor macros set by configure that would define relevant headers.Ensuring proper LDAP configuration
I'm realizing that if I remove ldap.c without updating the config header, other files might try to call functions from ldap.c that will be missing during linking—which could cause build failure. A better approach might be to reconfigure to properly disable LDAP. I'm curious why the --without-ldap option didn't take effect. I plan to rerun the configure command with --without-ldap --disable-ldap and also set the environment variable ac_cv_lib_ldap=no to force the detection off. I'll check the config.log for the tests on "ldap.h" and consider setting ac_cv_header_ldap_h=no to influence the header check.Investigating LDAP configuration issues
It seems that even though LDAP is supposedly enabled, it's already missing. To properly disable LDAP, I could try setting "ac_cv_libldap=no" or "ac_cv_lib_ldap=no" and search the config.log for related variables. It looks like configure checks for the presence of "ldap.h" or the -lldap flag. I might want to dive into configure.ac or scripts for detection logic.
However, I could simply pass --without-ldap, though it seemed to be ignored. It may print "LDAP: enabled" by default if the header or flag exists, which results in compilation failure. Editing the generated header "lib/curl_config.h" to undef or remove the LDAP macro could be another option, allowing me to re-run make and compile with macros disabling the LDAP code through #ifdefs. Still, ldap.c itself isn’t guarded by any macro, so that’ll be a challenge.Inspecting ldap.c for conditionals
I’m thinking that other functions might only compile if HAVE_LDAP is defined. However, ldap.c seems to function independently. My next step is to inspect the beginning of ldap.c to check for any #ifdef directives and includes. This could give me insights into how it's being handled in the overall build process. Let’s take a look at those initial lines in lib/ldap.c. This might help clarify if it has any preprocessor conditions affecting its compilation.
compile-bench> sed -n '1,240p' curl-8.16.0/lib/ldap.c /***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) Daniel Stenberg, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include "curl_setup.h"
#if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
#if defined(__GNUC__) && defined(__APPLE__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
/*
* Notice that USE_OPENLDAP is only a source code selection switch. When
* libcurl is built with USE_OPENLDAP defined the libcurl source code that
* gets compiled is the code from openldap.c, otherwise the code that gets
* compiled is the code from ldap.c.
*
* When USE_OPENLDAP is defined a recent version of the OpenLDAP library
* might be required for compilation and runtime. In order to use ancient
* OpenLDAP library versions, USE_OPENLDAP shall not be defined.
*/
/* Wincrypt must be included before anything that could include OpenSSL. */
#ifdef USE_WIN32_CRYPTO
#include <wincrypt.h>
/* Undefine wincrypt conflicting symbols for BoringSSL. */
#undef X509_NAME
#undef X509_EXTENSIONS
#undef PKCS7_ISSUER_AND_SERIAL
#undef PKCS7_SIGNER_INFO
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
#endif
#ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */
# ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4201)
# endif
# include <subauth.h> /* for [P]UNICODE_STRING */
# ifdef _MSC_VER
# pragma warning(pop)
# endif
# include <winldap.h>
# ifndef LDAP_VENDOR_NAME
# error Your Platform SDK is NOT sufficient for LDAP support! \
Update your Platform SDK, or disable LDAP support!
# else
[command output truncated]
"ldap", /* scheme */
ZERO_NULL, /* setup_connection */
ldap_do, /* do_it */
ZERO_NULL, /* done */
ZERO_NULL, /* do_more */
ZERO_NULL, /* connect_it */
ZERO_NULL, /* connecting */
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_pollset */
ZERO_NULL, /* doing_pollset */
ZERO_NULL, /* domore_pollset */
ZERO_NULL, /* perform_pollset */
ZERO_NULL, /* disconnect */
ZERO_NULL, /* write_resp */
ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
ZERO_NULL, /* follow */
PORT_LDAP, /* defport */
CURLPROTO_LDAP, /* protocol */
CURLPROTO_LDAP, /* family */
PROTOPT_NONE /* flags */
};
#ifdef HAVE_LDAP_SSL
/*
* LDAPS protocol handler.
*/
const struct Curl_handler Curl_handler_ldaps = {
"ldaps", /* scheme */
ZERO_NULL, /* setup_connection */
ldap_do, /* do_it */
ZERO_NULL, /* done */
ZERO_NULL, /* do_more */
ZERO_NULL, /* connect_it */
ZERO_NULL, /* connecting */
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_pollset */
ZERO_NULL, /* doing_pollset */
ZERO_NULL, /* domore_pollset */
ZERO_NULL, /* perform_pollset */
ZERO_NULL, /* disconnect */
ZERO_NULL, /* write_resp */
ZERO_NULL, /* write_resp_hd */
ZERO_NULL, /* connection_check */
ZERO_NULL, /* attach connection */
ZERO_NULL, /* follow */
PORT_LDAPS, /* defport */
CURLPROTO_LDAPS, /* protocol */
CURLPROTO_LDAP, /* family */
PROTOPT_SSL /* flags */
};
#endif
#ifdef USE_WIN32_LDAP
#ifdef USE_WINDOWS_SSPI
static int ldap_win_bind_auth(LDAP *server, const char *user,
const char *passwd, unsigned long authflags)
{
ULONG method = 0;
SEC_WINNT_AUTH_IDENTITY cred;
int rc = LDAP_AUTH_METHOD_NOT_SUPPORTED;
memset(&cred, 0, sizeof(cred));
#ifdef USE_SPNEGO
if(authflags & CURLAUTH_NEGOTIATE) {
↓ 141 lines
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) Daniel Stenberg, <[email protected]>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * SPDX-License-Identifier: curl * ***************************************************************************/ #include "curl_setup.h" #if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP) #if defined(__GNUC__) && defined(__APPLE__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif /* * Notice that USE_OPENLDAP is only a source code selection switch. When * libcurl is built with USE_OPENLDAP defined the libcurl source code that * gets compiled is the code from openldap.c, otherwise the code that gets * compiled is the code from ldap.c. * * When USE_OPENLDAP is defined a recent version of the OpenLDAP library * might be required for compilation and runtime. In order to use ancient * OpenLDAP library versions, USE_OPENLDAP shall not be defined. */ /* Wincrypt must be included before anything that could include OpenSSL. */ #ifdef USE_WIN32_CRYPTO #include <wincrypt.h> /* Undefine wincrypt conflicting symbols for BoringSSL. */ #undef X509_NAME #undef X509_EXTENSIONS #undef PKCS7_ISSUER_AND_SERIAL #undef PKCS7_SIGNER_INFO #undef OCSP_REQUEST #undef OCSP_RESPONSE #endif #ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */ # ifdef _MSC_VER # pragma warning(push) # pragma warning(disable:4201) # endif # include <subauth.h> /* for [P]UNICODE_STRING */ # ifdef _MSC_VER # pragma warning(pop) # endif # include <winldap.h> # ifndef LDAP_VENDOR_NAME # error Your Platform SDK is NOT sufficient for LDAP support! \ Update your Platform SDK, or disable LDAP support! # else [command output truncated] "ldap", /* scheme */ ZERO_NULL, /* setup_connection */ ldap_do, /* do_it */ ZERO_NULL, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* connect_it */ ZERO_NULL, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* proto_pollset */ ZERO_NULL, /* doing_pollset */ ZERO_NULL, /* domore_pollset */ ZERO_NULL, /* perform_pollset */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* write_resp */ ZERO_NULL, /* write_resp_hd */ ZERO_NULL, /* connection_check */ ZERO_NULL, /* attach connection */ ZERO_NULL, /* follow */ PORT_LDAP, /* defport */ CURLPROTO_LDAP, /* protocol */ CURLPROTO_LDAP, /* family */ PROTOPT_NONE /* flags */ }; #ifdef HAVE_LDAP_SSL /* * LDAPS protocol handler. */ const struct Curl_handler Curl_handler_ldaps = { "ldaps", /* scheme */ ZERO_NULL, /* setup_connection */ ldap_do, /* do_it */ ZERO_NULL, /* done */ ZERO_NULL, /* do_more */ ZERO_NULL, /* connect_it */ ZERO_NULL, /* connecting */ ZERO_NULL, /* doing */ ZERO_NULL, /* proto_pollset */ ZERO_NULL, /* doing_pollset */ ZERO_NULL, /* domore_pollset */ ZERO_NULL, /* perform_pollset */ ZERO_NULL, /* disconnect */ ZERO_NULL, /* write_resp */ ZERO_NULL, /* write_resp_hd */ ZERO_NULL, /* connection_check */ ZERO_NULL, /* attach connection */ ZERO_NULL, /* follow */ PORT_LDAPS, /* defport */ CURLPROTO_LDAPS, /* protocol */ CURLPROTO_LDAP, /* family */ PROTOPT_SSL /* flags */ }; #endif #ifdef USE_WIN32_LDAP #ifdef USE_WINDOWS_SSPI static int ldap_win_bind_auth(LDAP *server, const char *user, const char *passwd, unsigned long authflags) { ULONG method = 0; SEC_WINNT_AUTH_IDENTITY cred; int rc = LDAP_AUTH_METHOD_NOT_SUPPORTED; memset(&cred, 0, sizeof(cred)); #ifdef USE_SPNEGO if(authflags & CURLAUTH_NEGOTIATE) {
Show reasoning
Checking compiler behavior
I need to think about how the compiler handles includes, even in an empty file. It seems it should still compile without issues. The inclusion of "ldap.h" is tied to a conditional directive, specifically checking if CURL_DISABLE_LDAP is not defined. The code includes "curl_setup.h" first, followed by conditions for including ldap.h. I'll have to look at ldap.c to pinpoint where exactly
compile-bench> grep -n "<ldap.h>\|ldap.h" curl-8.16.0/lib/ldap.c | sed -n '1,200p' 66:# include <winldap.h>
78:# include <ldap.h>
92:#include "curl_ldap.h"
↓ 4 lines
66:# include <winldap.h> 78:# include <ldap.h> 92:#include "curl_ldap.h"
compile-bench> sed -n '60,100p' curl-8.16.0/lib/ldap.c # pragma warning(disable:4201)
# endif
# include <subauth.h> /* for [P]UNICODE_STRING */
# ifdef _MSC_VER
# pragma warning(pop)
# endif
# include <winldap.h>
# ifndef LDAP_VENDOR_NAME
# error Your Platform SDK is NOT sufficient for LDAP support! \
Update your Platform SDK, or disable LDAP support!
# else
# include <winber.h>
# endif
#else
# define LDAP_DEPRECATED 1 /* Be sure ldap_init() is defined. */
# ifdef HAVE_LBER_H
# include <lber.h>
# endif
# include <ldap.h>
# if (defined(HAVE_LDAP_SSL) && defined(HAVE_LDAP_SSL_H))
# include <ldap_ssl.h>
# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
#endif
#include "urldata.h"
#include <curl/curl.h>
#include "cfilters.h"
#include "sendf.h"
#include "escape.h"
#include "progress.h"
#include "transfer.h"
#include "curlx/strparse.h"
#include "curl_ldap.h"
#include "curlx/multibyte.h"
#include "curlx/base64.h"
#include "connect.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
↓ 41 lines
# pragma warning(disable:4201)
# endif
# include <subauth.h> /* for [P]UNICODE_STRING */
# ifdef _MSC_VER
# pragma warning(pop)
# endif
# include <winldap.h>
# ifndef LDAP_VENDOR_NAME
# error Your Platform SDK is NOT sufficient for LDAP support! \
Update your Platform SDK, or disable LDAP support!
# else
# include <winber.h>
# endif
#else
# define LDAP_DEPRECATED 1 /* Be sure ldap_init() is defined. */
# ifdef HAVE_LBER_H
# include <lber.h>
# endif
# include <ldap.h>
# if (defined(HAVE_LDAP_SSL) && defined(HAVE_LDAP_SSL_H))
# include <ldap_ssl.h>
# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
#endif
#include "urldata.h"
#include <curl/curl.h>
#include "cfilters.h"
#include "sendf.h"
#include "escape.h"
#include "progress.h"
#include "transfer.h"
#include "curlx/strparse.h"
#include "curl_ldap.h"
#include "curlx/multibyte.h"
#include "curlx/base64.h"
#include "connect.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
compile-bench> cd curl-8.16.0 && make -j$(nproc) CPPFLAGS=-DCURL_DISABLE_LDAP Making all in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make all-am
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
CC libcurl_la-ldap.lo
CC libcurl_la-memdebug.lo
CC libcurl_la-mime.lo
CC libcurl_la-mprintf.lo
CC libcurl_la-mqtt.lo
CC libcurl_la-multi.lo
CC libcurl_la-multi_ev.lo
CC libcurl_la-netrc.lo
CC libcurl_la-noproxy.lo
CC libcurl_la-openldap.lo
CC libcurl_la-parsedate.lo
CC libcurl_la-pingpong.lo
CC libcurl_la-pop3.lo
CC libcurl_la-progress.lo
CC libcurl_la-psl.lo
CC libcurl_la-rand.lo
CC libcurl_la-rename.lo
CC libcurl_la-request.lo
CC libcurl_la-rtsp.lo
CC libcurl_la-select.lo
CC libcurl_la-sendf.lo
CC libcurl_la-setopt.lo
CC libcurl_la-sha256.lo
CC libcurl_la-share.lo
CC libcurl_la-slist.lo
CC libcurl_la-smb.lo
CC libcurl_la-smtp.lo
CC libcurl_la-socketpair.lo
CC libcurl_la-socks.lo
CC libcurl_la-socks_gssapi.lo
CC libcurl_la-socks_sspi.lo
CC libcurl_la-speedcheck.lo
CC libcurl_la-splay.lo
CC libcurl_la-strcase.lo
CC libcurl_la-strdup.lo
CC libcurl_la-strequal.lo
CC libcurl_la-strerror.lo
CC libcurl_la-system_win32.lo
CC libcurl_la-telnet.lo
CC libcurl_la-tftp.lo
CC libcurl_la-transfer.lo
CC libcurl_la-uint-bset.lo
strerror.c: In function 'Curl_strerror':
strerror.c:824:17: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
824 | char *msg = strerror_r(err, buffer, sizeof(buffer));
| ^~~~~~~~~~
CC libcurl_la-uint-hash.lo
CC libcurl_la-uint-spbset.lo
CC libcurl_la-uint-table.lo
CC libcurl_la-url.lo
CC libcurl_la-urlapi.lo
CC libcurl_la-version.lo
CC libcurl_la-ws.lo
CC libcurlu_la-altsvc.lo
CC libcurlu_la-amigaos.lo
urlapi.c: In function 'redirect_url':
urlapi.c:280:16: error: implicit declaration of function 'memrchr'; did you mean 'memchr'? [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration]8;;]
280 | cutoff = memrchr(protsep, '/',
| ^~~~~~~
| memchr
urlapi.c:280:14: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
280 | cutoff = memrchr(protsep, '/',
| ^
urlapi.c: In function 'dedotdotify':
urlapi.c:865:26: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
865 | char *last = memrchr(ptr, '/', len);
| ^~~~~~~
CC libcurlu_la-asyn-ares.lo
CC libcurlu_la-asyn-base.lo
CC libcurlu_la-asyn-thrdd.lo
CC libcurlu_la-bufq.lo
CC libcurlu_la-bufref.lo
CC libcurlu_la-cf-h1-proxy.lo
CC libcurlu_la-cf-h2-proxy.lo
CC libcurlu_la-cf-haproxy.lo
CC libcurlu_la-cf-https-connect.lo
CC libcurlu_la-cf-ip-happy.lo
CC libcurlu_la-cf-socket.lo
cc1: some warnings being treated as errors
make[2]: *** [Makefile:3275: libcurl_la-urlapi.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
cf-socket.c: In function 'cf_tcp_accept_connect':
cf-socket.c:2116:18: error: implicit declaration of function 'accept4'; did you mean 'accept'? [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration]8;;]
2116 | s_accepted = accept4(ctx->sock, (struct sockaddr *) &add, &size,
| ^~~~~~~
| accept
cc1: some warnings being treated as errors
make[2]: *** [Makefile:3744: libcurlu_la-cf-socket.lo] Error 1
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: *** [Makefile:1658: all] Error 2
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
make: *** [Makefile:620: all-recursive] Error 1
↓ 97 lines
Making all in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make all-am
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
CC libcurl_la-ldap.lo
CC libcurl_la-memdebug.lo
CC libcurl_la-mime.lo
CC libcurl_la-mprintf.lo
CC libcurl_la-mqtt.lo
CC libcurl_la-multi.lo
CC libcurl_la-multi_ev.lo
CC libcurl_la-netrc.lo
CC libcurl_la-noproxy.lo
CC libcurl_la-openldap.lo
CC libcurl_la-parsedate.lo
CC libcurl_la-pingpong.lo
CC libcurl_la-pop3.lo
CC libcurl_la-progress.lo
CC libcurl_la-psl.lo
CC libcurl_la-rand.lo
CC libcurl_la-rename.lo
CC libcurl_la-request.lo
CC libcurl_la-rtsp.lo
CC libcurl_la-select.lo
CC libcurl_la-sendf.lo
CC libcurl_la-setopt.lo
CC libcurl_la-sha256.lo
CC libcurl_la-share.lo
CC libcurl_la-slist.lo
CC libcurl_la-smb.lo
CC libcurl_la-smtp.lo
CC libcurl_la-socketpair.lo
CC libcurl_la-socks.lo
CC libcurl_la-socks_gssapi.lo
CC libcurl_la-socks_sspi.lo
CC libcurl_la-speedcheck.lo
CC libcurl_la-splay.lo
CC libcurl_la-strcase.lo
CC libcurl_la-strdup.lo
CC libcurl_la-strequal.lo
CC libcurl_la-strerror.lo
CC libcurl_la-system_win32.lo
CC libcurl_la-telnet.lo
CC libcurl_la-tftp.lo
CC libcurl_la-transfer.lo
CC libcurl_la-uint-bset.lo
strerror.c: In function 'Curl_strerror':
strerror.c:824:17: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
824 | char *msg = strerror_r(err, buffer, sizeof(buffer));
| ^~~~~~~~~~
CC libcurl_la-uint-hash.lo
CC libcurl_la-uint-spbset.lo
CC libcurl_la-uint-table.lo
CC libcurl_la-url.lo
CC libcurl_la-urlapi.lo
CC libcurl_la-version.lo
CC libcurl_la-ws.lo
CC libcurlu_la-altsvc.lo
CC libcurlu_la-amigaos.lo
urlapi.c: In function 'redirect_url':
urlapi.c:280:16: error: implicit declaration of function 'memrchr'; did you mean 'memchr'? [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration]8;;]
280 | cutoff = memrchr(protsep, '/',
| ^~~~~~~
| memchr
urlapi.c:280:14: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
280 | cutoff = memrchr(protsep, '/',
| ^
urlapi.c: In function 'dedotdotify':
urlapi.c:865:26: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
865 | char *last = memrchr(ptr, '/', len);
| ^~~~~~~
CC libcurlu_la-asyn-ares.lo
CC libcurlu_la-asyn-base.lo
CC libcurlu_la-asyn-thrdd.lo
CC libcurlu_la-bufq.lo
CC libcurlu_la-bufref.lo
CC libcurlu_la-cf-h1-proxy.lo
CC libcurlu_la-cf-h2-proxy.lo
CC libcurlu_la-cf-haproxy.lo
CC libcurlu_la-cf-https-connect.lo
CC libcurlu_la-cf-ip-happy.lo
CC libcurlu_la-cf-socket.lo
cc1: some warnings being treated as errors
make[2]: *** [Makefile:3275: libcurl_la-urlapi.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
cf-socket.c: In function 'cf_tcp_accept_connect':
cf-socket.c:2116:18: error: implicit declaration of function 'accept4'; did you mean 'accept'? [ttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Werror=implicit-function-declaration]8;;]
2116 | s_accepted = accept4(ctx->sock, (struct sockaddr *) &add, &size,
| ^~~~~~~
| accept
cc1: some warnings being treated as errors
make[2]: *** [Makefile:3744: libcurlu_la-cf-socket.lo] Error 1
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: *** [Makefile:1658: all] Error 2
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
make: *** [Makefile:620: all-recursive] Error 1
Show reasoning
Checking compiler flags
I see there's an issue with "cc1: some warnings being treated as errors" due to the flag -Werror-implicit-function-declaration in CFLAGS. To fix this, I could remove that specific flag by overriding CFLAGS during the make process. It looks like CFLAGS was initially set by configure, including other options, but I can pass new values when I run make. For instance, I could specify "CFLAGS=-O2 -Wno-system-headers", while also ensuring CPPFLAGS is included for the necessary definitions.Running make with overrides
I shouldn't override the previous settings entirely, but to be safe, I can pass CPPFLAGS with the necessary definitions: "-D_GNU_SOURCE -DCURL_DISABLE_LDAP". I'll also set CFLAGS to "-O2 -Wno-system-headers" to avoid -Werror. The key is ensuring that -Werror is removed. So, I'll run the make command using two overrides: CFLAGS='-O2 -Wno-system-headers' and CPPFLAGS='-D_GNU_SOURCE -DCURL_DISABLE_LDAP', while utilizing all available cores with -j$(nproc). Let’s go ahead and execute that!
compile-bench> cd curl-8.16.0 && make -j$(nproc) CFLAGS='-O2 -Wno-system-headers' CPPFLAGS='-D_GNU_SOURCE -DCURL_DISABLE_LDAP' Making all in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make all-am
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
CC libcurl_la-urlapi.lo
CC vauth/libcurl_la-cleartext.lo
CC vauth/libcurl_la-cram.lo
CC vauth/libcurl_la-digest.lo
CC vauth/libcurl_la-digest_sspi.lo
CC vauth/libcurl_la-gsasl.lo
CC vauth/libcurl_la-krb5_gssapi.lo
CC vauth/libcurl_la-krb5_sspi.lo
CC vauth/libcurl_la-ntlm.lo
CC vauth/libcurl_la-ntlm_sspi.lo
CC vauth/libcurl_la-oauth2.lo
CC vauth/libcurl_la-spnego_gssapi.lo
CC vauth/libcurl_la-spnego_sspi.lo
CC vauth/libcurl_la-vauth.lo
CC vtls/libcurl_la-cipher_suite.lo
CC vtls/libcurl_la-gtls.lo
CC vtls/libcurl_la-hostcheck.lo
CC vtls/libcurl_la-keylog.lo
CC vtls/libcurl_la-mbedtls.lo
CC vtls/libcurl_la-mbedtls_threadlock.lo
CC vtls/libcurl_la-openssl.lo
CC vtls/libcurl_la-rustls.lo
CC vtls/libcurl_la-schannel.lo
CC vtls/libcurl_la-schannel_verify.lo
CC vtls/libcurl_la-vtls.lo
CC vtls/libcurl_la-vtls_scache.lo
CC vtls/libcurl_la-vtls_spack.lo
CC vtls/libcurl_la-wolfssl.lo
CC vtls/libcurl_la-x509asn1.lo
CC vquic/libcurl_la-curl_ngtcp2.lo
CC vquic/libcurl_la-curl_osslq.lo
CC vquic/libcurl_la-curl_quiche.lo
CC vquic/libcurl_la-vquic.lo
CC vquic/libcurl_la-vquic-tls.lo
CC vssh/libcurl_la-libssh.lo
CC vssh/libcurl_la-libssh2.lo
CC vssh/libcurl_la-curl_path.lo
CC vssh/libcurl_la-wolfssh.lo
CC curlx/libcurl_la-base64.lo
CC curlx/libcurl_la-dynbuf.lo
CC curlx/libcurl_la-inet_ntop.lo
CC curlx/libcurl_la-inet_pton.lo
CC curlx/libcurl_la-multibyte.lo
CC curlx/libcurl_la-nonblock.lo
CC curlx/libcurl_la-strparse.lo
CC curlx/libcurl_la-timediff.lo
CC curlx/libcurl_la-timeval.lo
CC curlx/libcurl_la-version_win32.lo
CC curlx/libcurl_la-wait.lo
CC curlx/libcurl_la-warnless.lo
CC curlx/libcurl_la-winapi.lo
CC libcurlu_la-cf-socket.lo
CC libcurlu_la-cfilters.lo
CC libcurlu_la-conncache.lo
CC libcurlu_la-connect.lo
CC libcurlu_la-content_encoding.lo
CC libcurlu_la-cookie.lo
CC libcurlu_la-cshutdn.lo
CC libcurlu_la-curl_addrinfo.lo
CC libcurlu_la-curl_des.lo
CC libcurlu_la-curl_endian.lo
CC libcurlu_la-curl_fnmatch.lo
CC libcurlu_la-curl_get_line.lo
CC libcurlu_la-curl_gethostname.lo
CC libcurlu_la-curl_gssapi.lo
CC libcurlu_la-curl_memrchr.lo
[command output truncated]
CC curl-tool_stderr.o
CC curl-tool_strdup.o
CC curl-tool_urlglob.o
CC curl-tool_util.o
CC curl-tool_vms.o
CC curl-tool_writeout.o
CC curl-tool_writeout_json.o
CC curl-tool_xattr.o
CC curl-var.o
HUGE tool_hugehelp.c
echo '/* !checksrc! disable COPYRIGHT all */' > tool_ca_embed.c
echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' >> tool_ca_embed.c
CC curlinfo.o
CC libcurltool_la-config2setopts.lo
CC libcurltool_la-slist_wc.lo
CC libcurltool_la-terminal.lo
CC libcurltool_la-tool_bname.lo
CC libcurltool_la-tool_cb_dbg.lo
CC libcurltool_la-tool_cb_hdr.lo
CC libcurltool_la-tool_cb_prg.lo
CC libcurltool_la-tool_cb_rea.lo
CC libcurltool_la-tool_cb_see.lo
CC libcurltool_la-tool_cb_soc.lo
CC libcurltool_la-tool_cb_wrt.lo
CC libcurltool_la-tool_cfgable.lo
CC libcurltool_la-tool_dirhie.lo
CC libcurltool_la-tool_doswin.lo
CC libcurltool_la-tool_easysrc.lo
CC libcurltool_la-tool_filetime.lo
CC libcurltool_la-tool_findfile.lo
CC libcurltool_la-tool_formparse.lo
CC libcurltool_la-tool_getparam.lo
CC libcurltool_la-tool_getpass.lo
CC libcurltool_la-tool_help.lo
CC libcurltool_la-tool_helpers.lo
CC libcurltool_la-tool_ipfs.lo
CC libcurltool_la-tool_libinfo.lo
CC libcurltool_la-tool_listhelp.lo
CC libcurltool_la-tool_main.lo
CC libcurltool_la-tool_msgs.lo
CC libcurltool_la-tool_operate.lo
CC libcurltool_la-tool_operhlp.lo
CC libcurltool_la-tool_paramhlp.lo
CC libcurltool_la-tool_parsecfg.lo
CC libcurltool_la-tool_progress.lo
CC libcurltool_la-tool_setopt.lo
CC libcurltool_la-tool_ssls.lo
CC libcurltool_la-tool_stderr.lo
CC libcurltool_la-tool_strdup.lo
CC libcurltool_la-tool_urlglob.lo
CC libcurltool_la-tool_util.lo
CC libcurltool_la-tool_vms.lo
CC libcurltool_la-tool_writeout.lo
CC libcurltool_la-tool_writeout_json.lo
CC libcurltool_la-tool_xattr.lo
CC libcurltool_la-var.lo
CC curl-tool_hugehelp.o
CC curl-tool_ca_embed.o
CCLD curlinfo
CCLD curl
CCLD libcurltool.la
make[1]: Leaving directory '/home/peter/curl-8.16.0/src'
Making all in scripts
make[1]: Entering directory '/home/peter/curl-8.16.0/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/peter/curl-8.16.0/scripts'
make[1]: Entering directory '/home/peter/curl-8.16.0'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/peter/curl-8.16.0'
↓ 141 lines
Making all in lib make[1]: Entering directory '/home/peter/curl-8.16.0/lib' make all-am make[2]: Entering directory '/home/peter/curl-8.16.0/lib' CC libcurl_la-urlapi.lo CC vauth/libcurl_la-cleartext.lo CC vauth/libcurl_la-cram.lo CC vauth/libcurl_la-digest.lo CC vauth/libcurl_la-digest_sspi.lo CC vauth/libcurl_la-gsasl.lo CC vauth/libcurl_la-krb5_gssapi.lo CC vauth/libcurl_la-krb5_sspi.lo CC vauth/libcurl_la-ntlm.lo CC vauth/libcurl_la-ntlm_sspi.lo CC vauth/libcurl_la-oauth2.lo CC vauth/libcurl_la-spnego_gssapi.lo CC vauth/libcurl_la-spnego_sspi.lo CC vauth/libcurl_la-vauth.lo CC vtls/libcurl_la-cipher_suite.lo CC vtls/libcurl_la-gtls.lo CC vtls/libcurl_la-hostcheck.lo CC vtls/libcurl_la-keylog.lo CC vtls/libcurl_la-mbedtls.lo CC vtls/libcurl_la-mbedtls_threadlock.lo CC vtls/libcurl_la-openssl.lo CC vtls/libcurl_la-rustls.lo CC vtls/libcurl_la-schannel.lo CC vtls/libcurl_la-schannel_verify.lo CC vtls/libcurl_la-vtls.lo CC vtls/libcurl_la-vtls_scache.lo CC vtls/libcurl_la-vtls_spack.lo CC vtls/libcurl_la-wolfssl.lo CC vtls/libcurl_la-x509asn1.lo CC vquic/libcurl_la-curl_ngtcp2.lo CC vquic/libcurl_la-curl_osslq.lo CC vquic/libcurl_la-curl_quiche.lo CC vquic/libcurl_la-vquic.lo CC vquic/libcurl_la-vquic-tls.lo CC vssh/libcurl_la-libssh.lo CC vssh/libcurl_la-libssh2.lo CC vssh/libcurl_la-curl_path.lo CC vssh/libcurl_la-wolfssh.lo CC curlx/libcurl_la-base64.lo CC curlx/libcurl_la-dynbuf.lo CC curlx/libcurl_la-inet_ntop.lo CC curlx/libcurl_la-inet_pton.lo CC curlx/libcurl_la-multibyte.lo CC curlx/libcurl_la-nonblock.lo CC curlx/libcurl_la-strparse.lo CC curlx/libcurl_la-timediff.lo CC curlx/libcurl_la-timeval.lo CC curlx/libcurl_la-version_win32.lo CC curlx/libcurl_la-wait.lo CC curlx/libcurl_la-warnless.lo CC curlx/libcurl_la-winapi.lo CC libcurlu_la-cf-socket.lo CC libcurlu_la-cfilters.lo CC libcurlu_la-conncache.lo CC libcurlu_la-connect.lo CC libcurlu_la-content_encoding.lo CC libcurlu_la-cookie.lo CC libcurlu_la-cshutdn.lo CC libcurlu_la-curl_addrinfo.lo CC libcurlu_la-curl_des.lo CC libcurlu_la-curl_endian.lo CC libcurlu_la-curl_fnmatch.lo CC libcurlu_la-curl_get_line.lo CC libcurlu_la-curl_gethostname.lo CC libcurlu_la-curl_gssapi.lo CC libcurlu_la-curl_memrchr.lo [command output truncated] CC curl-tool_stderr.o CC curl-tool_strdup.o CC curl-tool_urlglob.o CC curl-tool_util.o CC curl-tool_vms.o CC curl-tool_writeout.o CC curl-tool_writeout_json.o CC curl-tool_xattr.o CC curl-var.o HUGE tool_hugehelp.c echo '/* !checksrc! disable COPYRIGHT all */' > tool_ca_embed.c echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' >> tool_ca_embed.c CC curlinfo.o CC libcurltool_la-config2setopts.lo CC libcurltool_la-slist_wc.lo CC libcurltool_la-terminal.lo CC libcurltool_la-tool_bname.lo CC libcurltool_la-tool_cb_dbg.lo CC libcurltool_la-tool_cb_hdr.lo CC libcurltool_la-tool_cb_prg.lo CC libcurltool_la-tool_cb_rea.lo CC libcurltool_la-tool_cb_see.lo CC libcurltool_la-tool_cb_soc.lo CC libcurltool_la-tool_cb_wrt.lo CC libcurltool_la-tool_cfgable.lo CC libcurltool_la-tool_dirhie.lo CC libcurltool_la-tool_doswin.lo CC libcurltool_la-tool_easysrc.lo CC libcurltool_la-tool_filetime.lo CC libcurltool_la-tool_findfile.lo CC libcurltool_la-tool_formparse.lo CC libcurltool_la-tool_getparam.lo CC libcurltool_la-tool_getpass.lo CC libcurltool_la-tool_help.lo CC libcurltool_la-tool_helpers.lo CC libcurltool_la-tool_ipfs.lo CC libcurltool_la-tool_libinfo.lo CC libcurltool_la-tool_listhelp.lo CC libcurltool_la-tool_main.lo CC libcurltool_la-tool_msgs.lo CC libcurltool_la-tool_operate.lo CC libcurltool_la-tool_operhlp.lo CC libcurltool_la-tool_paramhlp.lo CC libcurltool_la-tool_parsecfg.lo CC libcurltool_la-tool_progress.lo CC libcurltool_la-tool_setopt.lo CC libcurltool_la-tool_ssls.lo CC libcurltool_la-tool_stderr.lo CC libcurltool_la-tool_strdup.lo CC libcurltool_la-tool_urlglob.lo CC libcurltool_la-tool_util.lo CC libcurltool_la-tool_vms.lo CC libcurltool_la-tool_writeout.lo CC libcurltool_la-tool_writeout_json.lo CC libcurltool_la-tool_xattr.lo CC libcurltool_la-var.lo CC curl-tool_hugehelp.o CC curl-tool_ca_embed.o CCLD curlinfo CCLD curl CCLD libcurltool.la make[1]: Leaving directory '/home/peter/curl-8.16.0/src' Making all in scripts make[1]: Entering directory '/home/peter/curl-8.16.0/scripts' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/peter/curl-8.16.0/scripts' make[1]: Entering directory '/home/peter/curl-8.16.0' make[1]: Nothing to be done for 'all-am'. make[1]: Leaving directory '/home/peter/curl-8.16.0'
compile-bench> cd curl-8.16.0 && make install Making install in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libcurl.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libcurl.lai /home/peter/result/lib/libcurl.la
libtool: install: /usr/bin/install -c .libs/libcurl.a /home/peter/result/lib/libcurl.a
libtool: install: chmod 644 /home/peter/result/lib/libcurl.a
libtool: install: ranlib /home/peter/result/lib/libcurl.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
Making install in docs
make[1]: Entering directory '/home/peter/curl-8.16.0/docs'
Making install in .
make[2]: Entering directory '/home/peter/curl-8.16.0/docs'
make[3]: Entering directory '/home/peter/curl-8.16.0/docs'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 curl-config.1 wcurl.1 '/home/peter/result/share/man/man1'
make[3]: Leaving directory '/home/peter/curl-8.16.0/docs'
make[2]: Leaving directory '/home/peter/curl-8.16.0/docs'
Making install in cmdline-opts
make[2]: Entering directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[3]: Entering directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 curl.1 '/home/peter/result/share/man/man1'
make[3]: Leaving directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[2]: Leaving directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
Making install in libcurl
make[2]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
Making install in opts
make[3]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[4]: En
[command output truncated]
ng directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[5]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[5]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
make[6]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
make[6]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/aclocal'
/usr/bin/install -c -m 644 libcurl.m4 '/home/peter/result/share/aclocal'
/usr/bin/mkdir -p '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_easy_cleanup.3 curl_easy_duphandle.3 curl_easy_escape.3 curl_easy_getinfo.3 curl_easy_header.3 curl_easy_init.3 curl_easy_nextheader.3 curl_easy_option_by_id.3 curl_easy_option_by_name.3 curl_easy_option_next.3 curl_easy_pause.3 curl_easy_perform.3 curl_easy_recv.3 curl_easy_reset.3 curl_easy_send.3 curl_easy_setopt.3 curl_easy_ssls_export.3 curl_easy_ssls_import.3 curl_easy_strerror.3 curl_easy_unescape.3 curl_easy_upkeep.3 curl_escape.3 curl_formadd.3 curl_formfree.3 curl_formget.3 curl_free.3 curl_getdate.3 curl_getenv.3 curl_global_cleanup.3 curl_global_init.3 curl_global_init_mem.3 curl_global_sslset.3 curl_global_trace.3 curl_mime_addpart.3 curl_mime_data.3 curl_mime_data_cb.3 curl_mime_encoder.3 curl_mime_filedata.3 curl_mime_filename.3 curl_mime_free.3 '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_mime_headers.3 curl_mime_init.3 curl_mime_name.3 curl_mime_subparts.3 curl_mime_type.3 curl_mprintf.3 curl_multi_add_handle.3 curl_multi_assign.3 curl_multi_cleanup.3 curl_multi_fdset.3 curl_multi_get_handles.3 curl_multi_get_offt.3 curl_multi_info_read.3 curl_multi_init.3 curl_multi_perform.3 curl_multi_poll.3 curl_multi_remove_handle.3 curl_multi_setopt.3 curl_multi_socket.3 curl_multi_socket_action.3 curl_multi_socket_all.3 curl_multi_strerror.3 curl_multi_timeout.3 curl_multi_wait.3 curl_multi_waitfds.3 curl_multi_wakeup.3 curl_pushheader_byname.3 curl_pushheader_bynum.3 curl_share_cleanup.3 curl_share_init.3 curl_share_setopt.3 curl_share_strerror.3 curl_slist_append.3 curl_slist_free_all.3 curl_strequal.3 curl_strnequal.3 curl_unescape.3 curl_url.3 curl_url_cleanup.3 curl_url_dup.3 '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_url_get.3 curl_url_set.3 curl_url_strerror.3 curl_version.3 curl_version_info.3 curl_ws_meta.3 curl_ws_recv.3 curl_ws_send.3 curl_ws_start_frame.3 libcurl-easy.3 libcurl-env-dbg.3 libcurl-env.3 libcurl-errors.3 libcurl-multi.3 libcurl-security.3 libcurl-share.3 libcurl-symbols.3 libcurl-thread.3 libcurl-tutorial.3 libcurl-url.3 libcurl-ws.3 libcurl.3 '/home/peter/result/share/man/man3'
make[6]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[5]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[4]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[3]: Leaving directory '/home/peter/curl-8.16.0'
make[2]: Leaving directory '/home/peter/curl-8.16.0'
make[1]: Leaving directory '/home/peter/curl-8.16.0'
↓ 73 lines
Making install in lib
make[1]: Entering directory '/home/peter/curl-8.16.0/lib'
make[2]: Entering directory '/home/peter/curl-8.16.0/lib'
/usr/bin/mkdir -p '/home/peter/result/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libcurl.la '/home/peter/result/lib'
libtool: install: /usr/bin/install -c .libs/libcurl.lai /home/peter/result/lib/libcurl.la
libtool: install: /usr/bin/install -c .libs/libcurl.a /home/peter/result/lib/libcurl.a
libtool: install: chmod 644 /home/peter/result/lib/libcurl.a
libtool: install: ranlib /home/peter/result/lib/libcurl.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/peter/result/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/peter/result/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/peter/curl-8.16.0/lib'
make[1]: Leaving directory '/home/peter/curl-8.16.0/lib'
Making install in docs
make[1]: Entering directory '/home/peter/curl-8.16.0/docs'
Making install in .
make[2]: Entering directory '/home/peter/curl-8.16.0/docs'
make[3]: Entering directory '/home/peter/curl-8.16.0/docs'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 curl-config.1 wcurl.1 '/home/peter/result/share/man/man1'
make[3]: Leaving directory '/home/peter/curl-8.16.0/docs'
make[2]: Leaving directory '/home/peter/curl-8.16.0/docs'
Making install in cmdline-opts
make[2]: Entering directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[3]: Entering directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/man/man1'
/usr/bin/install -c -m 644 curl.1 '/home/peter/result/share/man/man1'
make[3]: Leaving directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
make[2]: Leaving directory '/home/peter/curl-8.16.0/docs/cmdline-opts'
Making install in libcurl
make[2]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
Making install in opts
make[3]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[4]: En
[command output truncated]
ng directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[5]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl/opts'
make[5]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
make[6]: Entering directory '/home/peter/curl-8.16.0/docs/libcurl'
make[6]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/home/peter/result/share/aclocal'
/usr/bin/install -c -m 644 libcurl.m4 '/home/peter/result/share/aclocal'
/usr/bin/mkdir -p '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_easy_cleanup.3 curl_easy_duphandle.3 curl_easy_escape.3 curl_easy_getinfo.3 curl_easy_header.3 curl_easy_init.3 curl_easy_nextheader.3 curl_easy_option_by_id.3 curl_easy_option_by_name.3 curl_easy_option_next.3 curl_easy_pause.3 curl_easy_perform.3 curl_easy_recv.3 curl_easy_reset.3 curl_easy_send.3 curl_easy_setopt.3 curl_easy_ssls_export.3 curl_easy_ssls_import.3 curl_easy_strerror.3 curl_easy_unescape.3 curl_easy_upkeep.3 curl_escape.3 curl_formadd.3 curl_formfree.3 curl_formget.3 curl_free.3 curl_getdate.3 curl_getenv.3 curl_global_cleanup.3 curl_global_init.3 curl_global_init_mem.3 curl_global_sslset.3 curl_global_trace.3 curl_mime_addpart.3 curl_mime_data.3 curl_mime_data_cb.3 curl_mime_encoder.3 curl_mime_filedata.3 curl_mime_filename.3 curl_mime_free.3 '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_mime_headers.3 curl_mime_init.3 curl_mime_name.3 curl_mime_subparts.3 curl_mime_type.3 curl_mprintf.3 curl_multi_add_handle.3 curl_multi_assign.3 curl_multi_cleanup.3 curl_multi_fdset.3 curl_multi_get_handles.3 curl_multi_get_offt.3 curl_multi_info_read.3 curl_multi_init.3 curl_multi_perform.3 curl_multi_poll.3 curl_multi_remove_handle.3 curl_multi_setopt.3 curl_multi_socket.3 curl_multi_socket_action.3 curl_multi_socket_all.3 curl_multi_strerror.3 curl_multi_timeout.3 curl_multi_wait.3 curl_multi_waitfds.3 curl_multi_wakeup.3 curl_pushheader_byname.3 curl_pushheader_bynum.3 curl_share_cleanup.3 curl_share_init.3 curl_share_setopt.3 curl_share_strerror.3 curl_slist_append.3 curl_slist_free_all.3 curl_strequal.3 curl_strnequal.3 curl_unescape.3 curl_url.3 curl_url_cleanup.3 curl_url_dup.3 '/home/peter/result/share/man/man3'
/usr/bin/install -c -m 644 curl_url_get.3 curl_url_set.3 curl_url_strerror.3 curl_version.3 curl_version_info.3 curl_ws_meta.3 curl_ws_recv.3 curl_ws_send.3 curl_ws_start_frame.3 libcurl-easy.3 libcurl-env-dbg.3 libcurl-env.3 libcurl-errors.3 libcurl-multi.3 libcurl-security.3 libcurl-share.3 libcurl-symbols.3 libcurl-thread.3 libcurl-tutorial.3 libcurl-url.3 libcurl-ws.3 libcurl.3 '/home/peter/result/share/man/man3'
make[6]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[5]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[4]: Leaving directory '/home/peter/curl-8.16.0/docs/libcurl'
make[3]: Leaving directory '/home/peter/curl-8.16.0'
make[2]: Leaving directory '/home/peter/curl-8.16.0'
make[1]: Leaving directory '/home/peter/curl-8.16.0'
compile-bench> ls -l /home/peter/result/bin || true total 1368
-rwxr-xr-x 1 peter peter 1379672 Sep 16 20:35 curl
-rwxr-xr-x 1 peter peter 5124 Sep 16 20:35 curl-config
-rwxr-xr-x 1 peter peter 10622 Sep 16 20:35 wcurl
↓ 5 lines
total 1368 -rwxr-xr-x 1 peter peter 1379672 Sep 16 20:35 curl -rwxr-xr-x 1 peter peter 5124 Sep 16 20:35 curl-config -rwxr-xr-x 1 peter peter 10622 Sep 16 20:35 wcurl
lrwxrwxrwx 1 peter peter 27 Sep 16 20:36 /home/peter/result/curl -> /home/peter/result/bin/curl
compile-bench> /home/peter/result/curl --version curl 8.16.0 (x86_64-pc-linux-gnu) libcurl/8.16.0
Release-Date: 2025-09-10
Protocols: dict file ftp gopher http imap ipfs ipns mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
↓ 5 lines
curl 8.16.0 (x86_64-pc-linux-gnu) libcurl/8.16.0 Release-Date: 2025-09-10 Protocols: dict file ftp gopher http imap ipfs ipns mqtt pop3 rtsp smtp telnet tftp ws Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
Done — curl 8.16.0 was compiled and installed to /home/peter/result and a symlink /home/peter/result/curl → /home/peter/result/bin/curl was created.
What I did (commands I ran)
- Extracted the source:
- tar -xzf /home/peter/curl.tar.gz
- Configured with a minimal set of optional features disabled to allow building without third-party deps, and set the install prefix:
- cd curl-8.16.0 && ./configure --prefix=/home/peter/result --disable-shared --enable-static --without-ssl --without-libidn2 --without-librtmp --without-libpsl --without-nghttp2 --without-nghttp3 --without-ngtcp2 --without-quiche --without-zlib --without-brotli --without-zstd --without-libssh2 --without-libssh --without-ldap --without-libuv --without-winidn --disable-doh
- Built the project. During the build I encountered two issues and fixed them:
1) Missing ldap headers caused a compile error; to avoid building LDAP sources I added a compile define to disable LDAP code: CPPFLAGS='-DCURL_DISABLE_LDAP'.
2) Warnings-as-errors (-Werror-implicit-function-declaration) caused failures for some system function declarations; I removed that by overriding CFLAGS to not include -Werror-implicit-function-declaration and ensured _GNU_SOURCE is defined so system prototypes are visible:
- cd curl-8.16.0 && make -j$(nproc) CFLAGS='-O2 -Wno-system-headers' CPPFLAGS='-D_GNU_SOURCE -DCURL_DISABLE_LDAP'
- Installed:
- cd curl-8.16.0 && make install
- Created the requested symlink:
- ln -sf /home/peter/result/bin/curl /home/peter/result/curl
Verification
- Installed binary:
- /home/peter/result/bin/curl (symlink at /home/peter/result/curl)
- Version output (run: /home/peter/result/curl --version):
curl 8.16.0 (x86_64-pc-linux-gnu) libcurl/8.16.0
Release-Date: 2025-09-10
Protocols: dict file ftp gopher http imap ipfs ipns mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile threadsafe UnixSockets
Notes
- I intentionally disabled many optional features (including TLS/SSL and several protocol addons) so the build succeeds even when third-party development libraries are missing. If you want HTTPS (OpenSSL/gnutls/mbedtls/etc.) or other optional features later, install the appropriate dev packages and re-run configure with the corresponding --with-... options (for example --with-openssl) and rebuild.
- The installed curl is at /home/peter/result/bin/curl and a convenience symlink is at /home/peter/result/curl.