Error OSX Vanitygen: pattern.c:32:10: error fatal: archivo 'pcre.h' no encontrado

Recibo el siguiente error cuando trato de hacer vanitygen de acuerdo con las instrucciones enumeradas en "instalar"

Error de make (versión corta)

27 warnings generated.
cc -ggdb -O3 -Wall   -c -o pattern.o pattern.c
pattern.c:32:10: fatal error: 'pcre.h' file not found
#include <pcre.h>
         ^
1 error generated.

Salida completa de marca

my-MacBook-Pro:git-vanitygen admin$ make
cc -ggdb -O3 -Wall   -c -o vanitygen.o vanitygen.c
vanitygen.c:76:11: warning: 'EC_KEY_get0_group' is deprecated
      [-Wdeprecated-declarations]
        pgroup = EC_KEY_get0_group(pkey);
                 ^
vanitygen.c:77:9: warning: 'EC_GROUP_get0_generator' is deprecated
      [-Wdeprecated-declarations]
        pgen = EC_GROUP_get0_generator(pgroup);
               ^
vanitygen.c:80:13: warning: 'EC_POINT_new' is deprecated
      [-Wdeprecated-declarations]
                ppnt[i] = EC_POINT_new(pgroup);
                          ^
vanitygen.c:86:14: warning: 'EC_POINT_new' is deprecated
      [-Wdeprecated-declarations]
        pbatchinc = EC_POINT_new(pgroup);
                    ^
vanitygen.c:92:2: warning: 'BN_set_word' is deprecated
      [-Wdeprecated-declarations]
        BN_set_word(&vxcp->vxc_bntmp, ptarraysize);
        ^
