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

build_archive.sh failure on debian buster #10

Closed
aderumier opened this issue Aug 21, 2019 · 4 comments
Closed

build_archive.sh failure on debian buster #10

aderumier opened this issue Aug 21, 2019 · 4 comments

Comments

@aderumier
Copy link

Hi,
First thanks for releasing the darwin code !

I'm trying to build it on debian buster,

Have installed needed deb packages

apt install libboost-all-dev libmaxminddb-dev libhiredis-dev libevent-dev pkg-config cmake build-essential

but build_archive.sh is failing

 ./build_archive.sh 
Building filters
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
Flags: -W -Wall -Wextra
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Warning at CMakeLists.txt:24 (find_package):
  By not providing "Findfaup.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "faup", but
  CMake did not find one.

  Could not find a package configuration file provided by "faup" with any of
  the following names:

    faupConfig.cmake
    faup-config.cmake

  Add the installation prefix of "faup" to CMAKE_PREFIX_PATH or set
  "faup_DIR" to a directory containing one of the above files.  If "faup"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Checking for module 'libevent'
--   Found libevent, version 2.1.8-stable
-- Checking for module 'libevent_pthreads'
--   Found libevent_pthreads, version 2.1.8-stable
-- Checking for module 'hiredis'
--   Found hiredis, version 0.14.0
-- Boost version: 1.67.0
-- Checking for module 'libmaxminddb'
--   Found libmaxminddb, version 1.3.2
Generating CMake files for the filters: USER_AGENT;HOSTLOOKUP;SESSION;REPUTATION;DGA;CONNECTION;TANOMALY;ANOMALY;LOGS;END;CONTENT_INSPECTION
Creating lib: USER_AGENT
Lib created
Creating lib: HOSTLOOKUP
Lib created
Creating lib: SESSION
Lib created
Creating lib: REPUTATION
Lib created
Creating lib: DGA
Lib created
Creating lib: CONNECTION
Lib created
Creating lib: TANOMALY
Lib created
Creating lib: ANOMALY
Lib created
Creating lib: LOGS
Lib created
Creating lib: END
Lib created
Creating lib: CONTENT_INSPECTION
Lib created
Creating filter: USER_AGENT
Executable name: darwin_user_agent
Creating filter: HOSTLOOKUP
Executable name: darwin_hostlookup
Creating filter: SESSION
Executable name: darwin_session
Creating filter: REPUTATION
Executable name: darwin_reputation
Creating filter: DGA
Executable name: darwin_dga
Creating filter: CONNECTION
Executable name: darwin_connection
Creating filter: TANOMALY
Executable name: darwin_tanomaly
Creating filter: ANOMALY
Executable name: darwin_anomaly
Creating filter: LOGS
Executable name: darwin_logs
Creating filter: END
Executable name: darwin_end
Creating filter: CONTENT_INSPECTION
Executable name: darwin_content_inspection
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ARMADILLO_LIBRARY
    linked by target "darwin_anomaly" in directory /home/darwin
    linked by target "darwin_tanomaly" in directory /home/darwin
MLPACK_INCLUDE_DIRS
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
   used as include directory in directory /home/darwin
MLPACK_LIBRARY
    linked by target "darwin_anomaly" in directory /home/darwin
    linked by target "darwin_tanomaly" in directory /home/darwin

-- Configuring incomplete, errors occurred!
See also "/home/darwin/build/CMakeFiles/CMakeOutput.log".
See also "/home/darwin/build/CMakeFiles/CMakeError.log".
root@openvas2:/home/darwin# cat /home/darwin/build/CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/darwin/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7dd4b/fast"
/usr/bin/make -f CMakeFiles/cmTC_7dd4b.dir/build.make CMakeFiles/cmTC_7dd4b.dir/build
make[1] : on entre dans le répertoire « /home/darwin/build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_7dd4b.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_7dd4b.dir/CheckSymbolExists.c.o   -c /home/darwin/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_7dd4b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7dd4b.dir/link.txt --verbose=1
/usr/bin/cc      CMakeFiles/cmTC_7dd4b.dir/CheckSymbolExists.c.o  -o cmTC_7dd4b 
/usr/bin/ld: CMakeFiles/cmTC_7dd4b.dir/CheckSymbolExists.c.o: in function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_7dd4b.dir/build.make:87: cmTC_7dd4b] Error 1
make[1] : on quitte le répertoire « /home/darwin/build/CMakeFiles/CMakeTmp »
make: *** [Makefile:121: cmTC_7dd4b/fast] Error 2

File /home/darwin/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/darwin/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_a5e0c/fast"
/usr/bin/make -f CMakeFiles/cmTC_a5e0c.dir/build.make CMakeFiles/cmTC_a5e0c.dir/build
make[1] : on entre dans le répertoire « /home/darwin/build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_a5e0c.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_a5e0c.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_a5e0c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a5e0c.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_a5e0c.dir/CheckFunctionExists.c.o  -o cmTC_a5e0c -lpthreads 
/usr/bin/ld : ne peut trouver -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_a5e0c.dir/build.make:87: cmTC_a5e0c] Error 1
make[1] : on quitte le répertoire « /home/darwin/build/CMakeFiles/CMakeTmp »
make: *** [Makefile:121: cmTC_a5e0c/fast] Error 2

Any idea ?

@NS4nti
Copy link
Contributor

NS4nti commented Aug 21, 2019

Hi,
Thanks for your quick interest !
There are some forgotten dependencies in the wiki, we are going to update it asap !

@aderumier
Copy link
Author

Thanks,I didn't see the wiki.
Seem that fau is needed too, I'll look how to install it on debian. (don't have find any deb on the net)

@NS4nti
Copy link
Contributor

NS4nti commented Aug 21, 2019

If you want for faup: https://github.com/stricaud/faup#building-faup

@NS4nti
Copy link
Contributor

NS4nti commented Aug 21, 2019

We updated the README.md in the dev branch, you have compilation instruction in it. I advise you to use these, instead of the build archive :)
Some filters have particuliar dependencies, we are currently working on the wiki to have full informations about it.

@NS4nti NS4nti closed this as completed Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants