betolj / ndpi-netfilter

GNU General Public License v2.0
126 stars 72 forks source link

Problem with Ubuntu 18 #74

Open Yuranchik opened 5 years ago

Yuranchik commented 5 years ago

Hello

I user your library with Ubuntu 16.04, it was OK. Compilling was success.

Now i try to compile on Ubuntu 18 with kernel 4.15.0-22-generic.

nDPI was compilled success. But whe i try to compile

cd .. sudo NDPI_PATH=/usr/src/ndpi-netfilter-master/nDPI make

i have a problem:

make[1]: Entering directory '/usr/src/ndpi-netfilter-master/ipt' if test -d ndpi_cpy; then \ cp /usr/src/ndpi-netfilter-master/nDPI/src/* ndpi_cpy -R; \ else \ mkdir ndpi_cpy; \ cp /usr/src/ndpi-netfilter-master/nDPI/src/* ndpi_cpy -R; \ fi make libxt_ndpi.so make[2]: Entering directory '/usr/src/ndpi-netfilter-master/ipt' cc -fPIC -Indpi_cpy/include -Indpi_cpy/lib -I../src -DOPENDPI_NETFILTER_MODULE -O2 -Wall -DNDPI_IPTABLES_EXT -D_INIT=libxt_ndpi_init -c -o libxt_ndpi.o libxt_ndpi.c; libxt_ndpi.c: In function ‘ndpi_mt_init’: libxt_ndpi.c:112:25: warning: unused variable ‘info’ [-Wunused-variable] struct xt_ndpi_mtinfo *info = (void *)match->data; ^~~~ cc -shared -o libxt_ndpi.so libxt_ndpi.o; rm libxt_ndpi.o make[2]: Leaving directory '/usr/src/ndpi-netfilter-master/ipt' rm -r ndpi_cpy make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/ipt' make -C src make[1]: Entering directory '/usr/src/ndpi-netfilter-master/src' if test -d ndpi_cpy; then \ cp /usr/src/ndpi-netfilter-master/nDPI/src/* ndpi_cpy -R; \ else \ mkdir ndpi_cpy; \ cp /usr/src/ndpi-netfilter-master/nDPI/src/* ndpi_cpy -R; \ fi cp ndpi_cpy/../../nDPI-patch/src/* ndpi_cpy/ -R; cp ndpi_cpy/lib/third_party/src/*.c ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/*.h ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/*.h ndpi_cpy/include -R; sed -i "s/^\s*void ndpi_free_flow/\/\/void ndpi_free_flow/" ndpi_cpy/include/ndpi_api.h; make -C /lib/modules/4.15.0-22-generic/build M=$PWD; make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" CC [M] /usr/src/ndpi-netfilter-master/src/main.o /usr/src/ndpi-netfilter-master/src/main.c: In function ‘ndpi_mt’: /usr/src/ndpi-netfilter-master/src/main.c:633:13: error: implicit declaration of function ‘nf_ct_is_untracked’; did you mean ‘nf_ct_is_expired’? [-Werror=implicit-function-declaration] } else if (nf_ct_is_untracked(ct)){ ^~~~~~~~~~~~~~~~~~ nf_ct_is_expired At top level: /usr/src/ndpi-netfilter-master/src/main.c:99:13: warning: ‘debug_printf’ defined but not used [-Wunused-function] static void debug_printf(u32 protocol, void *id_struct, ^~~~~~~~~~~~ cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/usr/src/ndpi-netfilter-master/src/main.o' failed make[3]: *** [/usr/src/ndpi-netfilter-master/src/main.o] Error 1 Makefile:1552: recipe for target '_module_/usr/src/ndpi-netfilter-master/src' failed make[2]: *** [_module_/usr/src/ndpi-netfilter-master/src] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:155: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/src' Makefile:5: recipe for target 'all' failed make: *** [all] Error 2

Can you halp please ?

Thanks

Yuranchik commented 5 years ago

make[1]: Entering directory '/usr/src/ndpi-netfilter-master/ipt' if test -d ndpi_cpy; then \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ else \ mkdir ndpi_cpy; \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ fi make libxt_ndpi.so make[2]: Entering directory '/usr/src/ndpi-netfilter-master/ipt' cc -fPIC -Indpi_cpy/include -Indpi_cpy/lib -I../src -DOPENDPI_NETFILTER_MODULE -O2 -Wall -DNDPI_IPTABLES_EXT -D_INIT=libxt_ndpi_init -c -o libxt_ndpi.o libxt_ndpi.c; libxt_ndpi.c: In function ‘ndpi_mt_init’: libxt_ndpi.c:112:25: warning: unused variable ‘info’ [-Wunused-variable] struct xt_ndpi_mtinfo info = (void )match->data; ^~~~ cc -shared -o libxt_ndpi.so libxt_ndpi.o; rm libxt_ndpi.o make[2]: Leaving directory '/usr/src/ndpi-netfilter-master/ipt' rm -r ndpi_cpy make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/ipt' make -C src make[1]: Entering directory '/usr/src/ndpi-netfilter-master/src' if test -d ndpi_cpy; then \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ else \ mkdir ndpi_cpy; \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ fi cp ndpi_cpy/../../nDPI-patch/src/ ndpi_cpy/ -R; cp ndpi_cpy/lib/third_party/src/.c ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/.h ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/.h ndpi_cpy/include -R; sed -i "s/^\svoid ndpi_free_flow/\/\/void ndpi_free_flow/" ndpi_cpy/include/ndpi_api.h; make -C /lib/modules/4.15.0-22-generic/build M=$PWD; make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" CC [M] /usr/src/ndpi-netfilter-master/src/main.o /usr/src/ndpi-netfilter-master/src/main.c: In function ‘ndpi_mt’: /usr/src/ndpi-netfilter-master/src/main.c:633:13: error: implicit declaration of function ‘nf_ct_is_untracked’; did you mean ‘nf_ct_is_expired’? [-Werror=implicit-function-declaration] } else if (nf_ct_is_untracked(ct)){ ^~~~~~ nf_ct_is_expired At top level: /usr/src/ndpi-netfilter-master/src/main.c:99:13: warning: ‘debug_printf’ defined but not used [-Wunused-function] static void debug_printf(u32 protocol, void id_struct, ^~~~ cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/usr/src/ndpi-netfilter-master/src/main.o' failed make[3]: [/usr/src/ndpi-netfilter-master/src/main.o] Error 1 Makefile:1552: recipe for target 'module/usr/src/ndpi-netfilter-master/src' failed make[2]: [module/usr/src/ndpi-netfilter-master/src] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:155: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/src' Makefile:5: recipe for target 'all' failed make: [all] Error 2

Yuranchik commented 5 years ago

One moment I made apt-get install libelf-dev and next line was gone Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel

But is error with compillation:

make[1]: Entering directory '/usr/src/ndpi-netfilter-master/src' if test -d ndpi_cpy; then \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ else \ mkdir ndpi_cpy; \ cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; \ fi cp ndpi_cpy/../../nDPI-patch/src/ ndpi_cpy/ -R; cp ndpi_cpy/lib/third_party/src/.c ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/.h ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/.h ndpi_cpy/include -R; sed -i "s/^\svoid ndpi_free_flow/\/\/void ndpi_free_flow/" ndpi_cpy/include/ndpi_api.h; make -C /lib/modules/4.15.0-22-generic/build M=$PWD; make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic' CC [M] /usr/src/ndpi-netfilter-master/src/main.o /usr/src/ndpi-netfilter-master/src/main.c: In function ‘ndpi_mt’: /usr/src/ndpi-netfilter-master/src/main.c:633:13: error: implicit declaration of function ‘nf_ct_is_untracked’; did you mean ‘nf_ct_is_expired’? [-Werror=implicit-function-declaration] } else if (nf_ct_is_untracked(ct)){ ^~~~~~ nf_ct_is_expired At top level: /usr/src/ndpi-netfilter-master/src/main.c:99:13: warning: ‘debug_printf’ defined but not used [-Wunused-function] static void debug_printf(u32 protocol, void id_struct, ^~~~ cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/usr/src/ndpi-netfilter-master/src/main.o' failed make[3]: [/usr/src/ndpi-netfilter-master/src/main.o] Error 1 Makefile:1552: recipe for target 'module/usr/src/ndpi-netfilter-master/src' failed make[2]: [module/usr/src/ndpi-netfilter-master/src] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:155: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/src' Makefile:5: recipe for target 'all' failed make: [all] Error 2

rightkick commented 5 years ago

I just compiled today ndpi on kernel 4.9.6 debian9 without any issues. Have you installed kernel headers?

On Thu, Apr 25, 2019, 12:42 Yuranchik notifications@github.com wrote:

One moment I made apt-get install libelf-dev and next line was gone Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel

But is error with compillation:

make[1]: Entering directory '/usr/src/ndpi-netfilter-master/src' if test -d ndpi_cpy; then cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; else mkdir ndpi_cpy; cp /usr/src/ndpi-netfilter-master/nDPI/src/ ndpi_cpy -R; fi cp ndpi_cpy/../../nDPI-patch/src/ ndpi_cpy/ -R; cp ndpi_cpy/lib/third_party/src/ .c ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/.h ndpi_cpy/lib -R; cp ndpi_cpy/lib/third_party/include/ .h ndpi_cpy/include -R; sed -i "s/^\svoid ndpi_free_flow///void ndpi_free_flow/" ndpi_cpy/include/ndpi_api.h; make -C /lib/modules/4.15.0-22-generic/build M=$PWD; make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic' CC [M] /usr/src/ndpi-netfilter-master/src/main.o /usr/src/ndpi-netfilter-master/src/main.c: In function ‘ndpi_mt’: /usr/src/ndpi-netfilter-master/src/main.c:633:13: error: implicit declaration of function ‘nf_ct_is_untracked’; did you mean ‘nf_ct_is_expired’? [-Werror=implicit-function-declaration] } else if (nf_ct_is_untracked(ct)){ ^~~~~~ nf_ct_is_expired At top level: /usr/src/ndpi-netfilter-master/src/main.c:99:13: warning: ‘debug_printf’ defined but not used [-Wunused-function] static void debug_printf(u32 protocol, void id_struct, ^~~~ cc1: some warnings being treated as errors scripts/Makefile.build:332: recipe for target '/usr/src/ndpi-netfilter-master/src/main.o' failed make[3]: [/usr/src/ndpi-netfilter-master/src/main.o] Error 1 Makefile:1552: recipe for target 'module/usr/src/ndpi-netfilter-master/src' failed make[2]: [module/usr/src/ndpi-netfilter-master/src] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic' Makefile:155: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/usr/src/ndpi-netfilter-master/src' Makefile:5: recipe for target 'all' failed make: [all] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/betolj/ndpi-netfilter/issues/74#issuecomment-486602665, or mute the thread https://github.com/notifications/unsubscribe-auth/ADTZ27GDDUT34CSX24WF3DDPSF4HDANCNFSM4HILKGKA .

ngocnn97 commented 4 years ago

@rightkick when i make modue_install . I get the error. can you help me . nguyenngockma97@gmail.com

djamic commented 2 years ago

you can use for new fork from ndpi , i check, debian 11,ubuntu 20, 22.04 https://github.com/vel21ripn/nDPI

rightkick commented 2 years ago

@djamic I totally agree. The project is regularly maintained and working on modern kernels.