GithubHelp home page GithubHelp logo

there is an error when compiling about joy HOT 15 CLOSED

cisco avatar cisco commented on September 5, 2024
there is an error when compiling

from joy.

Comments (15)

fliphil avatar fliphil commented on September 5, 2024

Hello, did you run ./config first?

from joy.

quakeian avatar quakeian commented on September 5, 2024

yes, I found the `BIO_get_mem_ptr' function is defined in bio.h
I'm not sure which part is got wrong.

from joy.

fliphil avatar fliphil commented on September 5, 2024

Do you have libssl-dev installed? That package should provide the header files for OpenSSL

from joy.

quakeian avatar quakeian commented on September 5, 2024

Yes I did. there are 2 bio.h files in my computer.
one is in the /usr/include/openssl/bio.h
the other is under the python package include folder
I'll try to uninstall one, and recompile later

I' m curious that I already remove the `BIO_get_mem_ptr' function used in tls.c
the program is work, is it the influence on extracting the feature from TLS communication?

from joy.

simon-struk avatar simon-struk commented on September 5, 2024

There is a compatibility issue with OpenSSL 1.1.0. If that's your version, try downgrading it to 1.0.2

from joy.

fliphil avatar fliphil commented on September 5, 2024

Yes it's needed for TLS certificate extraction. Removing it it not a good idea, because that code will not work properly. Also as simonstruk said, 1.1.0 is currently not supported. We'll be adding support for that version sometime in the future, so it's on our radar!

from joy.

davidmcgrew avatar davidmcgrew commented on September 5, 2024

I just encountered the openSSL 1.1.0 incompatibility bug on Raspbian 9.1 Stretch. D'oh! I shouldn't have upgraded that OS :-(

from joy.

fliphil avatar fliphil commented on September 5, 2024

@quakeian Did adding the 110 support fix your problem?

from joy.

keenlykeenly avatar keenlykeenly commented on September 5, 2024

my openssl version is 1.0.2g, but I encounter the same problem. How can I solve it? The whole errors are as follows:
procwatch.c:135:26: warning: ‘get_host_flow’ defined but not used [-Wunused-function]
static struct host_flow *get_host_flow(struct flow_key *key) {
^
/tmp/ccxJpe9F.o: In function tls_x509_get_extensions': /home/daisy/joy/src/tls.c:1047: undefined reference to BIO_get_mem_ptr'
/tmp/ccxJpe9F.o: In function tls_x509_get_validity_period': /home/daisy/joy/src/tls.c:485: undefined reference to BIO_get_mem_ptr'
/home/daisy/joy/src/tls.c:501: undefined reference to BIO_reset' /home/daisy/joy/src/tls.c:516: undefined reference to BIO_get_mem_ptr'
collect2: error: ld returned 1 exit status
Makefile:100: recipe for target 'joy' failed
make[1]: *** [joy] Error 1
make[1]: Leaving directory '/home/daisy/joy/src'
Makefile:57: recipe for target 'all' failed
make: *** [all] Error 2

from joy.

fliphil avatar fliphil commented on September 5, 2024

Hello,

A few questions:

Which operating system are you using? Are you using the standard config and make procedure outlined in the Wiki? Where does this version of OpenSSL 1.0.2g live? Are you sure that particular version is first on your Path?

from joy.

bhudson33 avatar bhudson33 commented on September 5, 2024

from joy.

keenlykeenly avatar keenlykeenly commented on September 5, 2024

from joy.

brilong avatar brilong commented on September 5, 2024

I just compiled joy master on Ubuntu 16.04 using the build_pkg script to make a .deb package (instead of using make and the install-sh script). I ran the following command "./build_pkg -t deb". I then ran "dpkg -i joy_1.73-1.2c9ff2f.xenial_amd64.deb" and it installed joy. Please consider doing the following:
cd joy
git pull (update your repo)
./build_pkg -t deb
dpkg -i /path/to/joy.deb

from joy.

fliphil avatar fliphil commented on September 5, 2024

It's odd that OpenSSL isn't being found. I've tested with 16.04 many times, and never had issues with the OpenSSL library being detected. This makes me think that the library could be in a weird location.
When you run which openssl and openssl version -a what are the directories shown?
Also make sure that you are running ./config -l /usr/lib/x86_64-linux-gnu

It may be easier for you to recreate the virtual machine from scratch if possible.

from joy.

stevepp avatar stevepp commented on September 5, 2024

I am seeing similar errors building joy. The OS is Ubuntu 16.04 and my OpenSSL version is 1.0.2l. I have ran the config script before the building and the necessary packages are in place. Here is the error output:

Building joy ...
gcc -Werror -Wall -Wbad-function-cast -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wno-pointer-sign -Wextra -Wno-nullability-completeness -Wno-cast-align -Wno-expansion-to-defined -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O -g -DLINUX=1 -DVERSION="4.0.1" -DUSE_GZIP -DCOMPRESSED_OUTPUT=1 -o "/home/techie/joy/bin/joy" -I ./include -I "/usr/local/lib/python2.7/dist-packages/external/boringssl/src/include" -I "/usr/local/lib/python2.7/dist-packages/external/curl/include" joy.c p2f.c config.c osdetect.c anon.c pkt_proc.c nfv9.c tls.c classify.c radix_trie.c hdr_dsc.c procwatch.c addr_attr.c addr.c wht.c http.c str_match.c acsm.c dns.c example.c updater.c ipfix.c ssh.c ike.c salt.c parson.c fingerprint.c ppi.c utils.c dhcp.c payload.c proto_identify.c -L "/usr/lib/x86_64-linux-gnu" -lpcap -lm -lcrypto -lcurl -lpthread -lz
/tmp/ccV6YBxM.o: In function tls_x509_get_validity_period': /home/techie/joy/src/tls.c:487: undefined reference to BIO_get_mem_ptr'
/home/techie/joy/src/tls.c:503: undefined reference to BIO_reset' /home/techie/joy/src/tls.c:518: undefined reference to BIO_get_mem_ptr'
/tmp/ccV6YBxM.o: In function tls_x509_get_extensions': /home/techie/joy/src/tls.c:1045: undefined reference to BIO_get_mem_ptr'
collect2: error: ld returned 1 exit status
Makefile:132: recipe for target 'joy' failed
make[1]: *** [joy] Error 1
make[1]: Leaving directory '/home/techie/joy/src'
Makefile:58: recipe for target 'all' failed
make: *** [all] Error 2

Seeing the error, I tried to directly build the deb package as suggested by @brilong. Running "./build_pkg -t deb -v 1.0", it kept asking me to install the missing packages as follows. However, I have installed all the packages as directed.

BUILD_PKGS

-t was triggered with option deb
-v was triggered with option 1.0
Please install the missing packages. All required packages
can be installed as follows:
apt-get install gcc git libcurl3 libcurl4-openssl-dev libpcap0.8 libpcap-dev libssl1.0.0 libssl-dev make python python-pip ruby ruby-ffi zlib1g zlib1g-dev

Could you provide any suggestions on resolving this compiling issue?

from joy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.