I have seen several methods for building bitcoin from source on Fedora, but I have not seen corresponding information for vanitygen. It builds, and it starts up, but then it gives me the error: "pattern.c:164: vg_exec_context_init: Assertion `vxcp->vxc_key' failed." Of course, the cause is easily searchable: the Fedora implementation of OpenSSL does not include the algorithms that bitcoin depends on. Bicoin got around this, but vanitygen does not seem to be able to. I downloaded and built the most recent version of OpenSSL from their website. Using "make -rpath [path to the openssl I built]", however, does not change anything.

So my question is: How do I get vanitygen to point to my OpenSSL rather than the default OpenSSL? I don't want my entire system to use the custom OpenSSL because I trust the Fedora implementation more than the one I downloaded; however I don't intend to use the generated addresses for more than small bitcoin amounts, so they don't have to be as safe.

References: How do I build Bitcoin in Fedora 18?

EDIT: For reference, the procedure referenced in the accepted answer below is:

NOTE: In both this and the accepted answer below, REPLACE openssl-1.0.1g WITH THE LATEST VERSION OF OPENSSL. 1.0.1g may have security flaws that are patched in future versions - it is current as of this writing, but probably will not be in six months.

mkdir ~/devel
cd ~/devel

wget http://openssl.org/source/openssl-1.0.1g.tar.gz
tar xfz openssl-1.0.1g.tar.gz
cd openssl-1.0.1g

./config --prefix=/opt/openssl-1.0.1g zlib-dynamic shared

sudo make install_sw

2 Answers 2


First, you need to compile OpenSSL from the sources. I assume that you've compiled it as it is described in the Bitmessage Forum. That way, OpenSSL including elliptic curves support is installed in /opt/openssl-version. As for the Heartbleed bug that has recently been published, please use the very latest stable version of OpenSSL.

Following this description, I will now assume that OpenSSL including elliptic curve support has been installed unter /opt/openssl-1.0.1g

Now coming to vanitygen: Download the zip file and extract it to your hard drive. Then modify the Makefile: At the very top of that file add the following line:

export LD_RUN_PATH=/opt/openssl-1.0.1g/lib

After that, go to the line where CPFLAGS is set. Modify it, so that it looks as follows:

CFLAGS=-ggdb -O3 -Wall -L/opt/openssl-1.0.1g/lib

Basically, the line is unmodified, except for the library path to the custom OpenSSL library, which has been appended.

That's it! Now you can compile vanitygen in Fedora as well:

./vanitygen 1TEST
  • Thank you! Worked like a charm! Unfortunately, upvote requires 15 reputation. Don't worry, I will as soon as I can. :)
    – CPomerantz
    Commented Apr 20, 2014 at 5:44
  • for people installed openssl source and still cant figure out, this might help bitcointalk.org/index.php?topic=641328.0
    – user10603
    Commented Jul 3, 2017 at 6:10

I ran into this trying to help a friend with vanitygen and went the other direction, patching the Fedora packages to add the secp256k1 curve. There are pros and cons to my approach and to Marc's, but if you want to try a system-wide patch, here's a blog post on it with links to the patches and RPM's.

If you go this direction, all you need to do is 'git clone' vanity gen and then run 'make'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.