vanitygen.c:93:2: warning: 'EC_POINT_mul' is deprecated
      [-Wdeprecated-declarations]
        EC_POINT_mul(pgroup, pbatchinc, &vxcp->vxc_bntmp, NULL, NULL,
        ^
vanitygen.c:95:2: warning: 'EC_POINT_make_affine' is deprecated
      [-Wdeprecated-declarations]
        EC_POINT_make_affine(pgroup, pbatchinc, vxcp->vxc_bnctx);
        ^
vanitygen.c:124:4: warning: 'EC_KEY_generate_key' is deprecated
      [-Wdeprecated-declarations]
                        EC_KEY_generate_key(pkey);
                        ^
vanitygen.c:128:4: warning: 'EC_GROUP_get_order' is deprecated
      [-Wdeprecated-declarations]
                        EC_GROUP_get_order(pgroup, &vxcp->vxc_bntmp,
                        ^
vanitygen.c:130:4: warning: 'BN_sub' is deprecated [-Wdeprecated-declarations]
                        BN_sub(&vxcp->vxc_bntmp2,
                        ^
vanitygen.c:132:11: warning: 'EC_KEY_get0_private_key' is deprecated
      [-Wdeprecated-declarations]
                               EC_KEY_get0_private_key(pkey));
                               ^
vanitygen.c:133:15: warning: 'BN_get_word' is deprecated
      [-Wdeprecated-declarations]
                        rekey_at = BN_get_word(&vxcp->vxc_bntmp2);
                                   ^
vanitygen.c:138:4: warning: 'EC_POINT_copy' is deprecated
      [-Wdeprecated-declarations]
                        EC_POINT_copy(ppnt[0], EC_KEY_get0_public_key(pkey));
                        ^
vanitygen.c:138:27: warning: 'EC_KEY_get0_public_key' is deprecated
      [-Wdeprecated-declarations]
                        EC_POINT_copy(ppnt[0], EC_KEY_get0_public_key(pkey));
                                               ^
vanitygen.c:145:5: warning: 'EC_POINT_add' is deprecated
      [-Wdeprecated-declarations]
                                EC_POINT_add(pgroup,
                                ^
vanitygen.c:154:5: warning: 'EC_POINT_add' is deprecated
      [-Wdeprecated-declarations]
                                EC_POINT_add(pgroup,
                                ^
vanitygen.c:173:5: warning: 'EC_POINT_add' is deprecated
      [-Wdeprecated-declarations]
                                EC_POINT_add(pgroup,
                                ^
vanitygen.c:192:3: warning: 'EC_POINTs_make_affine' is deprecated
      [-Wdeprecated-declarations]
                EC_POINTs_make_affine(pgroup, nbatch, ppnt, vxcp->vxc_bnctx);
                ^
vanitygen.c:196:10: warning: 'EC_POINT_point2oct' is deprecated
      [-Wdeprecated-declarations]
                        len = EC_POINT_point2oct(pgroup, ppnt[i],
                              ^
vanitygen.c:203:4: warning: 'SHA256' is deprecated [-Wdeprecated-declarations]
                        SHA256(hash_buf, hash_len, hash1);
                        ^
vanitygen.c:204:4: warning: 'RIPEMD160' is deprecated
      [-Wdeprecated-declarations]
                        RIPEMD160(hash1, sizeof(hash1), &vxcp->vxc_binres[1]);
                        ^
vanitygen.c:236:4: warning: 'EC_POINT_free' is deprecated
      [-Wdeprecated-declarations]
                        EC_POINT_free(ppnt[i]);
                        ^
vanitygen.c:238:3: warning: 'EC_POINT_free' is deprecated
      [-Wdeprecated-declarations]
                EC_POINT_free(pbatchinc);
                ^
vanitygen.c:419:18: warning: 'EC_POINT_hex2point' is deprecated
      [-Wdeprecated-declarations]
                        pubkey_base = EC_POINT_hex2point(
                                      ^
vanitygen.c:420:5: warning: 'EC_KEY_get0_group' is deprecated
      [-Wdeprecated-declarations]
                                EC_KEY_get0_group(pkey),
                                ^
vanitygen.c:422:4: warning: 'EC_KEY_free' is deprecated
      [-Wdeprecated-declarations]
                        EC_KEY_free(pkey);
                        ^
vanitygen.c:528:9: warning: 'RAND_load_file' is deprecated
      [-Wdeprecated-declarations]
                opt = RAND_load_file(seedfile, opt);
                      ^
27 warnings generated.
cc -ggdb -O3 -Wall   -c -o pattern.o pattern.c
pattern.c:32:10: fatal error: 'pcre.h' file not found
#include <pcre.h>
         ^
1 error generated.
make: *** [pattern.o] Error 1

ACTUALIZAR

Sospecho que el PCRE que aparece en la lista también tiene un puerto OSX que aparece aquí , y cuando compilo de acuerdo con las instrucciones, aparece este error:

make  install-am
 ./install-sh -c -d '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libpcre.la libpcreposix.la libpcrecpp.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libpcre.1.dylib /usr/local/lib/libpcre.1.dylib
install: /usr/local/lib/libpcre.1.dylib: Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 71
make[1]: *** [install-am] Error 2
make: *** [install] Error 2
Para aquellos que votan fuera del tema, esta pregunta no parece sustancialmente diferente de las muchas otras preguntas etiquetadas como "vanitygen". Si todas las preguntas de este tipo se van a considerar fuera de tema, esa consideración probablemente debería comenzar con una meta publicación. Votación para dejar abierto por ahora.
Debe escribir 'sudo make install' en lugar de 'make install' para instalar PCRE correctamente.

Respuestas (2)

Recomendaría usar Homebrew o MacPorts para administrar esta dependencia.

El paquete Homebrew es simplemente pcreo pcre++.

brew install pcre pcre++

Los paquetes MacPorts son pcrey pcrexx.

sudo port install pcre pcrexx
Los paquetes macports correspondientes son pcreypcrexx
Tenga en cuenta que si ha instalado una nueva versión de XCode, deberá instalar las herramientas de línea de comandos correspondientes para /usr/local/includesestar en la ruta de búsqueda de su compilador. Aquí es donde Homebrew y MacPorts habrían puesto el pcre.harchivo.
pcre++no es necesario.

en caso de que alguien todavía esté buscando una respuesta: en pattern.c simplemente coloque la ruta completa a pcre.h (utilice localizar pcre.h para encontrar una ruta; si no tiene el archivo, simplemente instale el paquete pcre primero) . Debería compilar bien después.