vanitygen icon indicating copy to clipboard operation
vanitygen copied to clipboard

Install on Debian 9 (x64)

Open vlc33 opened this issue 5 years ago • 3 comments

Compiling Vanity under Debian 9 (x64)

Hello I managed to compile Vanity from source , here is how I done it.

(1) problem with openssl 1.0 (old version not installed by default) As 1st compiling raises problems, people said it was because the source depends con openssl 1.0 not actual openssl 1.1+ So I downloaded openssl-1.0 from source https://www.openssl.org/source/openssl-1.0.2s.tar.gz and installed it by default it installs under /usr/ssl so it does not interfere with distribution updated openssl (-> *see next comment to install it in /usr/local/ssl) -> add to LIBS in Makefile -> add to CFLAGS in Makefile

(2) problem with pcre (old version not installed by default) normally pcre2 is installed, the old version in Debian is called pcre3 (yes) but you will also will need pcre3-dev to be installed.

(3) problem with ldl (openssl-1.0 needs it) -> add to LIBS in Makefile

Makefile fixes:

LIBS= -ldl -lpcre -lcrypto -lm -lpthread -L/usr/local/ssl/lib -I/usr/lib
      ^--(3)                             ^--(1)

CFLAGS=-ggdb -O3 -Wall -I/usr/local/ssl/include -I/usr/include
                       ^--(1)

vlc33 avatar Aug 04 '19 10:08 vlc33

adding one more extract the zip and the use this command ./config --openssldir=/usr/local/ssl make make test sudo make install

vishalkumar2806 avatar Apr 28 '22 14:04 vishalkumar2806

Strange, for me it still fails in linker with:

cc -ggdb -O3 -Wall -I/usr/local/ssl/include -I/usr/include   -c -o vanitygen.o vanitygen.c
cc -ggdb -O3 -Wall -I/usr/local/ssl/include -I/usr/include   -c -o pattern.o pattern.c
cc -ggdb -O3 -Wall -I/usr/local/ssl/include -I/usr/include   -c -o util.o util.c
cc vanitygen.o pattern.o util.o -o vanitygen -ggdb -O3 -Wall -I/usr/local/ssl/include -I/usr/include -ldl -lpcre -lcrypto -lm -lpthread -L/usr/local/ssl/lib -I/usr/lib
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x17): undefined reference to `dlopen'
/usr/bin/ld: dso_dlfcn.c:(.text+0x2a): undefined reference to `dlsym'
/usr/bin/ld: dso_dlfcn.c:(.text+0x35): undefined reference to `dlclose'
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x367): undefined reference to `dlsym'
/usr/bin/ld: dso_dlfcn.c:(.text+0x432): undefined reference to `dlerror'
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x4b3): undefined reference to `dlsym'
/usr/bin/ld: dso_dlfcn.c:(.text+0x582): undefined reference to `dlerror'
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_load':
dso_dlfcn.c:(.text+0x5ec): undefined reference to `dlopen'
/usr/bin/ld: dso_dlfcn.c:(.text+0x655): undefined reference to `dlclose'
/usr/bin/ld: dso_dlfcn.c:(.text+0x695): undefined reference to `dlerror'
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x736): undefined reference to `dladdr'
/usr/bin/ld: dso_dlfcn.c:(.text+0x7a7): undefined reference to `dlerror'
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): in function `dlfcn_unload':
dso_dlfcn.c:(.text+0x808): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [Makefile:19: vanitygen] Error 1

But I have -ldl :(

krzyk avatar May 18 '22 13:05 krzyk

.

vlc33 avatar May 18 '22 16:05 vlc33