coova / coova-chilli

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

can't compile coova 1.3.1.4 #265

Open keulu opened 8 years ago

keulu commented 8 years ago

Hi guys, i'm having some trouble to compile coova on linux 6.0.10

is it ready to use for debian 6 ?

this is my config

./configure --enable-chilliquery --enable-coa --enable-radproxy --enable-dhcpradius --enable-dnslog --enable-uamdomainfile --enable-ieee8021q --enable-json --enable-largelimits --enable-leakybucket --enable-uamanyip --enable-uamuiport --with-openssl --with-nfcoova

2 errors for me :

--enable-json make a compilation error :

mv -f $depbase.Tpo $depbase.Po
/bin/bash ../libtool --tag=CC   --mode=link gcc -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF='"/usr/local/etc/chilli.conf"' -DDEFPIDFILE='"/usr/local/var/run/chilli.pid"' -DDEFSTATEDIR='"/usr/local/var/run"' -DSBINDIR='"/usr/local/sbin"'    -g -O2   -o chilli main.o libchilli.la  ../bstring/libbstring.la  -lssl -lcrypto      -lrt 
libtool: link: gcc -D_GNU_SOURCE -Wall -Werror -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -funroll-loops -pipe -I../bstring -DDEFCHILLICONF=\"/usr/local/etc/chilli.conf\" -DDEFPIDFILE=\"/usr/local/var/run/chilli.pid\" -DDEFSTATEDIR=\"/usr/local/var/run\" -DSBINDIR=\"/usr/local/sbin\" -g -O2 -o .libs/chilli main.o  ./.libs/libchilli.so ../bstring/.libs/libbstring.so -lssl -lcrypto -lrt
./.libs/libchilli.so: undefined reference to `json_object_new_string'
./.libs/libchilli.so: undefined reference to `json_object_put'
./.libs/libchilli.so: undefined reference to `json_object_to_json_string'
collect2: ld returned 1 exit status
make[3]: *** [chilli] Error 1
make[3]: Leaving directory `/root/coova-chilli-1.3.1.3/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/coova-chilli-1.3.1.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/coova-chilli-1.3.1.3'
make: *** [all] Error 2

--enable-nfcoova make a compilation error :

make[4]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
  LD      /root/coova-chilli-1.3.1.3/src/linux/built-in.o
  CC [M]  /root/coova-chilli-1.3.1.3/src/linux/xt_coova.o
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:213: warning: 'struct xt_action_param' declared inside parameter list
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:213: warning: its scope is only this definition or declaration, which is probably not what you want
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c: In function 'coova_mt':
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:216: error: dereferencing pointer to incomplete type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:225: error: dereferencing pointer to incomplete type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:256: error: dereferencing pointer to incomplete type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:259: error: dereferencing pointer to incomplete type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:296:5: warning: "LINUX_VERSION_CODE" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:296:27: warning: "KERNEL_VERSION" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:296:41: error: missing binary operator before token "("
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:338:27: warning: extra tokens at end of #ifdef directive
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:458:5: warning: "LINUX_VERSION_CODE" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:458:26: warning: "KERNEL_VERSION" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:458:40: error: missing binary operator before token "("
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:467:5: warning: "LINUX_VERSION_CODE" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:467:27: warning: "KERNEL_VERSION" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:467:41: error: missing binary operator before token "("
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c: In function 'coova_seq_open':
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:470: error: 'pde' undeclared (first use in this function)
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:470: error: (Each undeclared identifier is reported only once
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:470: error: for each function it appears in.)
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:479:5: warning: "LINUX_VERSION_CODE" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:479:27: warning: "KERNEL_VERSION" is not defined
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:479:41: error: missing binary operator before token "("
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c: At top level:
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:591: warning: initialization from incompatible pointer type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:593: warning: initialization from incompatible pointer type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:605: warning: initialization from incompatible pointer type
/root/coova-chilli-1.3.1.3/src/linux/xt_coova.c:607: warning: initialization from incompatible pointer type
make[7]: *** [/root/coova-chilli-1.3.1.3/src/linux/xt_coova.o] Error 1
make[6]: *** [_module_/root/coova-chilli-1.3.1.3/src/linux] Error 2
make[5]: *** [sub-make] Error 2
make[4]: *** [all] Error 2
make[4]: Leaving directory `/usr/src/linux-headers-2.6.32-5-686'
make[3]: *** [all] Error 2
rm libxt_coova.o
make[3]: Leaving directory `/root/coova-chilli-1.3.1.3/src/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/coova-chilli-1.3.1.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/coova-chilli-1.3.1.3'
make: *** [all] Error 2

I've also make a change in src/ssl.c:128

from :

const long options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION;

to :

const long options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;

  #ifdef SSL_OP_NO_COMPRESSION
    options |= SSL_OP_NO_COMPRESSION;
  #endif

You see 1.3.1.3, but it's the same with 1.3.1.4 , i just make multiple try