Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on Debian 9 (x64) #129

Open
vlc33 opened this issue Aug 4, 2019 · 3 comments
Open

Install on Debian 9 (x64) #129

vlc33 opened this issue Aug 4, 2019 · 3 comments

Comments

@vlc33
Copy link

vlc33 commented Aug 4, 2019

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)
@vishalkumar2806
Copy link

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

@krzyk
Copy link

krzyk commented May 18, 2022

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 :(

@vlc33
Copy link
Author

vlc33 commented May 18, 2022

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants