Comments (10)
Glad you are sorted out and if you can maybe try to get to R 4.3.2. It will make such things easier.
from rcpparmadillo.
Need to change your C++ compiler away from GCC 4.8.5 to a modern GCC build
...
** libs
using C++ compiler: ‘g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44.0.3)’
g++ -std=gnu++11
...
from rcpparmadillo.
... and also keep in mind what I told you yesterday about OpenMP.
The package builds fine on standard systems.
from rcpparmadillo.
I'm not a native software person.
None of us are. These are skills one picks up along the way, one battle at a time.
from rcpparmadillo.
@adi-bose CentOS 7 is quite outdated and almost end-of-life (EOL). No new projects should be using it. I suggest to upgrade to RHEL 9, CentOS Stream 9, AlmaLinux 9, or Rocky Linux 9.
from rcpparmadillo.
Well we see
R/3.6.3
Can you try with a more recent version of R? Yours was released nearly four years ago in Feb 2020 and I am near-certain that if you used a version from that period it would work too (screenshot from the archive directory:
I don't keep track of what version added OpenMP and which dropped it -- this can be frustrating across OSs (ie macOS barely has it) but you can edit the file src/Makevars and take out the two instances of $(SHLIB_OPENMP_CXXFLAGS)
where R assumes it can trust its Windows installation. Apparently with R 3.6.3 we cannot. Or maybe it is the fault of your CentOS or your local installation: we do check at installation time via configure
so there seems to be a disconnect between what R tells us and what it actually has on this box.
So in short: either install OpenMP, or adjust the build (bluntly) to not use it.
from rcpparmadillo.
On a modern / normal system you should see this (highlight mine):
edd@rob:~/git/rcpparmadillo(master)$ ./configure
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether ccache g++ accepts -g... yes
checking for ccache g++ option to enable C++11 features... none needed
checking how to run the C++ preprocessor... ccache g++ -E
checking whether the compiler supports GNU C++... (cached) yes
checking whether ccache g++ accepts -g... (cached) yes
checking for ccache g++ option to enable C++11 features... (cached) none needed
checking whether we have a suitable tempdir... /tmp
checking whether R CMD SHLIB can already compile programs using OpenMP... yes # <--- this is your issue
checking LAPACK_LIBS... system LAPACK found
configure: creating ./config.status
config.status: creating inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
edd@rob:~/git/rcpparmadillo(master)$
So something makes configure
think it is there (else the compilation would skip it) when it is not.
from rcpparmadillo.
Dirk, my goodness, thank you for the EXTREMELY prompt response. I think you are correct that it is almost certainly an issue with our outdated version of R.
I tried to install an older version (0.9.860.2.0) and it installed no problem ... I still have the issue of not being able to install superml (likely also due to our outdated version of R), but that is my problem!
I really appreciate your swift and extremely helpful response!
from rcpparmadillo.
Hi Dirk,
I hate to bother you again, but we upgraded our RStudio workbench to R version 4.3.2 today, and I am basically running into the same issue:
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 3.2
year 2023
month 10
day 31
svn rev 85441
language R
version.string R version 4.3.2 (2023-10-31)
nickname Eye Holes
Installing package into ‘/home/bosea/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RcppArmadillo_0.12.6.6.1.tar.gz'
Content type 'application/x-gzip' length 1403301 bytes (1.3 MB)
==================================================
downloaded 1.3 MB
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking for g++ -std=gnu++11 option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking for g++ -std=gnu++11 option to enable C++11 features... (cached) none needed
checking whether we have a suitable tempdir... /tmp
checking whether R CMD SHLIB can already compile programs using OpenMP... yes
checking LAPACK_LIBS... R-supplied partial LAPACK found
configure: WARNING: Some complex-valued LAPACK functions may not be available
configure: creating ./config.status
config.status: creating inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
using C++ compiler: ‘g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44.0.3)’
g++ -std=gnu++11 -I"/opt/R/4.3.2/lib/R/include" -DNDEBUG -I../inst/include -I'/home/bosea/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include' -I/usr/local/include -fopenmp -fpic -g -O2 -c RcppArmadillo.cpp -o RcppArmadillo.o
RcppArmadillo.cpp: In function ‘int armadillo_get_number_of_omp_threads()’:
RcppArmadillo.cpp:103:32: error: ‘omp_get_max_threads’ was not declared in this scope
return omp_get_max_threads();
^
RcppArmadillo.cpp: In function ‘void armadillo_set_number_of_omp_threads(int)’:
RcppArmadillo.cpp:113:26: error: ‘omp_set_num_threads’ was not declared in this scope
omp_set_num_threads(n);
^
make: *** [RcppArmadillo.o] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/home/bosea/R/x86_64-pc-linux-gnu-library/4.3/RcppArmadillo’
Warning in install.packages :
installation of package ‘RcppArmadillo’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpcwgPaE/downloaded_packages’
Would you have any ideas on what my issue might be? I greatly appreciate your feedback!
from rcpparmadillo.
Thank you! I'm not a native software person so this is very helpful :)
from rcpparmadillo.
Related Issues (20)
- Armadillo 12.0.0 regressions HOT 2
- `RCPP_ARMADILLO_RETURN_ANYVEC_AS_VECTOR` in an R package? HOT 2
- using namespace arma; HOT 1
- Issue on call by reference with a NA matrix HOT 1
- Update indMatrix->arma::SpMat and pMatrix->arma::SpMat for Matrix 1.5-5 HOT 2
- install issue HOT 3
- [DOCS] - Review DESCRIPTION's Date HOT 2
- Failed to install RcppArmadillo on Linux Hyper Cluster HOT 4
- compilation on fedora39 raise error: cannot run C++ compiled programs HOT 6
- Platform dependent output for sample()? HOT 9
- RcppArmadillo not available for R 4.3.2 + compilation errors HOT 14
- arma::randu incorrect output HOT 14
- Remove stale C++11 compilation standard setter in plugin HOT 1
- Rcpp required version might need updating? HOT 1
- Preparing for Armadillo 14.0.0 HOT 24
- OpenMP + macOS round 20? HOT 1
- Armadillo 14.0.0 std::cerr regression HOT 3
- CRAN errors with RcppArmadillo 14.0.0-1 and both 'R-oldrel-macOS' flavors HOT 21
- Template abstraction of arma::mat and arma::sp_mat HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcpparmadillo.