VirusTotal / yara

The pattern matching swiss knife
https://virustotal.github.io/yara/
BSD 3-Clause "New" or "Revised" License
8.25k stars 1.44k forks source link

Make Error: error dereferencing pointer to incomplete type 'x509 {aka struct.... #955

Open Will-Beninger opened 6 years ago

Will-Beninger commented 6 years ago

Running: Ubuntu Server 18.04.1 Environment: VMWare Workstation 14 Pro 14.1.3 build-9474260 Installed - See Attachments: apt.txt pip.txt bootstrap.txt bootstraperr.txt configure.txt make.txt makeerr.txt

Steps:

  1. Downloaded Release from here: https://github.com/VirusTotal/yara/archive/v3.8.1.tar.gz
  2. Extracted via tar -zxf
  3. Executed ./bootstrap.sh with output attached
  4. Executed configure with no errors: ./configure --enable-cuckoo --enable-magic --with-crypto
  5. Tried to execute make and receive the following: (also in make.txt/makeerr.txt)
    make  all-recursive
    make[1]: Entering directory '/root/pkg/yara-3.4.0'
    Making all in libyara
    make[2]: Entering directory '/root/pkg/yara-3.4.0/libyara'
    depbase=`echo modules/pe.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -O3 -Wall -Wno-deprecated-declarations -std=gnu99 -I./include -fvisibility=hidden -pthread -MT modules/pe.lo -MD -MP -MF $depbase.Tpo -c -o modules/pe.lo modules/pe.c &&\
    mv -f $depbase.Tpo $depbase.Plo
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -O3 -Wall -Wno-deprecated-declarations -std=gnu99 -I./include -fvisibility=hidden -pthread -MT modules/pe.lo -MD -MP -MF modules/.deps/pe.Tpo -c modules/pe.c  -fPIC -DPIC -o modules/.libs/pe.o
    Makefile:626: recipe for target 'modules/pe.lo' failed
    make[2]: Leaving directory '/root/pkg/yara-3.4.0/libyara'
    Makefile:615: recipe for target 'all-recursive' failed
    make[1]: Leaving directory '/root/pkg/yara-3.4.0'
    Makefile:413: recipe for target 'all' failed

modules/pe.c: In function ‘pe_parse_certificates’: modules/pe.c:1158:56: error: dereferencing pointer to incomplete type ‘X509 {aka struct x509_st}’ const char* sig_alg = OBJ_nid2ln(OBJ_obj2nid(cert->sig_alg->algorithm)); ^~ make[2]: [modules/pe.lo] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

soji256 commented 5 years ago

For me installing libssl1.0-dev via aptitude did the trick.

sudo apt install libssl1.0-dev

On 18.04 libssl-dev defaults to 1.1.