vanitygen icon indicating copy to clipboard operation
vanitygen copied to clipboard

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

Open rdymac opened this issue 12 years ago • 13 comments

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 */

rdymac avatar Feb 01 '13 12:02 rdymac

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?

colindean avatar Mar 15 '13 23:03 colindean

OSX 10.8.2

rdymac avatar Mar 15 '13 23:03 rdymac

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.

colindean avatar Mar 16 '13 00:03 colindean

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

rdymac avatar Mar 16 '13 00:03 rdymac

Try this:

brew install openssl

Then,

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
EOF

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

ELLIOTTCABLE avatar Mar 23 '13 19:03 ELLIOTTCABLE

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 avatar Mar 24 '13 17:03 colindean

@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?

ELLIOTTCABLE avatar Mar 25 '13 01:03 ELLIOTTCABLE

Maybe I should! :-)

elliottcable [email protected] wrote:

@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?


Reply to this email directly or view it on GitHub: https://github.com/samr7/vanitygen/issues/20#issuecomment-15374476

colindean avatar Mar 25 '13 02:03 colindean

Boom.

WyseNynja/homebrew-bitcoin#2

colindean avatar Mar 27 '13 04:03 colindean

See also #25.

colindean avatar Mar 27 '13 04:03 colindean

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 avatar Apr 01 '13 15:04 rdymac

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

colindean avatar Apr 01 '13 18:04 colindean

For issues regarding compiling on a Mac, check out the instruction here: https://github.com/pendashteh/vanitygen/blob/macosx/INSTALL

pendashteh avatar Jun 10 '17 04:06 pendashteh