max197616 / extfilter

Program for filtering traffic using DPDK.
GNU General Public License v3.0
81 stars 33 forks source link

проблема компиляци 0.70 на debian 9 #7

Closed zench1k closed 6 years ago

zench1k commented 7 years ago

g++ -DHAVE_CONFIG_H -I. -I../include -I../ -I../nDPI/src/include -I/root/build/dpdk-stable-16.11.1/build/include -std=c++11 -O3 -Wall -pthread -msse -msse2 -msse3 -mssse3 -MT sendertask.o -MD -MP -MF .deps/sendertask.Tpo -c -o sendertask.o sendertask.cpp In file included from sendertask.cpp:20:0: ../include/sendertask.h:174:3: error: ‘m128i’ does not name a type m128i ipv6; ^~~ ../include/sendertask.h:179:3: error: ‘m128i’ does not name a type m128i ipv6; ^~~ ../include/sendertask.h: In constructor ‘RedirectNotificationG::RedirectNotificationG(int, int, void, void, int, uint32_t, uint32_t, int, char, bool)’: ../include/sendertask.h:120:13: error: ‘union RedirectNotificationG::’ has no member named ‘ipv6’; did you mean ‘ipv4’? _user_ip.ipv6 = _mm_loadu_si128((__m128i )user_ip); ^~~~ ../include/sendertask.h:120:37: error: ‘m128i’ was not declared in this scope _user_ip.ipv6 = _mm_loadu_si128((m128i *)user_ip); ^~~ ../include/sendertask.h:120:46: error: expected primary-expression before ‘)’ token _user_ip.ipv6 = _mm_loadu_si128((m128i *)user_ip); ^ ../include/sendertask.h:120:54: error: ‘_mm_loadu_si128’ was not declared in this scope _user_ip.ipv6 = _mm_loadu_si128((m128i )user_ip); ^ ../include/sendertask.h:121:12: error: ‘union RedirectNotificationG::’ has no member named ‘ipv6’; did you mean ‘ipv4’? _dst_ip.ipv6 = _mm_loadu_si128((__m128i )dst_ip); ^~~~ ../include/sendertask.h:121:45: error: expected primary-expression before ‘)’ token _dst_ip.ipv6 = _mm_loadu_si128((__m128i *)dst_ip); ^ Makefile:378: ошибка выполнения рецепта для цели «sendertask.o» make[1]: [sendertask.o] Ошибка 1 make[1]: выход из каталога «/root/build/20170630/extfilter/src» Makefile:342: ошибка выполнения рецепта для цели «all-recursive» make: [all-recursive] Ошибка 1 gcc version 6.3.0 20170516 (Debian 6.3.0-18) libpoco-dev amd64 1.7.6+dfsg1-5 [540 kB]

max197616 commented 7 years ago

Процессор не поддерживает SSE2 инструкции.

zench1k commented 7 years ago

есть поддержка sse2. Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 1 Core(s) per socket: 6 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 44 Model name: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz Stepping: 2 CPU MHz: 1600.000 CPU max MHz: 2401,0000 CPU min MHz: 1600,0000 BogoMIPS: 4799.91 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 12288K NUMA node0 CPU(s): 0-5 NUMA node1 CPU(s): 6-11 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb tpr_shadow vnmi flexpriority ept vpid dtherm ida arat

cREoz commented 7 years ago

Писал про это на форуме - патч sendertask

zench1k commented 7 years ago

Да спасибо инклюд либы помог. Так же были проблемы с ошибками вида can not be used when making a shared object; перекомпилируйте с параметром -fPIC. добавлял опцию в майкфайл. В итоге собралось, работоспособность не проверял.

zench1k commented 6 years ago

итого на последних версиях для сборки нужно main.cpp сделать инклюд либы "cmath" дабы убрать ошибку. main.cpp: In member function ‘virtual int extFilter::main(const ArgVec&)’: main.cpp:1064:97: error: ‘ceil’ was not declared in this scope int max_ipv4_flows_per_core = ceil((float)_dpi_max_active_flows_ipv4/(float)(_nb_lcore_params)); Фильтр работает корректно. Думаю что тикет можно закрыть.

max197616 commented 6 years ago

cmath добавлен в include.