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

Can't compile #138

Open
underattach opened this issue Jun 8, 2022 · 3 comments
Open

Can't compile #138

underattach opened this issue Jun 8, 2022 · 3 comments

Comments

@underattach
Copy link

underattach commented Jun 8, 2022

cc -ggdb -O3 -Wall -c -o vanitygen.o vanitygen.c
In file included from vanitygen.c:32:
pattern.h:54:12: error: field ‘vxc_bntarg’ has incomplete type
BIGNUM vxc_bntarg;
^~~~~~~~~~
pattern.h:55:12: error: field ‘vxc_bnbase’ has incomplete type
BIGNUM vxc_bnbase;
^~~~~~~~~~
pattern.h:56:12: error: field ‘vxc_bntmp’ has incomplete type
BIGNUM vxc_bntmp;
^~~~~~~~~
pattern.h:57:12: error: field ‘vxc_bntmp2’ has incomplete type
BIGNUM vxc_bntmp2;
^~~~~~~~~~
vanitygen.c: In function ‘vg_thread_loop’:
vanitygen.c:134:21: error: ‘BN_MASK2’ undeclared (first use in this function); did you mean ‘BN_BITS2’?
if ((rekey_at == BN_MASK2) || (rekey_at > rekey_max))
^~~~~~~~
BN_BITS2
vanitygen.c:134:21: note: each undeclared identifier is reported only once for each function it appears in
make: *** [: vanitygen.o] Error 1

Debian version: 10.12
gcc version 8.3.0 (Debian 8.3.0-6)

@jowodo
Copy link

jowodo commented Nov 14, 2022

same on

  • ubuntu 20.04, linux 4.4.0, gcc 9.4.0, libssl-dev 1.1.1f-1ubuntu2.16 and 1.1.1f-1ubuntu2.13
  • M1 macos 12.5, clang-1316.0.21.2.5, openssl (brew) 1.1.1s and 3.0.7
    As mentioned in Getting error when compiling on xubuntu #94 it seems that the problem is lib1.1 is too new (as this software seems to be last updated 2012).
    So I tried to download a old openssl version:
git clone https://github.com/samr7/vanitygen
cd vanitygen 
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_0_2u.tar.gz
tar xf OpenSSL_1_0_2u.tar.gz 
rm OpenSSL_1_0_2u.tar.gz 
cd openssl-OpenSSL_1_0_2u/
./configure --prefix=~/Documents/openssl1.0 
make 
make test 
make install 
cd .. 
CPATH=~/Documents/openssl1.0/include LIBRARY_PATH=~/Documents/openssl1.0/lib make 

but then I get new and different errors:

~/Documents/vanitygen$ CPATH=~/Documents/ssl1.0/include/ LIBRARY_PATH=~/Documents/ssl1.0/lib/ make
cc -ggdb -O3 -Wall   -c -o pattern.o pattern.c
cc vanitygen.o pattern.o util.o -o vanitygen -ggdb -O3 -Wall -lpcre -lcrypto -lm -lpthread
/usr/bin/ld: ~/Documents/ssl1.0/lib/../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: ~/Documents/ssl1.0/lib/../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: ~/Documents/ssl1.0/lib/../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: ~/Documents/ssl1.0/lib/../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: ~/Documents/ssl1.0/lib/../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: ~/Documents/ssl1.0/lib/../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:9: vanitygen] Error 1

Eventually, I did this:

git clone https://github.com/10gic/vanitygen-plusplus 
cd vanitygen-plusplus 
make 
./vanitygen++ 1test

@PRFinklemeister
Copy link

Tried vanitygen-plusplsu and get this...

vanitygen.c: In function ‘main’:
vanitygen.c:397:14: warning: variable ‘coin’ set but not used [-Wunused-but-set-variable]
  397 |  const char *coin = "BTC";
      |              ^~~~
cc -ggdb -O3 -Wall -Wno-deprecated   -c -o pattern.o pattern.c
pattern.c:32:10: fatal error: pcre.h: No such file or directory
   32 | #include <pcre.h>
      |          ^~~~~~~~
compilation terminated.

@jowodo
Copy link

jowodo commented Jul 12, 2023

@PRFinklemeister please submit an issue at https://github.com/10gic/vanitygen-plusplus/issues
Also, check if somebody else already had a similar problem and if not, include information about your system (e.g. the output of the commands: uname -a, lsb_release -a and gcc --version and include the exact commands on how to replicate the error which you encountered.

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