Skip to content


Why these two lines don't let OSX install vanitygen? #20

rdymac opened this Issue · 12 comments

3 participants


I couldn't install the on OSX using ' make ', so @Habbie told me to remove these two lines in ' util.c ' file and then I could finally install vanytigen.

line 353: #if OPENSSL_VERSION_NUMBER < 0x10000000L

line: 462: #endif /* OPENSSL_VERSION_NUMBER < 0x10000000L */


OSX uses an older version of openssl libraries out of the box.

[colin@kid vanitygen]$ openssl version
OpenSSL 0.9.8r 8 Feb 2011

The code between those two lines is necessary to provide a function that is present only in OpenSSL 1.0.0 and newer.

What version of OSX are you on? Can you post the output of make?


OSX 10.8.2


If you can, please post the output of make. I'm running 10.8.3 and it's working (building and running), but just throwing a lot of compilation warnings. I don't think there was a change to OpenSSL between 10.8.2 and 10.8.3.


I'll do, ASAP. Has no internet connection now (except mobile).


Try this:

brew install openssl


patch <<EOF
diff --git i/Makefile w/Makefile
index 3486201..9afbc96 100644
--- i/Makefile
+++ w/Makefile
@@ -1,5 +1,5 @@
 LIBS=-lpcre -lcrypto -lm -lpthread
-CFLAGS=-ggdb -O3 -Wall
+CFLAGS=-ggdb -O3 -Wall -I /usr/local/Cellar/openssl/1.0.1e/include -L /usr/local/Cellar/openssl/1.0.1e/l
 OBJS=vanitygen.o oclvanitygen.o oclvanityminer.o oclengine.o keyconv.o pattern.o util.o
 PROGS=vanitygen keyconv oclvanitygen oclvanityminer

(Assumes you have Homebrew for Mac installed. You should. Google it.)


One recommendation, @elliottcable: It's not a very good idea to hardcode the openssl path for Homebrew, because it changes when new versions come out.

Instead, stick $(shell brew --prefix openssl) in a variable and reference that. I've run into this problem a few times, primarily creating a steady stream of "those paths are out of date" messages.


@colindean: I deleted the makefile and all immediately after doing this; I simply used it to build vanitygen, and then got rid of all the sources. That said, your comment is very valuable. Why not submit a vanitygen formula to WyseNynja/homebrew-bitcoin?


See also #25.


Have just done:
$ make

With the latest vanitigen git and got lots of warning, but installed without problem. When running it shows:
WARNING: Built with OpenSSL 0.9.8r 8 Feb 2011
WARNING: Use OpenSSL 1.0.0d+ for best performance

Homebew latest OpenSSL is openssl-1.0.1e


@rdymac try my branch in #25 or use WyseNinja/homebrew-bitcoin keg to install with the correct version of OpenSSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.