sdnfv / onvm-snort

Snort IDS ported to OpenNetVM
17 stars 13 forks source link

Porting to openNetVM 19.07, DPDK 18.11 #7

Closed archit-p closed 5 years ago

archit-p commented 5 years ago

Dear team,

I'm trying to port this implementation of Snort to work with openNetVM v19.07. I've updated the API calls in /daq-2.0.6/, and got daq to compile. When trying to configure Snort with ONVM 19.07 and DPDK 18.11 I run into the following error:

/home/student/sources/dpdk/x86_64-native-linuxapp-gcc/lib/librte_eal.a(eal_memalloc.o): In function `alloc_seg':
eal_memalloc.c:(.text+0x147f): undefined reference to `move_pages'
/home/student/sources/dpdk/x86_64-native-linuxapp-gcc/lib/librte_eal.a(eal_memalloc.o): In function `eal_memalloc_alloc_seg_bulk':
eal_memalloc.c:(.text+0x221c): undefined reference to `numa_available'
eal_memalloc.c:(.text+0x2229): undefined reference to `numa_allocate_nodemask'
eal_memalloc.c:(.text+0x225c): undefined reference to `get_mempolicy'
eal_memalloc.c:(.text+0x2283): undefined reference to `numa_set_preferred'
eal_memalloc.c:(.text+0x2312): undefined reference to `set_mempolicy'
eal_memalloc.c:(.text+0x231f): undefined reference to `numa_bitmask_free'
eal_memalloc.c:(.text+0x2351): undefined reference to `numa_set_localalloc'
/home/student/sources/dpdk/x86_64-native-linuxapp-gcc/lib/librte_eal.a(eal_memalloc.o): In function `eal_memalloc_alloc_seg':
eal_memalloc.c:(.text+0x2491): undefined reference to `numa_available'
eal_memalloc.c:(.text+0x249e): undefined reference to `numa_allocate_nodemask'
eal_memalloc.c:(.text+0x24d1): undefined reference to `get_mempolicy'
eal_memalloc.c:(.text+0x24fa): undefined reference to `numa_set_preferred'
eal_memalloc.c:(.text+0x257b): undefined reference to `set_mempolicy'
eal_memalloc.c:(.text+0x2588): undefined reference to `numa_bitmask_free'
eal_memalloc.c:(.text+0x25e1): undefined reference to `numa_set_localalloc'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_nflib.o): In function `onvm_nflib_init':
onvm_nflib.c:(.text+0x3995): undefined reference to `cJSON_Delete'
onvm_nflib.c:(.text+0x3dda): undefined reference to `cJSON_Delete'
/home/student/sources/dpdk/x86_64-native-linuxapp-gcc/lib/librte_eal.a(eal_memory.o): In function `eal_legacy_hugepage_init':
eal_memory.c:(.text+0x10f3): undefined reference to `numa_available'
eal_memory.c:(.text+0x1113): undefined reference to `numa_allocate_nodemask'
eal_memory.c:(.text+0x113d): undefined reference to `get_mempolicy'
eal_memory.c:(.text+0x136d): undefined reference to `numa_bitmask_free'
eal_memory.c:(.text+0x256d): undefined reference to `numa_set_localalloc'
eal_memory.c:(.text+0x2601): undefined reference to `numa_set_preferred'
eal_memory.c:(.text+0x290a): undefined reference to `set_mempolicy'
eal_memory.c:(.text+0x293c): undefined reference to `numa_set_localalloc'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o): In function `onvm_config_parse_file':
onvm_config_common.c:(.text+0xe9): undefined reference to `cJSON_Parse'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o): In function `onvm_config_extract_corelist':
onvm_config_common.c:(.text+0x169): undefined reference to `cJSON_GetObjectItem'
onvm_config_common.c:(.text+0x179): undefined reference to `cJSON_GetArraySize'
onvm_config_common.c:(.text+0x1b1): undefined reference to `cJSON_GetArrayItem'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o): In function `onvm_config_extract_memory_channels':
onvm_config_common.c:(.text+0x216): undefined reference to `cJSON_GetObjectItem'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o): In function `onvm_config_extract_portmask':
onvm_config_common.c:(.text+0x256): undefined reference to `cJSON_GetObjectItem'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o): In function `onvm_config_extract_output_location':
onvm_config_common.c:(.text+0x2aa): undefined reference to `cJSON_GetObjectItem'
onvm_config_common.c:(.text+0x2be): undefined reference to `cJSON_GetObjectItem'
onvm_config_common.c:(.text+0x2e6): undefined reference to `cJSON_GetObjectItem'
/home/student/sources/openNetVM/onvm/onvm_nflib/x86_64-native-linuxapp-gcc/libonvm.a(onvm_config_common.o):onvm_config_common.c:(.text+0x301): more undefined references to `cJSON_GetObjectItem' follow

Does this error look familiar?

Edit: My onvm installation works fine otherwise, I've tested it with multiple example NFs.

archit-p commented 5 years ago

Issue was resolved by including the right directories for libonvm and libonvmhelper.

twood02 commented 5 years ago

Great! It would be wonderful if you could create a pull request to update this repo to 19.07. Please let us know if you need any more help.

archit-p commented 5 years ago

Sure, will do that! I have been stuck at this issue since yesterday, would be great if one of you guys could look at it - https://github.com/sdnfv/openNetVM/issues/163