<p>You are missing a dependency required to compile it. More specifically <code>pcre.h</code> or the Perl Compatible Regular Expressions library.</p>

<p>To solve this install <a href="http://www.macports.org/install.php" rel="nofollow">MacPorts</a> and then use it to download the required dependencies:</p>

<pre><code>sudo port install autoconf
sudo port install pcre
sudo ln -s /opt/local/include/pcre.h /usr/include/
</code></pre>

<p>This is untested as I'm no Mac user, but it should work.</p>

CC BY-SA 3.0
2013-01-05T18:14:48.300Z
Thanks! Worked perfectly! My sudo was broken though, so I had to login root, but then I couldn't run port so I had to go to /opt/local/bin and run ./port install autoconf and all that stuff.
lurf jurv
CC BY-SA 3.0
2013-01-05T19:34:56.423Z
the last step would better be `cd /usr/include/; sudo ln -s /opt/local/include/pcre.h`
o0'.
CC BY-SA 3.0
2014-05-09T14:10:19.987Z
This works with brew also `brew install pcre`
Mark
CC BY-SA 3.0
2014-06-13T03:50:17.753Z
`Error: Unable to execute port: Could not open file: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/autoconf/Portfile`
TheDoctor
CC BY-SA 3.0
2013-01-05T16:47:38.053Z
2013-01-05T19:40:02.700Z
2013-01-05T19:40:02.700Z
cdecker
<p>This isn't exactly the solution you were looking for, but someone created a Docker container for vanitygen and I found it much easier to run on my Mac with Docker:</p>

<p><a href="https://hub.docker.com/r/cbeams/vanitygen/" rel="nofollow noreferrer">https://hub.docker.com/r/cbeams/vanitygen/</a></p>

CC BY-SA 3.0
2017-08-28T00:14:31.647Z
Thanks, but I was really looking for how to build it on mac. (also, I asked this >4.5 years ago). I ended up getting an address on vanitypool instead of generating locally.
lurf jurv
CC BY-SA 3.0
2017-08-28T06:15:28.567Z
Fair enough. I was just looking for a way to do it locally on my mac and using Docker was the simplest solution available.

So I figured I would leave it as a suggestion for anyone who's in the same position and who stumbles across this post in the future.
James Shapiro
CC BY-SA 3.0
2017-07-28T05:29:23.807Z
2017-07-28T05:29:23.807Z
James Shapiro
<p>Whenever I try to install by running "make" it gives me tons of errors.</p>

<pre><code>$ make
cc -ggdb -O3 -Wall   -c -o pattern.o pattern.c
pattern.c:32:18: error: pcre.h: No such file or directory
pattern.c:1604: error: expected specifier-qualifier-list before ‘pcre’
pattern.c: In function ‘vg_regex_context_add_patterns’:
pattern.c:1623: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1625: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1626: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1636: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1637: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1638: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1641: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1642: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1643: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1643: error: ‘pcre’ undeclared (first use in this function)
pattern.c:1643: error: (Each undeclared identifier is reported only once
pattern.c:1643: error: for each function it appears in.)
pattern.c:1643: error: expected expression before ‘)’ token
pattern.c:1644: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1644: error: ‘pcre_extra’ undeclared (first use in this function)
pattern.c:1644: error: expected expression before ‘)’ token
pattern.c:1645: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1646: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1651: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1652: warning: implicit declaration of function ‘pcre_compile’
pattern.c:1654: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1667: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1668: warning: implicit declaration of function ‘pcre_study’
pattern.c:1668: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1671: warning: implicit declaration of function ‘pcre_free’
pattern.c:1671: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1674: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c: In function ‘vg_regex_context_clear_all_patterns’:
pattern.c:1692: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1693: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1694: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c: In function ‘vg_regex_context_free’:
pattern.c:1706: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1707: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c: In function ‘vg_regex_test’:
pattern.c:1723: error: ‘pcre’ undeclared (first use in this function)
pattern.c:1723: error: ‘re’ undeclared (first use in this function)
pattern.c:1764: warning: implicit declaration of function ‘pcre_exec’
pattern.c:1764: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1765: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1771: error: ‘PCRE_ERROR_NOMATCH’ undeclared (first use in this function)
pattern.c:1779: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1783: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1788: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1797: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1798: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1799: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1806: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1806: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1807: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1808: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1809: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1809: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c: In function ‘vg_regex_context_new’:
pattern.c:1840: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1841: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
make: *** [pattern.o] Error 1
</code></pre>

