2

This question already has an answer here:

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

marked as duplicate by MCCCS, Raghav Sood, alcio, Andrew Chow May 10 '18 at 17:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4

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 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.

  • 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 Jan 5 '13 at 18:14
  • the last step would better be cd /usr/include/; sudo ln -s /opt/local/include/pcre.h – o0'. Jan 5 '13 at 19:34
  • 1
    This works with brew also brew install pcre – Mark May 9 '14 at 14:10
  • Error: Unable to execute port: Could not open file: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/autoconf/Portfile – TheDoctor Jun 13 '14 at 3:50
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/

  • 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 Aug 28 '17 at 0:14
  • 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 Aug 28 '17 at 6:15

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