Project

General

Profile

[PATCH] lighttpd2: build fixes for Fedora 18

Added by ckujau over 6 years ago

On a Fedora 18 system, building lighttpd2 would fail in several steps:

$ ./autogen.sh
[...]
automake: warnings are treated as errors
include/lighttpd/Makefile.am:2: warning: filter-out config.h,$(wildcard $(srcdir: non-POSIX variable name
include/lighttpd/Makefile.am:2: (probably a GNU make extension)
[...]
tests/Makefile.am:2: warning: wildcard $(srcdir: non-POSIX variable name
tests/Makefile.am:2: (probably a GNU make extension)

And, when this was fixed covered up:

automake: warnings are treated as errors
/usr/share/automake-1.12/am/ltlibrary.am: warning: 'liblighttpd2-sharedangel.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/angel/Makefile.am:3:   while processing Libtool library 'liblighttpd2-sharedangel.la'
src/angel/Makefile.am:28: warning: compiling 'angel_main.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac'

When this was fixed, "make" failed (when configured with --with-gnutls):

/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include/lighttpd  -I../../include -I../../include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glibc
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../include/lighttpd -I../../include -I../../include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libo
In file included from ../../include/lighttpd/settings.h:46:0,
                 from ../../include/lighttpd/base.h:10,
                 from mod_gnutls.c:2:
/usr/include/libev/ev.h:206:17: warning: ISO C restricts enumerator values to range of 'int' [-pedantic]
/usr/include/libev/ev.h:228:17: warning: ISO C restricts enumerator values to range of 'int' [-pedantic]
In file included from mod_gnutls.c:5:0:
/usr/include/glib-2.0/glib/galloca.h:28:2: error: #error "Only <glib.h> can be included directly." 
make[2]: *** [libmod_gnutls_la-mod_gnutls.lo] Error 1
make[2]: Leaving directory `/root/dev/lighttpd2-git/src/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/dev/lighttpd2-git/src'
make: *** [all-recursive] Error 1

With the patch attached, the build succeeded.

$ rpm -qa | egrep 'automake|gcc|libtool|pkg-config|gnutls-devel|ragel|pcre-devel|glib2-devel|libev-devel|zlib-devel' | sort
automake-1.12.2-5.fc18.noarch
gcc-4.7.2-8.fc18.i686
gcc-c++-4.7.2-8.fc18.i686
glib2-devel-2.34.2-2.fc18.i686
gnutls-devel-2.12.22-1.fc18.i686
libev-devel-4.11-1.fc18.i686
libgcc-4.7.2-8.fc18.i686
libtool-2.4.2-7.fc18.i686
libtool-ltdl-2.4.2-7.fc18.i686
pcre-devel-8.31-4.fc18.i686
ragel-6.6-6.fc18.i686
zlib-devel-1.2.7-9.fc18.i686