Problem building with static pcre
Ian Silvester <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
So in the run-up to the 3.0.20 release I'm testing package builds, and am tripping over a test in the configure script when trying to build the binary with static pcre. Using the following invocation against a completely vanilla checkout of current (on my build machine that does have libpcre installed):
CFLAGS= -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -mmacosx-version-min=10.6
LDFLAGS= -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -mmacosx-version-min=10.6
./configure --with-user=_privoxy --with-group=_privoxy
I get the following (snippet of) output:
checking for pcre_compile in -lpcre... yes
checking pcre.h usability... no
checking pcre.h presence... yes
configure: WARNING: pcre.h: present but cannot be compiled
configure: WARNING: pcre.h: check for missing prerequisite headers?
configure: WARNING: pcre.h: see the Autoconf documentation
configure: WARNING: pcre.h: section "Present But Cannot Be Compiled"
configure: WARNING: pcre.h: proceeding with the preprocessor's result
configure: WARNING: pcre.h: in the future, the compiler will take precedence
checking for pcre.h... yes
checking for regcomp in -lpcreposix... yes
checking pcreposix.h usability... no
checking pcreposix.h presence... yes
configure: WARNING: pcreposix.h: present but cannot be compiled
configure: WARNING: pcreposix.h: check for missing prerequisite headers?
configure: WARNING: pcreposix.h: see the Autoconf documentation
configure: WARNING: pcreposix.h: section "Present But Cannot Be Compiled"
configure: WARNING: pcreposix.h: proceeding with the preprocessor's result
configure: WARNING: pcreposix.h: in the future, the compiler will take precedence
checking for pcreposix.h... yes
checking for zlibVersion in -lz... yes
using libpcre
Enabling connection-sharing support.
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating doc/source/ldp.dsl
config.status: creating config.h
Notice: building the privoxy software.
rm -f a.out actions.o cgi.o cgiedit.o cgisimple.o deanimate.o encode.o errlog.o filters.o gateway.o jbsockets.o jcc.o list.o loadcfg.o loaders.o miscutil.o parsers.o ssplit.o urlmatch.o pcrs.o privoxy default.action \
`find . -name TAGS -o -name tags | grep -v .git` config.base config.tmp
gcc -c -pipe -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 -mmacosx-version-min=10.6 -Dunix -Wall actions.c -o actions.o
In file included from actions.c:47:
project.h:75:22: error: pcre.h: No such file or directory
In file included from project.h:80,
from actions.c:47:
pcrs.h:94: error: expected specifier-qualifier-list before ‘pcre’
project.h:91:27: error: pcreposix.h: No such file or directory
In file included from actions.c:47:
project.h:369: error: expected specifier-qualifier-list before ‘regex_t’
actions.c: In function ‘update_action_bits_for_tag’:
actions.c:814: error: ‘struct url_spec’ has no member named ‘tag_regex’
actions.c:820: warning: implicit declaration of function ‘regexec’
actions.c:820: error: ‘struct url_spec’ has no member named ‘tag_regex’
make: *** [actions.o] Error 1
Obviously the failure is at "checking pcre.h usability... no", which results in configure thinking that dynamic pcre is to be used ("using libpcre" later in the configure output); the compile then fails since I'm not including the path to the library's header (obviously enough, since I want to use static pcre!).
My issue is that I don't understand autoconf syntax so despite my best efforts to comprehend it I don't know what is being tested to check pcre.h usability. I've worked around this by using the --disable-dynamic-pcre configure option but it is a shame to have to force it - I'd be happier if I could understand why the test fails.
Thanks for any pointers,
Ian
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412