CC BY-SA 3.0
2013-01-06T13:11:47.047Z
Related: https://github.com/samr7/vanitygen/issues/18
o0'.
<vanitygen>
OSX Vanitygen broken makefile
lurf jurv
# OSX Vanitygen broken makefile

(Asked by: username_0 on 2013-01-05)

Whenever I try to install by running "make" it gives me tons of errors.

```
$ make
cc -ggdb -O3 -Wall   -c -o pattern.o pattern.c
pattern.c:32:18: error: pcre.h: No such file or directory
pattern.c:1604: error: expected specifier-qualifier-list before ‘pcre’
pattern.c: In function ‘vg_regex_context_add_patterns’:
pattern.c:1623: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1625: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1626: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1636: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1637: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1638: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1641: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1642: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1643: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1643: error: ‘pcre’ undeclared (first use in this function)
pattern.c:1643: error: (Each undeclared identifier is reported only once
pattern.c:1643: error: for each function it appears in.)
pattern.c:1643: error: expected expression before ‘)’ token
pattern.c:1644: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1644: error: ‘pcre_extra’ undeclared (first use in this function)
pattern.c:1644: error: expected expression before ‘)’ token
pattern.c:1645: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1646: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1651: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1652: warning: implicit declaration of function ‘pcre_compile’
pattern.c:1654: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1667: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1668: warning: implicit declaration of function ‘pcre_study’
pattern.c:1668: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1671: warning: implicit declaration of function ‘pcre_free’
pattern.c:1671: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1674: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c: In function ‘vg_regex_context_clear_all_patterns’:
pattern.c:1692: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1693: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1694: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c: In function ‘vg_regex_context_free’:
pattern.c:1706: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
pattern.c:1707: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c: In function ‘vg_regex_test’:
pattern.c:1723: error: ‘pcre’ undeclared (first use in this function)
pattern.c:1723: error: ‘re’ undeclared (first use in this function)
pattern.c:1764: warning: implicit declaration of function ‘pcre_exec’
pattern.c:1764: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1765: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1771: error: ‘PCRE_ERROR_NOMATCH’ undeclared (first use in this function)
pattern.c:1779: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1783: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1788: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1797: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1798: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1799: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1806: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1806: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1807: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1808: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_extra’
pattern.c:1809: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c:1809: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex_pat’
pattern.c: In function ‘vg_regex_context_new’:
pattern.c:1840: error: ‘vg_regex_context_t’ has no member named ‘vcr_regex’
pattern.c:1841: error: ‘vg_regex_context_t’ has no member named ‘vcr_nalloc’
make: *** [pattern.o] Error 1

```

**Tags:** vanitygen

> **Comments:**
> **username_1**: Related: https://github.com/samr7/vanitygen/issues/18  

---

## 2 answers

### Answer by username_2 on 2013-01-05. Score: 3 | Accepted answer

You are missing a dependency required to compile it. More specifically `pcre.h` or the Perl Compatible Regular Expressions library.

To solve this install [MacPorts](http://www.macports.org/install.php) and then use it to download the required dependencies:

```
sudo port install autoconf
sudo port install pcre
sudo ln -s /opt/local/include/pcre.h /usr/include/

```

This is untested as I'm no Mac user, but it should work.

> **Comments:**
> **username_0**: Thanks! Worked perfectly! My sudo was broken though, so I had to login root, but then I couldn't run port so I had to go to /opt/local/bin and run ./port install autoconf and all that stuff.  
> **username_1**: the last step would better be `cd /usr/include/; sudo ln -s /opt/local/include/pcre.h`  
> **username_3**: This works with brew also `brew install pcre`  
> **username_4**: `Error: Unable to execute port: Could not open file: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/autoconf/Portfile`  

---

### Answer by username_5 on 2017-07-28. Score: 1

This isn't exactly the solution you were looking for, but someone created a Docker container for vanitygen and I found it much easier to run on my Mac with Docker:

<https://hub.docker.com/r/cbeams/vanitygen/>

> **Comments:**
> **username_0**: Thanks, but I was really looking for how to build it on mac. (also, I asked this >4.5 years ago). I ended up getting an address on vanitypool instead of generating locally.  
> **username_5**: Fair enough. I was just looking for a way to do it locally on my mac and using Docker was the simplest solution available.  So I figured I would leave it as a suggestion for anyone who's in the same position and who stumbles across this post in the future.  

---

