vanitygen
vanitygen copied to clipboard
Compilation on Arch Linux fails
Compilation is failing. It seems from the error message that the type BIGNUM doesn't exist:
cc -ggdb -O3 -Wall -c -o vanitygen.o vanitygen.c
In file included from vanitygen.c:32:0:
pattern.h:54:12: error: field ‘vxc_bntarg’ has incomplete type
BIGNUM vxc_bntarg;
^~~~~~~~~~
After some investigation it turns out that it's trying to compile against the wrong version of OpenSSL. I fixed the problem by modifying the CFLAGS and LIBS variables to include the OpenSSL 1.0 headers and library:
LIBS=-L/usr/lib/openssl-1.0 -lpcre -lcrypto -lm -lpthread
CFLAGS=-ggdb -O3 -Wall -I/usr/include/openssl-1.0
I've taken the liberty to update the wiki installation page too.
debian 10:
Temporarily install OpenSSL 1.0 headers:
sudo apt-get install libssl1.0-dev -y
and change in Makefile the first two lines to
LIBS=-L/usr/lib/openssl-1.0 -lpcre -lcrypto -lm -lpthread
CFLAGS=-ggdb -O3 -Wall -I/usr/include/openssl-1.0
Run make. After compilation, it may be a good practice to re-install the correct openssl:
sudo apt-get install libssl-dev -y