ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.28k stars 656 forks source link

Unable to compile (too many arguments to function ‘void ndpi_free_data_analysis) #5017

Closed DigiAngel closed 3 years ago

DigiAngel commented 3 years ago

Welp, after git pulling and installing the latest nDPI I see:

g++ -std=c++0x -g -O2 -I/home/nobackup/build/ntopng -I/home/nobackup/build/ntopng/include -Wall -I/usr/local/include -D_FILE_OFFSET_BITS=64 -I/usr/include/hiredis -I/usr/include/hiredis -I/home/nobackup/build/ntopng/third-party/mongoose -I/usr/include/json-c   -I/opt/ntopng/ndpi/include/ndpi -I/opt/ntopng/ndpi/include/ndpi/../lib/third_party/include -I/home/nobackup/build/ntopng/third-party/lua-5.3.5/src   -I/usr/include/mysql  -Wno-address-of-packed-member -Wno-unused-function -I/home/nobackup/build/ntopng -I/home/nobackup/build/ntopng/include -I/usr/local/include -I/home/nobackup/build/ntopng/third-party/http-client-c/src/  -I/usr/include/openssl  -DDATA_DIR='"/opt/ntopng/share"' -I/home/nobackup/build/ntopng/third-party/libgeohash -I/home/nobackup/build/ntopng/third-party/patricia   -c src/VirtualHost.cpp -o src/VirtualHost.o
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:210:0,
                 from src/VirtualHost.cpp:22:
/home/nobackup/build/ntopng/include/PeerStats.h: In destructor ‘PeerStats::~PeerStats()’:
/home/nobackup/build/ntopng/include/PeerStats.h:45:55: error: too many arguments to function ‘void ndpi_free_data_analysis(ndpi_analyze_struct*)’
       ndpi_free_data_analysis(contacted_peer_as_cli, 0);
                                                       ^
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:116:0,
                 from src/VirtualHost.cpp:22:
/opt/ntopng/ndpi/include/ndpi/ndpi_api.h:1365:8: note: declared here
   void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
        ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:210:0,
                 from src/VirtualHost.cpp:22:
/home/nobackup/build/ntopng/include/PeerStats.h:47:55: error: too many arguments to function ‘void ndpi_free_data_analysis(ndpi_analyze_struct*)’
       ndpi_free_data_analysis(contacted_peer_as_srv, 0);
                                                       ^
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:116:0,
                 from src/VirtualHost.cpp:22:
/opt/ntopng/ndpi/include/ndpi/ndpi_api.h:1365:8: note: declared here
   void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
        ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:210:0,
                 from src/VirtualHost.cpp:22:
/home/nobackup/build/ntopng/include/PeerStats.h: In member function ‘void PeerStats::reset()’:
/home/nobackup/build/ntopng/include/PeerStats.h:69:81: error: too many arguments to function ‘void ndpi_free_data_analysis(ndpi_analyze_struct*)’
     if(contacted_peer_as_cli)   ndpi_free_data_analysis(contacted_peer_as_cli, 0);
                                                                                 ^
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:116:0,
                 from src/VirtualHost.cpp:22:
/opt/ntopng/ndpi/include/ndpi/ndpi_api.h:1365:8: note: declared here
   void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
        ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:210:0,
                 from src/VirtualHost.cpp:22:
/home/nobackup/build/ntopng/include/PeerStats.h:70:81: error: too many arguments to function ‘void ndpi_free_data_analysis(ndpi_analyze_struct*)’
     if(contacted_peer_as_srv)   ndpi_free_data_analysis(contacted_peer_as_srv, 0);
                                                                                 ^
In file included from /home/nobackup/build/ntopng/include/ntop_includes.h:116:0,
                 from src/VirtualHost.cpp:22:
/opt/ntopng/ndpi/include/ndpi/ndpi_api.h:1365:8: note: declared here
   void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
        ^~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
Makefile:151: recipe for target 'src/VirtualHost.o' failed
make: *** [src/VirtualHost.o] Error 1

Latest git.

cardigliano commented 3 years ago

Did you update both nDPI and ntopng? This has been fixed 1-2h ago

DigiAngel commented 3 years ago

I did...both repos show "Already up to date." For ntopng: commit 5b6f794d02c1e52215cb7325e70bff1058c23166, for ndpi:95a6a2072b31f999f02928a15d7316bf756b1fa9.

DigiAngel commented 3 years ago

Recompiling nDPI and reinstalling nDPI now.

DigiAngel commented 3 years ago

Huh...2nd times a charm...compiled now so ...thank you!