I use Solaris 11. pcre.h exist in /opt/app/pcre/lib but Make cannot detect it.How can I include /opt/app/pcre/lib during make?

Apache 2.4.25 configure:
CC='/opt/app/solarisstudio12.4/bin/cc' CPP='/opt/app/solarisstudio12.4/bin/cc -E' ./configure --prefix=/opt/app/apache --with-pcre=/opt/app/pcre/bin/pcre2-config

Here is the log:
"util_pcre.c", line 49: cannot find include file: "pcre.h"
"util_pcre.c", line 104: undefined symbol: pcre_free
"util_pcre.c", line 104: function designator is not of function type
"util_pcre.c", line 105: cannot recover from previous errors
cc: acomp failed for util_pcre.c
gmake[2]: *** [util_pcre.lo] Error 1
gmake[2]: Leaving directory `/export/home/admin/Downloads/httpd-2.4.2/server'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/admin/Downloads/httpd-2.4.2/server'
gmake: *** [all-recursive] Error 1

Apache 2.4 is expecting pcre, and you're building with pcre2, which is not compatible.

FWIW, the Solaris pcre package should work nicely for you, unless you're specifically building everything from scratch.

  • This, you can also look into OpenCSW for the packages so you don't have to compile yourself. – Sokel Feb 3 '17 at 5:30
  • Pcre2 is incompatible. /usr/bin/pcre-config Failed. I also downloaded,installed, and used pcre-8.70. Also failed. There are something I missed. – user3323980 Feb 4 '17 at 2:13
  • 1
    So, i found what i am missing. GCC got confused when the pcre lib is 32bit while what i try to compile is 64 bit. So, I remake everything with proper environment and retest all lib is in 64 bit. Voila . Problem solved. – user3323980 Feb 8 '17 at 3:58
  • Great catch. It's often something that seems so simple in retrospect that stymies us for days. :) – Tim Kennedy Feb 8 '17 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.