CiscoDevNet / MUD-Manager

Manufacturer Usage Description (MUD) is a technique whereby constrained end devices (e.g., IoT devices) can signal to the network what sort of access and network functionality they require to properly function
BSD 3-Clause "New" or "Revised" License
22 stars 10 forks source link

Failed to build the manager | undefined reference to symbol 'SSL_CTX_ctrl@@OPENSSL_1_1_0' #65

Closed ihabZhaika closed 5 years ago

ihabZhaika commented 5 years ago

Hey, I already did a lot of tries to build the manager but none of them have success until now I am using ubuntu 19, and those are the details: Distributor ID: Ubuntu Description: Ubuntu 19.04 Release: 19.04 Codename: disco OpenSSL 1.1.1b 26 Feb 2019 i installed all the packages as described in the instructions, the compilation fails on the following

`tester@tester-VirtualBox:~/MUD-Manager$ make make all-recursive make[1]: Entering directory '/home/tester/MUD-Manager' Making all in src make[2]: Entering directory '/home/tester/MUD-Manager/src' /bin/bash ../libtool --tag=CC --mode=link gcc -I.. -DMG_ENABLE_SSL -Wall -W -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -Icivetweb -I/usr/local/include/cjson -g -O2 -o mud_manager mud_manager.o log.o sessions.o acl_types.o cisco_dacl.o mud_fs_client.o civetweb/civetweb.o -L/usr/local/lib -lmongoc-1.0 -lrt -lbson-1.0 -lpthread -lm -ldl -lcurl -lcjson_utils -lcjson libtool: link: gcc -I.. -DMG_ENABLE_SSL -Wall -W -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -Icivetweb -I/usr/local/include/cjson -g -O2 -o mud_manager mud_manager.o log.o sessions.o acl_types.o cisco_dacl.o mud_fs_client.o civetweb/civetweb.o -L/usr/local/lib /usr/local/lib/libmongoc-1.0.so -lrt /usr/local/lib/libbson-1.0.so -lpthread -lm -ldl /usr/lib/x86_64-linux-gnu/libcurl.so -lcjson_utils -lcjson -pthread /usr/bin/ld: mud_manager.o: undefined reference to symbol 'SSL_CTX_ctrl@@OPENSSL_1_1_0' /usr/bin/ld: /lib/x86_64-linux-gnu/libssl.so.1.1: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status

make[2]: *** [Makefile:420: mud_manager] Error 1

make[2]: Leaving directory '/home/tester/MUD-Manager/src'

make[1]: *** [Makefile:410: all-recursive] Error 1

make[1]: Leaving directory '/home/tester/MUD-Manager'

make: *** [Makefile:342: all] Error 2 `

Tried also on Centos and the same issue

Is it libssl version issue or what exactly ? will be glad to get somehelp

elear commented 5 years ago

Could you try compiling with OpenSSL 1.0.1?

ihabZhaika commented 5 years ago

Hey, so i have switched to Ubuntu 14 (since it has this old ssl) Distributor ID: Ubuntu Description: Ubuntu 14.04.6 LTS Release: 14.04 Codename: trusty tester@tester-VirtualBox:~/Downloads/MUD-Manager$ openssl OpenSSL> version OpenSSL 1.0.1f 6 Jan 2014 OpenSSL>

it still fails,

libtool: link: gcc -I.. -DMG_ENABLE_SSL -Wall -W -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 -Icivetweb -I/usr/local/include/cjson -g -O2 -o mud_manager mud_manager.o log.o sessions.o acl_types.o cisco_dacl.o mud_fs_client.o civetweb/civetweb.o -L/usr/local/lib /usr/local/lib/libmongoc-1.0.so -lrt /usr/local/lib/libbson-1.0.so -lpthread -lm -ldl /usr/lib/x86_64-linux-gnu/libcurl.so -lcrypto -lcjson_utils -lcjson -pthread /usr/bin/ld: mud_manager.o: undefined reference to symbol 'SSL_CTX_ctrl@@OPENSSL_1.0.0' //lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [mud_manager] Error 1 make[2]: Leaving directory/home/tester/Downloads/MUD-Manager/src' make[1]: [all-recursive] Error 1 make[1]: Leaving directory `/home/tester/Downloads/MUD-Manager' make: [all] Error 2 `

So can you please try to compile it on Ubuntu 16.04 or 18.04 and give the instructions, since i can tell it won't compile just by following the Wiki

elear commented 5 years ago

Ok, I was stupid. For some reason your make line does not have -lssl. We need to figure that out. Can you do a make distclean and then a make and see how things go?

ihabZhaika commented 5 years ago

log.txt

Ok, I was stupid. For some reason your make line does not have -lssl. We need to figure that out. Can you do a make distclean and then a make and see how things go?

Hey, the make distclean removes the make file, so what you mean by then ? anyway i tried to do the following "make distclean" ----> "./configure" ----> "make" still getting the same issue I have attached the logs of the process from the configure stage to the make So i suggest 2 options:

  1. i can record a video doing the process from 0 until trying to compile the MUD manager
  2. you can try on VM to do the instructions on the wiki

What do you suggest ?

ihabZhaika commented 5 years ago

Hey, @elear Any update on how to resolve this issue ?

elear commented 5 years ago

Ok. Can you try pulling the 3.0.1 branch and see if this solves the issue? My problem is that I was testing symbols that seemingly weren't there (how this ever worked is a bit odd). If it works I'll create the appropriate PR and merge into the master.

ihabZhaika commented 5 years ago

@elear The new branch do solve the problem Thanx