Failure to compile HTTPD 2.4.39 and 2.4.41 on RHEL 6.10 with no DEVEL packages I am attempting to download and install Httpd 2.4.xx AND all dependancies (because I cannot get root in our environments) I'm convinced the issue is between the Keyboard and the chair but cannot find it. The following have been installed from source: Python-3.7.3 bison-3.3.2 boost-1.59.0 cmake-3.6.3 cronolog-1.2.6b curl-7.61.1 cyrus-sasl-2.1.26 db-6.2.38 dynatrace-7.1 expat-2.2.6 krb5-1.17 libffi-3.2.1 libxml2-2.9.9 libxslt-1.1.33 modsecurity-2.9.2 mysql-5.7.14 ncurses-6.1 net-snmp-5.8 nghttp2-1.33.0 nginx-1.15.12 openldap-2.4.48 openssl-1.1.1 pari-2.9.5 pcre-8.42 perl-5.28.1 readline-7.0 spread-src-5.0.1 zlib-1.2.11 All include files are in /sites/utils/include or /sites/www-site/include All lib files are in /sites/utils/lib or /sites/www-site/include steps to recreate: download: apr-1.7.0.tar.gz apr-util-1.6.1.tar.gz httpd-2.4.41.tar.gz expand and move apr-1.7 into /build/httpd-2.4.41/srclib/apr expand and move apr-util-1.6.1 into /build/httpd-2.4.41/srclib/apr-util Configure with: [build@ecombuild03 httpd-2.4.41]$ cat carp-httpd # # Before using this script, make sure you # remove your old install. If you don't # you're likely to get header file conflicts # ./configure \ --prefix=/sites/www-site \ --enable-modules="all" \ --enable-mods-shared="all" \ --enable-authn-file \ --enable-authn-dbm \ --enable-authn-core \ --enable-authz-host \ --enable-authz-groupfile \ --enable-authz-user \ --enable-authz-dbm \ --enable-authz-owner \ --enable-authz-core \ --enable-access-compat \ --enable-auth-basic \ --enable-auth-digest \ --enable-allowmethods \ --enable-isapi \ --enable-file-cache \ --enable-cache \ --enable-cache-disk \ --enable-so \ --enable-watchdog \ --enable-macro \ --enable-dumpio \ --enable-buffer \ --enable-data \ --enable-reqtimeout \ --enable-ext-filter \ --enable-request \ --enable-include \ --enable-filter \ --enable-substitute \ --enable-sed \ --enable-charset-lite \ --enable-deflate \ --enable-http \ --enable-mime \ --enable-log-config \ --enable-log-debug \ --enable-log-forensic \ --enable-logio \ --enable-env \ --enable-mime-magic \ --enable-cern-meta \ --enable-expires \ --enable-headers \ --enable-ident \ --enable-usertrack \ --enable-unique-id \ --enable-setenvif \ --enable-version \ --enable-remoteip \ --enable-proxy \ --enable-proxy-connect \ --enable-proxy-http \ --enable-proxy-balancer \ --enable-proxy-express \ --enable-proxy-hcheck \ --enable-session \ --enable-session-cookie \ --enable-session-dbd \ --enable-slotmem-shm \ --enable-slotmem-plain \ --enable-ssl \ --enable-ssl-staticlib-deps \ --enable-http2 \ --enable-proxy-http2 \ --enable-lbmethod-byrequests \ --enable-lbmethod-bytraffic \ --enable-lbmethod-bybusyness \ --enable-lbmethod-heartbeat \ --enable-mpms-shared="all" \ --enable-unixd \ --enable-heartbeat \ --enable-heartmonitor \ --enable-status \ --enable-autoindex \ --enable-ldap \ --enable-asis \ --enable-vhost-alias \ --enable-negotiation \ --enable-dir \ --enable-imagemap \ --enable-actions \ --enable-speling \ --enable-alias \ --enable-rewrite \ --enable-v4-mapped \ --with-ldap \ --with-libxml2=/sites/www-site \ --with-included-apr \ --with-pcre=/sites/www-site/bin/pcre-config \ --with-ssl=/sites/www-site \ --with-z=/sites/www-site \ --with-nghttp2=/sites/www-site \ --with-curl=/sites/www-site \ --with-mpm=prefork \ --enable-authnz-ldap \ --enable-cache-disk \ --enable-xml2enc \ --enable-proxy-html \ --enable-userdir \ CFLAGS="-I/sites/www-site/include -I/sites/utils/include" \ LDFLAGS="-L/sites/www-site/lib -L/sites/utils/lib -Wl,-rpath=/sites/www-site/lib,-rpath=/sites/utils/lib" \ LIBS='-ldl -lldap' Then run make and see the following results: /bin/sh /build/httpd-2.4.41/srclib/apr/libtool --silent --mode=compile gcc -I/sites/www-site/include -I/sites/utils/include -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/build/httpd-2.4.41/srclib/apr-util/include -I/build/httpd-2.4.41/srclib/apr-util/include/private -I/build/httpd-2.4.41/srclib/apr/include -o ldap/apr_ldap_stub.lo -c ldap/apr_ldap_stub.c && touch ldap/apr_ldap_stub.lo In file included from /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap.h:182, from ldap/apr_ldap_stub.c:20: /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_init.h:140: error: expected declaration specifiers or '...' before 'LDAP' In file included from /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap.h:183, from ldap/apr_ldap_stub.c:20: /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_option.h:218: error: expected declaration specifiers or '...' before 'LDAP' /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_option.h:240: error: expected declaration specifiers or '...' before 'LDAP' In file included from /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap.h:184, from ldap/apr_ldap_stub.c:20: /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_rebind.h:76: error: expected declaration specifiers or '...' before 'LDAP' /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_rebind.h:91: error: expected ')' before '*' token In file included from ldap/apr_ldap_stub.c:21: /build/httpd-2.4.41/srclib/apr-util/include/private/apu_internal.h:49: error: expected declaration specifiers or '...' before 'LDAP' /build/httpd-2.4.41/srclib/apr-util/include/private/apu_internal.h:54: error: expected declaration specifiers or '...' before 'LDAP' /build/httpd-2.4.41/srclib/apr-util/include/private/apu_internal.h:56: error: expected declaration specifiers or '...' before 'LDAP'
Relevant lines from /build/httpd-2.4.41/srclib/apr-util/include/apr_ldap_init.h 139: APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool, 140: LDAP **ldap, 141: const char *hostname, 142: int portno, 143: int secure, 144: apr_ldap_err_t **result_err);
--with-ldap does not have a path set unlike your other --with-something options
below we can see the location of the ldap library and the required "ldap_init" definition: [build@ecombuild03 httpd-2.4.41]$ ls -l /sites/utils/lib/libldap.so lrwxrwxrwx 1 build build 37 Oct 15 14:11 /sites/utils/lib/libldap.so -> ../att/openldap-2.4.48/lib/libldap.so [build@ecombuild03 httpd-2.4.41]$ ls -l /sites/utils/att/openldap-2.4.48/lib/libldap.so lrwxrwxrwx 1 build build 22 Oct 15 13:53 /sites/utils/att/openldap-2.4.48/lib/libldap.so -> libldap-2.4.so.2.10.11 [build@ecombuild03 httpd-2.4.41]$ ls -l /sites/utils/att/openldap-2.4.48/lib/libldap-2.4.so.2.10.11 -rw-r--r-- 1 build build 407844 Oct 15 13:53 /sites/utils/att/openldap-2.4.48/lib/libldap-2.4.so.2.10.11 [build@ecombuild03 httpd-2.4.41]$ strings /sites/utils/att/openldap-2.4.48/lib/libldap-2.4.so.2.10.11 | grep ldap_init ldap_init ldap_initialize ldap_init_fd ldap_init: trying %s ldap_init: using %s ldap_init: HOME env is %s ldap_init: HOME env is NULL ldap_init: %s env is %s ldap_init: %s env is NULL Yet, when I update the --with-ldap setting with a path the ldap_init function is not found (example at end of this comment). ALL of the following values have been used for --with-ldap: /sites/utils /sites/utils/lib /sites/utils/lib/libldap.so /sites/utils/att/openldap-2.4.48 /sites/utils/att/openldap-2.4.48/lib /sites/utils/att/openldap-2.4.48/lib/libldap.so /sites/utils/att/openldap-2.4.48/lib/libldap-2.4.so.2.10.11 checking for ldap support... checking for ldap_init in -l/sites/utils... no checking for ldap_init in -l/sites/utils... no checking for ldap_init in -l/sites/utils... no checking for ldap_init in -l/sites/utils... no configure: error: could not find an LDAP library
In the end, the following worked: ./configure \ --prefix=/sites/www-site/att/httpd-2.4.41 \ --enable-modules="all" \ --enable-mods-shared="all" \ --enable-authn-file \ --enable-authn-dbm \ --enable-authn-core \ --enable-authz-host \ --enable-authz-groupfile \ --enable-authz-user \ --enable-authz-dbm \ --enable-authz-owner \ --enable-authz-core \ --enable-access-compat \ --enable-auth-basic \ --enable-auth-digest \ --enable-allowmethods \ --enable-isapi \ --enable-file-cache \ --enable-cache \ --enable-cache-disk \ --enable-so \ --enable-watchdog \ --enable-macro \ --enable-dumpio \ --enable-buffer \ --enable-data \ --enable-reqtimeout \ --enable-ext-filter \ --enable-request \ --enable-include \ --enable-filter \ --enable-substitute \ --enable-sed \ --enable-charset-lite \ --enable-deflate \ --enable-http \ --enable-mime \ --enable-log-config \ --enable-log-debug \ --enable-log-forensic \ --enable-logio \ --enable-env \ --enable-mime-magic \ --enable-cern-meta \ --enable-expires \ --enable-headers \ --enable-ident \ --enable-usertrack \ --enable-unique-id \ --enable-setenvif \ --enable-version \ --enable-remoteip \ --enable-proxy \ --enable-proxy-connect \ --enable-proxy-http \ --enable-proxy-balancer \ --enable-proxy-express \ --enable-proxy-hcheck \ --enable-session \ --enable-session-cookie \ --enable-session-dbd \ --enable-slotmem-shm \ --enable-slotmem-plain \ --enable-ssl \ --enable-ssl-staticlib-deps \ --enable-http2 \ --enable-proxy-http2 \ --enable-lbmethod-byrequests \ --enable-lbmethod-bytraffic \ --enable-lbmethod-bybusyness \ --enable-lbmethod-heartbeat \ --enable-mpms-shared="all" \ --enable-unixd \ --enable-heartbeat \ --enable-heartmonitor \ --enable-status \ --enable-autoindex \ --enable-ldap \ --enable-asis \ --enable-vhost-alias \ --enable-negotiation \ --enable-dir \ --enable-imagemap \ --enable-actions \ --enable-speling \ --enable-alias \ --enable-rewrite \ --enable-v4-mapped \ --with-ldap \ --with-ldap-include=/sites/utils/include \ --with-ldap-lib=/sites/utils/lib \ --with-libxml2=/sites/www-site \ --with-included-apr \ --with-pcre=/sites/www-site/bin/pcre-config \ --with-ssl=/sites/www-site \ --with-z=/sites/www-site \ --with-nghttp2=/sites/www-site \ --with-curl=/sites/www-site \ --with-mpm=prefork \ --enable-authnz-ldap \ --enable-cache-disk \ --enable-xml2enc \ --enable-proxy-html \ --enable-userdir \ CFLAGS="-I/sites/www-site/include -I/sites/utils/include" \ LDFLAGS="-L/sites/www-site/lib -L/sites/utils/lib -Wl,-rpath=/sites/www-site/lib,-rpath=/sites/utils/lib" \ LIBS='-ldl -lldap'