2

I'm trying to build and test the python Charm crypto library from source. It compiles and installs ok, but I get 91 cases of undefined symbol: BN_is_negative when running sudo make test:

/charm/charm/core/math/elliptic_curve.so: undefined symbol: BN_is_negative
!!!!!!!!!!!!!!!!!!! Interrupted: 91 errors during collection !!!!!!!!!!!!!!!!!!!!
================================================================================== 91 error in 3.36 seconds`

libcrypto 1.1 defines this function.

$ objdump -T /usr/local/lib/libcrypto.so.1.1 | grep BN_is_negative 00000000000c5880 g DF .text 000000000000000b OPENSSL_1_1_0 BN_is_negative

However, the problem seems to be that the shared libs integer.so and elliptic_curve.so point to libcrypto.so.1.0 located at /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 which does not define the symbol BN_is_negative.

I've tried looking at the LD_FLAGS and the configure script to try to make it point to /usr/local/lib for libcrypto, but no joy. How can I set the correct shared libs location?

charm-crypto branch: 2.7-dev

OS: Ubuntu 16.04.3 LTS

EDIT I tried to clean and rebuild with the following suggestion, but still same problem

$ sudo ./configure.sh --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
Install prefix    /usr/local
data directory    /usr/local/share/charm
binary directory  /usr/local/bin
library directory /usr/local/lib
config directory  /usr/local/etc
Source path       /media/dough/Storage/repos/tools/charm
CFLAGS            -O2 -g 
CHARM_CFLAGS       -m64 -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -I/usr/local/include  -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits
LDFLAGS           -m64 -L/usr/local/lib 
make              make
python            /usr/bin/python
python-config     /usr/bin/python-config
build_ext options build_ext 
install           install
host CPU          x86_64
wget              /usr/bin/wget
gprof enabled     no
profiler          no
static build      no
-Werror enabled   no
integer module    yes
ecc module        yes
pairing module    yes
disable benchmark no
libm found        yes
libgmp found      yes
libpbc found      yes
libcrypto found   yes
Documentation     no
1
  • Try ./configure.sh --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib. Running tests with LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH make test should pass. – hoefling Oct 27 '18 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.