sethrfore / homebrew-r-srf

Custom Homebrew R formula with tcl-tk support and additional options
59 stars 16 forks source link

Installation of 4.2.2 fails because of pcre2 not found #59

Closed halterc closed 1 year ago

halterc commented 1 year ago

Hi sethrfore,

following up on issue https://github.com/sethrfore/homebrew-r-srf/issues/57 Same problem here. Running macOS Ventura 13.1 on a MacBook M1. Error code is the same.

brew install -s sethrfore/r-srf/r --with-openblas ==> Fetching sethrfore/r-srf/r ==> Downloading https://cran.r-project.org/src/base/R-4/R-4.2.2.tar.gz Already downloaded: /Users/userABC/Library/Caches/Homebrew/downloads/2cc35deb74316557f5bf075f5d775cd8214dbd01e31595613b6c366b27fec93f--R-4.2.2.tar.gz ==> Installing r from sethrfore/r-srf ==> ./configure --prefix=/opt/homebrew/Cellar/r/4.2.2_1 --enable-memory-profilin ==> make Last 15 lines from /Users/userABC/Library/Logs/Homebrew/r/02.make: making lapack.d from lapack.c making list.d from list.c making localecharset.d from localecharset.c making logic.d from logic.c grep.c:73:10: fatal error: 'pcre2.h' file not found \ # include ^~~~~ 1 error generated. make[2]: [grep.d] Error 1 make[2]: Waiting for unfinished jobs.... making mapply.d from mapply.c making main.d from main.c making mask.d from mask.c make[1]: [R] Error 1 make: [R] Error 1

I also tried reinstalling pcre2 freshly but to no avail. Also linking pcre2.h to many different paths (accessed by brew) did not work.

Additionally, I tried the advices from this website: https://stackoverflow.com/questions/66496119/pecl-fails-installing-mongodb-driver-on-apple-silicon-m1 E.g. by using this installation command: CFLAGS=-I/opt/homebrew/include brew install -s sethrfore/r-srf/r --with-openblas But same error.

Any help is greatly appreciated. :)

sethrfore commented 1 year ago

Updated formula to reflect patch fix for build errors on macOS Ventura (remove pointers to macOSX12.sdk). Updated 'uses_from_macos' dependencies. This update built without errors on my machine (intel not silicon). Try again and update with results.

sethrfore commented 1 year ago

Aside from that, verify that Command Line Tools is installed and version matches Xcode (shown in brew config). Also can try building after a fresh install of dependencies e.g., brew deps -n sethrfore/r-srf/r | xargs brew reinstall.

halterc commented 1 year ago

Thanks for updating and responding so quickly. It works now.