bsmeding / ansible_role_iptv_analyzer

Ansible role to install IPTV multicast analyzer
0 stars 0 forks source link

Make errors #1

Open tubby1981 opened 4 years ago

tubby1981 commented 4 years ago

I can't create an issue here: https://github.com/bsmeding/IPTV-Analyzer, that's why I'm creating an issue on this page

I am getting errors when I do the ./configure, make, make install on Ubuntu 20 with kernel 5.4.0-42-generic Do you have a solution for this?


make all-recursive make[1]: Entering directory '/home//iptvanalyzer-0.9.5/IPTV-Analyzer-master' Making all in iptables-module make[2]: Entering directory '/home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module'

-=-=-=-=- Userspace lib -=-=-=-=- gcc -DIPTABLES_VERSION=\"1.8.4\" -O2 -ggdb3 -Wall -fPIC -I/usr/include -D_INIT=libxt_mpeg2ts_init -c -o libxt_mpeg2ts.o libxt_mpeg2ts.c; In file included from /usr/include/string.h:495, from libxt_mpeg2ts.c:18: In function ‘strncpy’, inlined from ‘mpeg2ts_mt_parse’ at libxt_mpeg2ts.c:100:3: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ^~~~~~~~~~~~~~ gcc -shared -o libxt_mpeg2ts.so libxt_mpeg2ts.o;

-=-=-=-=- Kernel modules -=-=-=-=- make -C /lib/modules/5.4.0-42-generic/build M=/home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module modules make[3]: Entering directory '/usr/src/linux-headers-5.4.0-42-generic' CC [M] /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.o /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c: In function ‘conn_htable_destroy’: /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:798:4: error: implicit declaration of function ‘call_rcu_bh’; did you mean ‘call_rcu’? [-Werror=implicit-function-declaration] 798 | call_rcu_bh(&stream->rcu_head, mpeg2ts_stream_free); | ^~~ | call_rcu /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c: In function ‘mpeg2ts_seq_show’: /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:1363:11: error: implicit declaration of function ‘timespec_sub’; did you mean ‘timespec64_sub’? [-Werror=implicit-function-declaration] 1363 | delta = timespec_sub(now, htable->time_created); | ^~~~ | timespec64_sub /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:1363:11: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c: In function ‘mpeg2ts_mt_exit’: /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:1494:2: error: implicit declaration of function ‘rcu_barrier_bh’; did you mean ‘rcu_barrier’? [-Werror=implicit-function-declaration] 1494 | rcu_barrier_bh(); | ^~~~~~ | rcu_barrier At top level: /home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:864:1: warning: ‘conn_htable_add’ defined but not used [-Wunused-function] 864 | conn_htable_add(struct xt_rule_mpeg2ts_conn_htable *hinfo) | ^~~~~~~ /home/*/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:852:1: warning: ‘conn_htable_put’ defined but not used [-Wunused-function] 852 | conn_htable_put(struct xt_rule_mpeg2ts_conn_htable *hinfo) | ^~~~~~~ /home/***/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.c:835:1: warning: ‘conn_htable_get’ defined but not used [-Wunused-function] 835 | conn_htable_get(uint32_t rule_id) | ^~~~~~~ cc1: some warnings being treated as errors make[4]: * [scripts/Makefile.build:275: /home/**/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module/xt_mpeg2ts.o] Error 1 make[3]: [Makefile:1731: /home/**/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module] Error 2 make[3]: Leaving directory '/usr/src/linux-headers-5.4.0-42-generic' make[2]: [Makefile:98: modules] Error 2 rm libxt_mpeg2ts.o make[2]: Leaving directory '/home/**/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module' make[1]: [Makefile:390: all-recursive] Error 1 make[1]: Leaving directory '/home/**/iptvanalyzer-0.9.5/IPTV-Analyzer-master' make: [Makefile:325: all] Error 2 root@iptvanalyzer01-kla-01:/home//iptvanalyzer-0.9.5/IPTV-Analyzer-master# make check Making check in iptables-module make[1]: Entering directory '/home//iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module' make[1]: * No rule to make target 'check'. Stop. make[1]: Leaving directory '/home/***/iptvanalyzer-0.9.5/IPTV-Analyzer-master/iptables-module' make: *** [Makefile:390: check-recursive] Error 1

bsmeding commented 4 years ago

Hi @tubby1981 ,

Just tried it with Ubuntu clean install, only with other kernel and works. Only i had to run ./configure as root and give argument for xtables.

bsmeding@iptvubuntu:~/IPTV-Analyzer$ make
make  all-recursive
make[1]: Entering directory '/home/bsmeding/IPTV-Analyzer'
Making all in iptables-module
make[2]: Entering directory '/home/bsmeding/IPTV-Analyzer/iptables-module'

  -=-=-=-=- Userspace lib -=-=-=-=-
