Vanitygen

OSX Vanitygen 損壞的生成文件

  • July 28, 2017

每當我嘗試通過執行“make”進行安裝時,都會出現大量錯誤。

$ 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

您缺少編譯它所需的依賴項。更具體地說pcre.h或 Perl 兼容的正則表達式庫。

要解決此問題,請安裝MacPorts,然後使用它下載所需的依賴項:

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

這是未經測試的,因為我不是 Mac 使用者,但它應該可以工作。

這並不完全是您正在尋找的解決方案,但有人為 vanitygen 創建了一個 Docker 容器,我發現使用 Docker 在我的 Mac 上執行要容易得多:

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

引用自:https://bitcoin.stackexchange.com/questions/6004