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

Fails to compile #7026

Closed DigiAngel closed 1 year ago

DigiAngel commented 1 year ago

Environment:

What happened:

g++ -g -O2 -I/home//nobackup/build/ntopng -I/home//nobackup/build/ntopng/include -Wall -I/usr/local/include -std=c++1y -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.4.3/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"'    src/ThroughputStats.o  src/OperatingSystemHash.o  src/TrafficStats.o  src/ICMPinfo.o  src/ZMQPublisher.o  src/HostStats.o  src/ZMQCollectorInterface.o  src/LuaEngineFlow.o  src/AutonomousSystem.o  src/FlowGrouper.o  src/TcpFlowStats.o  src/ActiveHostWalkerInfo.o  src/RoundTripStats.o  src/IpAddress.o  src/Prefs.o  src/HTTPserver.o  src/VirtualHost.o  src/PeriodicActivities.o  src/FrequentStringItems.o  src/ParsedFlowCore.o  src/Redis.o  src/EthStats.o  src/GenericHash.o  src/FlowStats.o  src/NetworkDiscovery.o  src/TimeseriesExporter.o  src/Paginator.o  src/HostAlert.o  src/BlacklistStats.o  src/VLANHash.o  src/Host.o  src/HostAlertableEntity.o  src/SyslogLuaEngine.o  src/ParsedeBPF.o  src/ObservationPointHash.o  src/AutonomousSystemHash.o  src/BroadcastDomains.o  src/Trace.o  src/ContinuousPing.o  src/HostPorts.o  src/InterarrivalStats.o  src/SyslogCollectorInterface.o  src/AddressResolution.o  src/MostVisitedList.o  src/ScoreStats.o  src/ChecksLoader.o  src/SQLiteAlertStore.o  src/VLANAddressTree.o  src/Bloom.o  src/Recipients.o  src/HostCheck.o  src/Bitmap128.o  src/VirtualHostHash.o  src/LuaEngineInterface.o  src/HostChecksExecutor.o  src/GenericTrafficElement.o  src/ListeningPorts.o  src/ThreadedActivity.o  src/AlertableEntity.o  src/AlertCounter.o  src/Ntop.o  src/ParserInterface.o  src/PcapInterface.o  src/FlowRiskAlerts.o  src/LuaEngine.o  src/ViewInterface.o  src/FlowAlertsLoader.o  src/DSCPStats.o  src/RRDTimeseriesExporter.o  src/MacHash.o  src/ProtoStats.o  src/nDPIStats.o  src/NtopGlobals.o  src/Geolocation.o  src/Check.o  src/ZCCollectorInterface.o  src/ThreadPool.o  src/PacketDumper.o  src/Condvar.o  src/DB.o  src/FlowTrafficStats.o  src/ObservationPoint.o  src/VLAN.o  src/NetworkInterface.o  src/Ping.o  src/Mutex.o  src/MacManufacturers.o  src/MDNS.o  src/LuaEngineHost.o  src/NetworkStats.o  src/RwLock.o  src/ThreadedActivityStats.o  src/RemoteHost.o  src/LocalHost.o  src/ParsedFlow.o  src/PacketDumperTuntap.o  src/ICMPstats.o  src/ViewScoreStats.o  src/main.o  src/SyslogParserInterface.o  src/HostHash.o  src/DnsStats.o  src/GenericHashEntry.o  src/PacketStats.o  src/LocalTrafficStats.o  src/AlertsQueue.o  src/RecipientQueue.o  src/Mac.o  src/Utils.o  src/ElasticSearch.o  src/FlowChecksExecutor.o  src/Score.o  src/SyslogDump.o  src/SQLiteStoreManager.o  src/FlowAlert.o  src/ContinuousPingStats.o  src/LuaEngineNtop.o  src/OtherAlertableEntity.o  src/L4Stats.o  src/FlowChecksLoader.o  src/Country.o  src/DummyInterface.o  src/OperatingSystem.o  src/Fingerprint.o  src/MacStats.o  src/HostPools.o  src/ContainerStats.o  src/Bitmask.o  src/PeriodicScript.o  src/CountriesHash.o  src/IEC104Stats.o  src/FlowCheck.o  src/HTTPstats.o  src/PartializableFlowTrafficStats.o  src/ExportInterface.o  src/HostChecksLoader.o  src/LocalHostStats.o  src/SNMP.o  src/SyslogStats.o  src/HostPoolStats.o  src/AddressTree.o  src/MySQLDB.o  src/LuaEngineNetwork.o  src/ZMQParserInterface.o  src/InterfaceStatsHash.o  src/TcpPacketStats.o  src/StatsManager.o  src/InfluxDBTimeseriesExporter.o  src/SerializableElement.o  src/FlowHash.o  src/TimelineExtract.o  src/Flow.o  src/PF_RINGInterface.o  src/flow_checks/UnexpectedServer.o  src/flow_checks/BroadcastNonUDPTraffic.o  src/flow_checks/ExternalAlertCheck.o  src/flow_checks/RemoteAccess.o  src/flow_checks/BlacklistedFlow.o  src/flow_checks/FlowRisk.o  src/flow_checks/TCPPacketsIssues.o  src/flow_checks/LowGoodputFlow.o  src/flow_checks/TCPZeroWindow.o  src/flow_checks/RemoteToLocalInsecureProto.o  src/flow_checks/TCPNoDataExchanged.o  src/flow_checks/DeviceProtocolNotAllowed.o  src/flow_checks/CustomFlowLuaScript.o  src/flow_checks/WebMining.o  src/flow_checks/RemoteToRemote.o  src/flow_checks/NotPurged.o  src/flow_checks/BlacklistedCountry.o  src/flow_checks/IECUnexpectedTypeId.o  src/flow_alerts/IECInvalidTransitionAlert.o  src/flow_alerts/LowGoodputFlowAlert.o  src/flow_alerts/FlowRiskSSHObsoleteServerAlert.o  src/flow_alerts/TLSMaliciousSignatureAlert.o  src/flow_alerts/IECInvalidCommandTransitionAlert.o  src/flow_alerts/FlowRiskBinaryApplicationTransferAlert.o  src/flow_alerts/PeriodicityChangedAlert.o  src/flow_alerts/BroadcastNonUDPTrafficAlert.o  src/flow_alerts/IECUnexpectedTypeIdAlert.o  src/flow_alerts/FlowRiskGenericAlert.o  src/flow_alerts/CustomFlowLuaScriptAlert.o  src/flow_alerts/ElephantFlowAlert.o  src/flow_alerts/FlowRiskTLSCertificateSelfSignedAlert.o  src/flow_alerts/FlowRiskSuspiciousDGADomainAlert.o  src/flow_alerts/BlacklistedCountryAlert.o  src/flow_alerts/DeviceProtocolNotAllowedAlert.o  src/flow_alerts/BlacklistedFlowAlert.o  src/flow_alerts/FlowRiskTLSOldProtocolVersionAlert.o  src/flow_alerts/LongLivedFlowAlert.o  src/flow_alerts/FlowRiskKnownProtocolOnNonStandardPortAlert.o  src/flow_alerts/UnexpectedServerAlert.o  src/flow_alerts/RemoteAccessAlert.o  src/flow_alerts/FlowRiskSSHObsoleteClientAlert.o  src/flow_alerts/RemoteToLocalInsecureProtoAlert.o  src/flow_alerts/ExternalAlertCheckAlert.o  src/flow_alerts/TCPPacketsIssuesAlert.o  src/host_checks/ScoreThreshold.o  src/host_checks/DangerousHost.o  src/host_checks/RSTScan.o  src/host_checks/FlowHits.o  src/host_checks/PktThreshold.o  src/host_checks/FlowFlood.o  src/host_checks/P2PTraffic.o  src/host_checks/NTPServerContacts.o  src/host_checks/NTPTraffic.o  src/host_checks/SMTPServerContacts.o  src/host_checks/CountriesContacts.o  src/host_checks/ICMPFlood.o  src/host_checks/DNSServerContacts.o  src/host_checks/ServerContacts.o  src/host_checks/DomainNamesContacts.o  src/host_checks/SYNScan.o  src/host_checks/RemoteConnection.o  src/host_checks/ScanDetection.o  src/host_checks/CustomHostLuaScript.o  src/host_checks/DNSTraffic.o  src/host_checks/SYNFlood.o  src/host_checks/FINScan.o  src/host_alerts/FlowHitsAlert.o  src/host_alerts/DangerousHostAlert.o  src/host_alerts/NTPServerContactsAlert.o  src/host_alerts/DNSTrafficAlert.o  src/host_alerts/SMTPServerContactsAlert.o  src/host_alerts/PktThresholdAlert.o  src/host_alerts/P2PTrafficAlert.o  src/host_alerts/CountriesContactsAlert.o  src/host_alerts/DNSServerContactsAlert.o  src/host_alerts/ServerContactsAlert.o  src/host_alerts/DomainNamesContactsAlert.o  src/host_alerts/RemoteConnectionAlert.o  src/host_alerts/ScanDetectionAlert.o  src/host_alerts/NTPTrafficAlert.o  src/host_alerts/CustomHostLuaScriptAlert.o  -lm -Wall /opt/ntopng/ndpi/lib/libndpi.a -lpcap /home//nobackup/build/ntopng/third-party/lua-5.4.3/src/liblua.a -lrrd  -ljson-c  -lmaxminddb  -lhiredis -lsqlite3 -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -ldl -lssl -lcrypto -lresolv -lm -lrt  -lexpat -lssl -lssl -lcrypto    -lmaxminddb -lzmq  -latomic -lzmq -lsodium -L/usr/local/lib -lcap -lrt -lz -ldl -lcurl  -lm -lpthread -o ntopng
/usr/bin/ld: src/Flow.o: in function `Flow::processExtraDissectedInformation()':
/home/me/nobackup/build/ntopng/src/Flow.cpp:789: undefined reference to `ndpi_get_flow_risk_info'
/usr/bin/ld: src/Flow.o: in function `Flow::setExtraDissectionCompleted()':
/home/me/nobackup/build/ntopng/src/Flow.cpp:1094: undefined reference to `ndpi_get_flow_error_code'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(ndpi_main.o): in function `ndpi_init_detection_module':
/home/me/nobackup/build/nDPI/src/lib/ndpi_main.c:2307: undefined reference to `gcry_control'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/ndpi_main.c:2308: undefined reference to `gcry_check_version'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/ndpi_main.c:2316: undefined reference to `gcry_control'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(ndpi_main.o): in function `ndpi_get_gcrypt_version':
/home/me/nobackup/build/nDPI/src/lib/ndpi_main.c:7106: undefined reference to `gcry_check_version'
/usr/bin/ld: src/flow_checks/FlowRisk.o: in function `FlowRisk::ignoreRisk(Flow*, ndpi_risk_enum)':
/home/me/nobackup/build/ntopng/src/flow_checks/FlowRisk.cpp:47: undefined reference to `ndpi_check_flow_risk_exceptions'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `hkdf_expand':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:350: undefined reference to `gcry_md_get_algo_dlen'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:358: undefined reference to `gcry_md_open'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:364: undefined reference to `gcry_md_reset'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:365: undefined reference to `gcry_md_setkey'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:364: undefined reference to `gcry_md_reset'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:365: undefined reference to `gcry_md_setkey'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:367: undefined reference to `gcry_md_write'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:369: undefined reference to `gcry_md_write'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:372: undefined reference to `gcry_md_write'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:374: undefined reference to `gcry_md_read'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:378: undefined reference to `gcry_md_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `ws_hmac_buffer':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:328: undefined reference to `gcry_md_open'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:332: undefined reference to `gcry_md_setkey'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:337: undefined reference to `gcry_md_write'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:338: undefined reference to `gcry_md_get_algo_dlen'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:338: undefined reference to `gcry_md_read'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:339: undefined reference to `gcry_md_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_prepare':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:604: undefined reference to `gcry_cipher_open'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:613: undefined reference to `gcry_cipher_get_algo_keylen'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_init':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:544: undefined reference to `gcry_md_get_algo_dlen'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_reset':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:519: undefined reference to `gcry_cipher_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_init':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:550: undefined reference to `gcry_cipher_setkey'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_pp_cipher_prepare':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:632: undefined reference to `gcry_cipher_open'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:641: undefined reference to `gcry_cipher_get_algo_keylen'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_pp_cipher_init':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:556: undefined reference to `gcry_md_get_algo_dlen'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_pp_cipher_reset':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:526: undefined reference to `gcry_cipher_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_pp_cipher_init':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:567: undefined reference to `gcry_cipher_setkey'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_decrypt_header':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:685: undefined reference to `gcry_cipher_encrypt'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_decrypt_message':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:783: undefined reference to `gcry_cipher_ctl'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:784: undefined reference to `gcry_cipher_setiv'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_reset':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:519: undefined reference to `gcry_cipher_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_decrypt_message':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:795: undefined reference to `gcry_cipher_authenticate'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:808: undefined reference to `gcry_cipher_decrypt'
/usr/bin/ld: /home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:817: undefined reference to `gcry_cipher_checktag'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_hp_cipher_reset':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:519: undefined reference to `gcry_cipher_close'
/usr/bin/ld: /opt/ntopng/ndpi/lib/libndpi.a(quic.o): in function `quic_pp_cipher_reset':
/home/me/nobackup/build/nDPI/src/lib/protocols/quic.c:526: undefined reference to `gcry_cipher_close'
collect2: error: ld returned 1 exit status
make: *** [Makefile:135: ntopng] Error 1
[09:53:11 me@gateway:~/nobackup/build/ntopng$] git pull
Already up to date.
[09:53:18 me@gateway:~/nobackup/build/ntopng$]

How did you reproduce it? config'd with:

./configure --prefix=/opt/ntopng --with-ndpi-static-lib=/opt/ntopng/ndpi/lib --with-ndpi-includes=/opt/ntopng/ndpi/include/ndpi

Debug Information:

lucaderi commented 1 year ago

This is an nDPI problem not related to ntopng. Please fix the nDPI issue first and most issues should be solved. Please open a ticket under nDPI and report how you did the git clone (exact command) and the various configuration steps. As you can see here https://github.com/ntop/nDPI/actions?query=workflow%3ABuild nDPi compiles on many platforms so make sure your system is properly configured and supported (Ubuntu for sure)

DigiAngel commented 1 year ago

Done, thank you.

DigiAngel commented 1 year ago

Fixed with deleting out old nDPI install directory.