[Techtalk] apache sed compile error.

Almut Behrens almut-behrens at gmx.net
Thu Aug 15 04:26:25 EST 2002


On Wed, Aug 14, 2002 at 07:31:33PM +0000, Jen B wrote:
> Hey folks,
> 
> I'm trying to build apache-1.3.26 on an
> x86 machine running Turbolinux Workstation 7.0 (Monza)
> 
> very little on this box has been installed or upgraded
> yet.
> 
> here's my compile output:
> 
> [root at ghost_082202 apache_1.3.26]# ./configure
> <snip>
> sed: -e expression #46, char 48: Unknown option to 's'
> <snip>
> [root at ghost_082202 apache_1.3.26]# make
> make: *** No targets.  Stop.
> 
> it looks like there's something up with sed.
> through use of gratuitous echo tags I've isolated the
> particular (and lengthy) statement using sed from
> the configure script:
> 
> echo "line 1307"
> 
> sed <Makefile.tmpl >$mkf \
> -e "s%@PLATFORM@%$PLATFORM%g" \
> <snip>
> -e "s%@conf_serveradmin@%$conf_serveradmin%g" \
> <snip>
>

if I counted the -e expressions correctly, it's failing in the
line where @conf_serveradmin@ is meant to be replaced with the
value of $conf_serveradmin. This variable is supposed to contain
the email address of the webserver admin. There's a script
src/helpers/buildinfo.sh, which tries to determine the proper
address (see line 1195 in ./configure:
conf_serveradmin="`$aux/buildinfo.sh -n %u@%h%d`" ).

I'd assume that something goes wrong here, so some garbage ends up
in $conf_serveradmin -- most probably containing a "%" sign, which
is then throwing sed off...

To see the variable's actual value, I'd put a

echo $conf_serveradmin

before the above sed command.

I once had a similar problem when buggy DHCP network configuration
tools had left some trailing garbage in /etc/resolv.conf (in the
"search ..." line). This file is being read, among others, by the
buildinfo.sh script...
But other reasons are conceivable, too, of course, like e.g. /bin/sh
being linked to some weird shell that doesn't handle backticks-embedded-
in-double-quotes as most other shells do (so $conf_serveradmin would
end up being `$aux/buildinfo.sh -n %u@%h%d`, literally...).
But, as this is Linux, where /bin/sh is almost always a bash, this is
not too likely...

Hope this helps somewhat,

Almut




More information about the Techtalk mailing list