coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
516 stars 258 forks source link

Compile error with --enable-location #167

Open drkhosla opened 8 years ago

drkhosla commented 8 years ago

When I try to compile coovachilli with following option

./configure --prefix=/usr --enable-largelimits --enable-chilliredir --enable-chilliproxy --enable-chilliscript --with-poll --enable-libjson --with-openssl --enable-chilliradsec --enable-layer3 --enable-redirinject --enable-useragent --enable-location --enable-proxyvsa --enable-gardenext --enable-ipwhitelist --enable-uamdomainfile

I get an error

make[3]: Entering directory /root/coova-chilli/src' depbase=echo chilli.lo | sed 's|[^/]_$|.deps/&|;s|.lo$||'`;\ /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF='"/usr/etc/chilli.conf"' -DDEFPIDFILE='"/usr/var/run/chilli.pid"' -DDEFSTATEDIR='"/usr/var/run"' -DSBINDIR='"/usr/sbin"' -I../json -g -O2 -MT chilli.lo -MD -MP -MF $depbase.Tpo -c -o chilli.lo chilli.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF=\"/usr/etc/chilli.conf\" -DDEFPIDFILE=\"/usr/var/run/chilli.pid\" -DDEFSTATEDIR=\"/usr/var/run\" -DSBINDIR=\"/usr/sbin\" -I../json -g -O2 -MT chilli.lo -MD -MP -MF .deps/chilli.Tpo -c chilli.c -fPIC -DPIC -o .libs/chilli.o chilli.c: In function 'chilli_learn_location': chilli.c:2964:9: error: 's_state' undeclared (first use in this function) sizeof(s_state.pendinglocation)); ^ chilli.c:2964:9: note: each undeclared identifier is reported only once for each function it appears in make[3]: ** [chilli.lo] Error 1

When I compile without --enable-location I am able to compile it without any problem.

sevan commented 8 years ago

@gbaligh thanks. The issue has highlighted (to me at least) that it's not possible to set --enable-location alone, it relies on other functionality to be enabled, which is not by default. It should be possible to take care of this with it autoconf so that setting --enable-location implies enabling its dependent flags.