Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nDPI with hyperscan compile errors #651

Closed
rkerur opened this issue Dec 20, 2018 · 10 comments
Closed

nDPI with hyperscan compile errors #651

rkerur opened this issue Dec 20, 2018 · 10 comments
Assignees
Labels

Comments

@rkerur
Copy link

rkerur commented Dec 20, 2018

I am trying to compile nDPI with hyperscan (both latest from github). I have compiled and installed hyperscan successfully. To compile nDPI with hyperscan I did
./autogen.sh
./configure --with-hyperscan

First set of errors I get

dpi_main.o
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
NDPI_LOG_ERR(ndpi_mod, "Unable to initialize hyperscan database\n");
^
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:787:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'
NDPI_LOG_ERR(ndpi_mod, "Unable to allocate hyperscan scratch space\n");
^
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'
ndpi_main.c:794:18: error: use of undeclared identifier 'ndpi_mod'

Simple fix so I could move forward with compilation. Later I am getting following link errors
/libcache.o third_party/src/lruc.o third_party/src/ndpi_patricia.o third_party/src/node.o third_party/src/sha1-fast.o third_party/src/sort.o ndpi_main.o
Undefined symbols for architecture x86_64:
"_hs_alloc_scratch", referenced from:
_hyperscan_load_patterns in ndpi_main.o
"_hs_compile_multi", referenced from:
_hyperscan_load_patterns in ndpi_main.o
"_hs_free_compile_error", referenced from:
_hyperscan_load_patterns in ndpi_main.o
"_hs_free_database", referenced from:
_ndpi_exit_detection_module in ndpi_main.o
_ndpi_enable_loaded_categories in ndpi_main.o
_hyperscan_load_patterns in ndpi_main.o
"_hs_free_scratch", referenced from:
_ndpi_exit_detection_module in ndpi_main.o
_ndpi_enable_loaded_categories in ndpi_main.o
"_hs_scan", referenced from:
_ndpi_get_custom_category_match in ndpi_main.o
_ndpi_fill_protocol_category in ndpi_main.o
_ndpi_automa_match_string_subprotocol in ndpi_main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libndpi.so.2.5.0] Error 1
make: *** [all-recursive] Error 1

@lucaderi
Copy link
Member

@simonemainardi Any news?

@mmanoj
Copy link

mmanoj commented Feb 8, 2019

@lucaderi

I'm able to compile successfully on 5th Feb 2019.
@rkerur
Please try again. Make sure first compile and install hyperscan latest release.

@rkerur
Copy link
Author

rkerur commented Feb 11, 2019

@mmanoj I cloned latest hyperscan and nDPI and everything seems to be working fine. looking at the git logs not sure what changes fixed it?

@mmanoj
Copy link

mmanoj commented Feb 12, 2019

@rkerur

Thanks for the update, from my side not fix. I just done the same thing.

@lucaderi & @simonemainardi

Is there any fix done from your side?

@mmanoj
Copy link

mmanoj commented Mar 7, 2020

@rkerur @simonemainardi

I got the below error today for latest git version of nDPI and Hyperscan:

/usr/bin/ld: /usr/local/lib/libhs.a(hs.cpp.o): relocation R_X86_64_32S against `hs_enomem' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libhs.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target 'libndpi.so.3.3.0' failed
make[1]: *** [libndpi.so.3.3.0] Error 1
make[1]: Leaving directory '/opt/VizuaMatix/DEV/AnglerFish-DPI/deps/nDPI-HyperScan/nDPI/src/lib'
Makefile:495: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

@mmanoj
Copy link

mmanoj commented Mar 7, 2020

I was fixed with below steps:

  1. First, compile the Hyperscan with below options
    cd
    cmake -G "Unix Makefiles" ../
    cmake -DBUILD_STATIC_AND_SHARED=on ../
    make

  2. Complile nDPI with Hyperscan
    ./configure --with-hyperscan
    make

@mmanoj
Copy link

mmanoj commented Mar 7, 2020

** Note: After above Hyperscan compiled successfully; install it using sudo make install before step #2

@utkarsh0902311047
Copy link

utkarsh0902311047 commented Feb 17, 2021

I am trying to run nDPI with Hyperscan. I run following command
./configure --with-hyperscan in nDPI directory but it shows
warning : unrecognized options: --with-hyperscan
I am using ndpi(3.5.0).
How to resolve this?

@utoni
Copy link
Collaborator

utoni commented Feb 17, 2021

nDPI does not officially support Intel's fast pcre replacement as far as I know.

@IvanNardi
Copy link
Collaborator

Hyperscan support has been removed on 05/2020. See 2ccd2c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants