On a new EC2, I am facing one type of problem while compiling httpd. It seems like code of Apache cannot find functions / function definitions from libraries.
Steps I took on a fresh RHEL to install httpd.
sudo yum install gcc extracted apr's and apr's source in respective directories under srclib of httpd source code compiled latest pcre sudo yum install pcre-devel (because of error cannot find pcre.h while ./configure) ./configure --with-included-apr --prefix='/server/httpd/httpd-2.4.17' --with-pcre='/usr/local/bin/pcre-config' --with-ssl='/usr/bin/openssl' make
during the make install step everything goes fine for a while and then following array of error pops up. I think all the errors are linked.
/server/httpd/httpd-2.4.17-source/server/util_pcre.c:104: undefined reference to `pcre_free' server/.libs/libmain.a(util_pcre.o): In function `ap_regcomp': /server/httpd/httpd-2.4.17-source/server/util_pcre.c:138: undefined reference to `pcre_compile2' /server/httpd/httpd-2.4.17-source/server/util_pcre.c:151: undefined reference to `pcre_fullinfo' server/.libs/libmain.a(util_pcre.o): In function `ap_regexec_len': /server/httpd/httpd-2.4.17-source/server/util_pcre.c:207: undefined reference to `pcre_exec' server/.libs/libmain.a(util_pcre.o): In function `ap_regname': /server/httpd/httpd-2.4.17-source/server/util_pcre.c:269: undefined reference to `pcre_fullinfo' /server/httpd/httpd-2.4.17-source/server/util_pcre.c:271: undefined reference to `pcre_fullinfo' /server/httpd/httpd-2.4.17-source/server/util_pcre.c:273: undefined reference to `pcre_fullinfo'
After some googling I found if I could correct the way gcc is being called in Makefile, it could fix the issue but I even can't find the term "gcc" in Makefile.
I can easily reproduce this on my local Ubuntu machine too with the same steps. for ubuntu install libpcre3-dev instead of pcre-devel