gcc -DIPTABLES_VERSION=\"1.6.1\" -O2 -ggdb3 -Wall -fPIC -I/usr/include -D_INIT=libxt_mpeg2ts_init -c -o libxt_mpeg2ts.o libxt_mpeg2ts.c;
gcc -shared -o libxt_mpeg2ts.so libxt_mpeg2ts.o;

  -=-=-=-=- Kernel modules -=-=-=-=-
make -C /lib/modules/4.15.0-112-generic/build M=/home/bsmeding/IPTV-Analyzer/iptables-module modules
make[3]: Entering directory '/usr/src/linux-headers-4.15.0-112-generic'
  CC [M]  /home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.o
/home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.c:864:1: warning: ‘conn_htable_add’ defined but not used [-Wunused-function]
 conn_htable_add(struct xt_rule_mpeg2ts_conn_htable *hinfo)
 ^~~~~~~~~~~~~~~
/home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.c:852:1: warning: ‘conn_htable_put’ defined but not used [-Wunused-function]
 conn_htable_put(struct xt_rule_mpeg2ts_conn_htable *hinfo)
 ^~~~~~~~~~~~~~~
/home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.c:835:1: warning: ‘conn_htable_get’ defined but not used [-Wunused-function]
 conn_htable_get(uint32_t rule_id)
 ^~~~~~~~~~~~~~~
  CC [M]  /home/bsmeding/IPTV-Analyzer/iptables-module/compat_xtables.o
  Building modules, stage 2.
  MODPOST 2 modules
  CC      /home/bsmeding/IPTV-Analyzer/iptables-module/compat_xtables.mod.o
  LD [M]  /home/bsmeding/IPTV-Analyzer/iptables-module/compat_xtables.ko
  CC      /home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.mod.o
  LD [M]  /home/bsmeding/IPTV-Analyzer/iptables-module/xt_mpeg2ts.ko
make[3]: Leaving directory '/usr/src/linux-headers-4.15.0-112-generic'
rm libxt_mpeg2ts.o
make[2]: Leaving directory '/home/bsmeding/IPTV-Analyzer/iptables-module'
Making all in collector
make[2]: Entering directory '/home/bsmeding/IPTV-Analyzer/collector'
cp lib/IPTV/Analyzer/mpeg2ts.pm blib/lib/IPTV/Analyzer/mpeg2ts.pm
cp lib/IPTV/Analyzer/.gitignore blib/lib/IPTV/Analyzer/.gitignore
cp lib/IPTV/Analyzer/Version.pm blib/lib/IPTV/Analyzer/Version.pm
cp lib/IPTV/Analyzer/snmptrap.pm blib/lib/IPTV/Analyzer/snmptrap.pm
cp lib/IPTV/Analyzer/Log4perlTrapper.pm blib/lib/IPTV/Analyzer/Log4perlTrapper.pm
cp lib/IPTV/Analyzer/Version.pm.in blib/lib/IPTV/Analyzer/Version.pm.in
cp lib/IPTV/Analyzer/Config.pm blib/lib/IPTV/Analyzer/Config.pm
cp bin/iptv-collector blib/script/iptv-collector
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/iptv-collector
Manifying 1 pod document
Manifying 3 pod documents
make[2]: Leaving directory '/home/bsmeding/IPTV-Analyzer/collector'
make[2]: Entering directory '/home/bsmeding/IPTV-Analyzer'
make[2]: Leaving directory '/home/bsmeding/IPTV-Analyzer'
make[1]: Leaving directory '/home/bsmeding/IPTV-Analyzer'
bsmeding@iptvubuntu:~/IPTV-Analyzer$

Commands to reproduce:

sudo apt update
sudo apt-get upgrade
sudo apt-get install -y autoconf git gcc make
sudo apt-get install -y linux-headers-`uname -r`
sudo apt-get install -y libxtables-dev
sudo apt-get install -y libproc-daemon-perl libproc-pid-file-perl libconfig-file-perl libdata-compare-perl liblog-log4perl-perl libnet-snmp-perl liblog-dispatch-perl
sudo apt-get install -y mariadb-server mariadb-client
git clone https://github.com/bsmeding/IPTV-Analyzer
cd IPTV-Analyzer/
./autogen.sh
whereis xtables
sudo ./configure --with-xtlibdir=/usr/lib/x86_64-linux-gnu/xtables
make

-- next steps when correct make:

Prepare the iptables:

Make sure the collector settings are correct...

Make the collector start at boot:

tubby1981 commented 4 years ago

Hi @bsmeding

So you are using an older kernel. In Ubuntu 20 the kernel 5.4.XX is used. The kernel 4.15 is used in Ubuntu 18.04.

I have no problem compiling the software on Debian 10 or Ubuntu 18.04. I was curious if Ubuntu 20 also going to work. But during the tests I got the errors mentioned above.