-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install issue #1
Comments
Thanks for reaching out! I see that you're using macOS, have you followed the installation instructions on the README (https://github.com/prioritizr/prepr?tab=readme-ov-file#macos) to install system dependencies? Sorry in advance if you've already tried this. |
Oh, sorry, I just reread your post and saw that you said you already installed the homebrew libraries. |
What happens if you run these commands in the terminal?
|
Thank you, Jeffrey. The output of those commands is:
and
|
Interesting - so it seems that pkg-config knows about gmp being installed. What's in the
|
the outputs of those are
and
Any clues? |
So it looks like the files are in this folder - but for some reason it's not working. Could you try adding these folders to your computer's |
Thank you Jeffrey. I've added those folder (plus the pfgconfig folder where the gmpxx.pc file lives) to the PATH variable but still no luck. I've also added the pkgconfig directory to the PKG_CONFIG_PATH variable. The error remains the same. Here is some useful output from terminal
Thanks again for your help! Juan |
No worries! I'm sorry about this issue and that it's taking so long to address. I think it might be useful to get more information on what compilation flags are being used on your compuer. So, I've updated the configuration files to provide more information. Could you please try installing the
Also, just to check, are you able to install other packages that require compilation from source on your computer? E.g., does running this command work?
|
Hi Jeffrey, Thanks for your help again. I'm actually not able to install other packages from source :( This is the output from `
The downloaded source packages are in I guess my problem is bigger than I thought.... Any ideas? |
And the output from `── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
Thanks for persisting with this. Since you can't install dplyr from source, this would suggest that your computer is missing some general peice of software for installing/building R packages from source. I don't know much about macOS sorry. I checked a book on R package development, and it seems like xcode might be needed. Could you try installing it following these instructions (https://r-pkgs.org/setup.html#macos) and see if it works after that? |
Thanks, Jeffrey. I've updated xcode and I'm now using version |
No worries! Yeah, both prepr and dplyr have C/C++ source that needs to be compiled during installation (when installing from source) and this requires additional software to be installed (e.g., like xcode). Whereas, ggplot2 doesn't have any C/C++ source code, so it can be installed from source without requiring additional software (beyond a working R installation). Does dplyr still fail to install from source? Another option we can try is compiling prepr using R-universe so that you can install a precompiled binary of the package (this is the default option when installing packages from CRAN on macOS and Windows). This means that you won't need to compile C/C++ code as part of the installation process on your computer. I'll see if can get that working for you. |
I've updated the r-universe configuration for the prioritizr org, so it will build precompiled binaries for the prepr package. Since there's a bit of a delay, it's not going to do this immediately unfortunately. As I understand it, r-universe automatically updates once each day to see if there's new packages it should build. But hopefully, it should start soon. If you visit here (https://prioritizr.r-universe.dev/builds), this will show the precompiled packages that are available for installation. It currently doesn't show prepr, but hopefully will in the future. Once you see prepr listed there, could you try running this code to install prepr from r-universe?
|
Just checked r-universe and it looks like it's finished building prepr, can you try installing it when you get a chance? |
Hi Jeffrey, thanks again for your help! I've tried installing ` Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘prepr’ trying URL 'https://prioritizr.r-universe.dev/src/contrib/prepr_0.3.0.tar.gz'
|
Thanks for trying it out! I'm sorry - it looks like the r-universe buids failed for macOS (https://github.com/r-universe/prioritizr/actions/runs/12307931762) (though they worked for Linux and Windows). I'll take another look and see what I can do. I'm a bit busy this weekend, so it might be a few days before I can get to it. |
Hi!
I'm running into an installation error that I can' seem to overcome. Seems like it's an issue trying to find
gmp
. Any ideas how to fix it? I've reinstall all relevant libraries using homebrew.Here is the error
`remotes::install_github("prioritizr/prepr")
Using GitHub PAT from the git credential store.
Downloading GitHub repo prioritizr/prepr@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: RcppCGAL (5.6.4 -> 6.0) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/f2/n6b1dv_12qvc6pyj9cz4lcjm0000gp/T/Rtmp70HL3w/remotesafb978dc6ed2/prioritizr-prepr-c3953e8/DESCRIPTION’ (401ms)
─ preparing ‘prepr’: (1.1s)
✔ checking DESCRIPTION meta-information
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts (701ms)
─ checking for empty or unneeded directories
─ building ‘prepr_0.3.0.tar.gz’
** using staged installation
checking if R found... yes
configure: R version: 4.4.2
configure: CC: clang -arch arm64
configure: CPP:
configure: CFLAGS: -falign-functions=64 -Wall -g -O2
configure: CPPFLAGS: -I/opt/R/arm64/include
configure: LDFLAGS: -L/opt/R/arm64/lib
checking for gdal-config... /opt/homebrew/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.10.0
checking GDAL version >= 2.0.1... yes
checking for pkg-config... yes
checking if gmp compiles... no
configure: Configuration failed because gmp was not found. Try installing:
configure: * deb: libgmp3-dev (Debian, Ubuntu)
configure: * rpm: gmp-devel (Fedora, EPEL)
configure: * brew: gmp (Mac OSX)
configure:
configure: If gmp is already installed, check that 'pkg-config' is in
configure: your PATH and PKG_CONFIG_PATH contains a gmpxx.pc file.
configure:
configure: error: ERROR: Installation failed
ERROR: configuration failed for package ‘prepr’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/f2/n6b1dv_12qvc6pyj9cz4lcjm0000gp/T//Rtmp70HL3w/fileafb95b3f91de/prepr_0.3.0.tar.gz’ had non-zero exit status`
And here is the output of my sessionInfo()
`R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.7.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Bogota
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] processx_3.8.4 compiler_4.4.2 R6_2.5.1 cli_3.6.3 tools_4.4.2 rstudioapi_0.16.0 curl_5.2.1 remotes_2.5.0
[9] desc_1.4.3 callr_3.7.6 ps_1.7.7 pkgbuild_1.4.4 `
The text was updated successfully, but these errors were encountered: