Closed pbroser closed 2 years ago
Hi Philip,
Thanks for highlighting this. Have you tried attaching the boost headers package in R? From the warning, it looks like the header files are trying to find a boost library on your system and cannot.
Let me know if that works, and I will update the readme file accordingly.
Eric
Hey,
I just updated my R to 4.2 and got the same error you did. I modified the code in the readme file so include the appropriate R packages. That should work but if it doesn't, let me know!
Thanks again for bringing this to my attention!
Eric
Dear Eric,
Thanks for your reply, I still get the following error when I am trying to compile the hilbert sort.cpp given in the readme file: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppCGAL/include/CGAL/config.h:128:10: fatal error: 'boost/config.hpp' file not found
^~~~~~~~~~~~~~~~~~
18 warnings and 1 error generated. make: *** [HilbertSort.o] Error 1 Fehler in Rcpp::sourceCpp("HilbertSort.cpp") : Error 1 occurred building shared library.
I will send you the cpp and R file I am susing. What I realized that in the boos directory has no config.h.
My terminal shows:
(base) @. CGAL % pwd /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppCGAL/include/CGAL (base) @. CGAL % cd boost (base) @. boost % ls bimap bimap.hpp graph iterator parameter.h (base) @. boost %
I tryed to redictrect R to my CGAL homebrew installation with
Sys.setenv("CGAL_DIR" = "/opt/homebrew/opt/cgal")
but the package still used the CGAL installation of R.
See attached R script and the cpp File.
Greetings
Philip
Am 23.06.2022 um 04:32 schrieb Eric Dunipace @.***>:
Hey,
I just updated my R to 4.2 and got the same error you did. I modified the code in the readme file so include the appropriate R packages. That should work but if it doesn't, let me know!
Thanks again for bringing this to my attention!
Eric
— Reply to this email directly, view it on GitHub https://github.com/ericdunipace/RcppCGAL/issues/4#issuecomment-1163855878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZUIXL32UUE4LVFY5MVAL63VQPEFPANCNFSM5Y2MJWVQ. You are receiving this because you authored the thread.
You’re looking at the boost folder in CGAL, not the boost library. Do you have boost installed or the BH header files loaded?
Part of the problem with trying to use your home-brew is that the Github version already comes installed with CGAL so the package will ignore your variable telling it to use your library. The one included in the package is better to use if you’re building and submitting other R packages as it has some hacky code to make it acceptable to CRAN maintainers.
Dear Eric Dunipace,
When I am trying to use the hilbertSort.cpp with the R commands:
library(RcppCGAL) Sys.setenv("CGAL_DIR" = "/opt/homebrew/Cellar/cgal/5.4.1/include") Rcpp::sourceCpp("hilbertSort.cpp")
I get the following error:
"R.framework/Versions/4.2-arm64/Resources/library/RcppCGAL/include/CGAL/config.h:128:10: fatal error: 'boost/config.hpp' file not found"
Even when I am using the homebrew Cgal Version with R I get the same error library(RcppCGAL) Sys.setenv("CGAL_DIR" = "/opt/homebrew/Cellar/cgal/5.4.1/include") Rcpp::sourceCpp("hilbertSort.cpp")
Any idea how to fix this?
Many Greetings
Philip