Problem cross compiling for ARM on Ubunto without PCRE support. C errors.
I'm very new to this in general. I'm working off an Ubuntu 9.04 Linux OS. We are cross compiling Lighttpd without PCRE support for arm_v5t_le.
Below is the general configure line:
./configure --build=$(BUILD) --host=$(HOST) --prefix=$(INSTALL_STAGE) \ --without-pcre --without-zlib --without-bzip2 --without-gdbm \ --without-memcache
This works fine however when we go to make we get:
mod_rewrite.c: In function ‘process_rewrite_rules’: mod_rewrite.c:451: error: ‘hctx’ undeclared (first use in this function) mod_rewrite.c:451: error: (Each undeclared identifier is reported only once mod_rewrite.c:451: error: for each function it appears in.) make: *** [mod_rewrite.lo] Error 1
This is for an embedded system and we don't have alot of space to work with, so I need to build without PCRE (at least for now). Please help.
RE: Problem cross compiling for ARM on Ubunto without PCRE support. C errors. - Added by jsuprock over 7 years ago
- FOUND FIX ***
This is a major bug in the code when PCRE support is not built-in...it halts all building, but I found the solution.
sed -i -r 's@(UNUSED[(]hctx[)];)@// PATCHFIX -- BADCODE: // \1@' src/mod_rewrite.c
will fix this problem. There is an UNUSED call going on in line 451 of that file that does not need to happen because this variable is being declared on the PCRE part of the #ifdef statement. This was found within function
static int process_rewrite_rules(server *srv, connection *con, plugin_data *p, rewrite_rule_buffer *kvb)
The binary seems to build now under src and I will test out my new httpd daemon tomorrow. :-)