Giter VIP home page Giter VIP logo

Comments (10)

eddelbuettel avatar eddelbuettel commented on August 20, 2024 1

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.

coatless avatar coatless commented on August 20, 2024 1

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.

eddelbuettel avatar eddelbuettel commented on August 20, 2024 1

... and also keep in mind what I told you yesterday about OpenMP.

The package builds fine on standard systems.

from rcpparmadillo.

eddelbuettel avatar eddelbuettel commented on August 20, 2024 1

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.

conradsnicta avatar conradsnicta commented on August 20, 2024 1

@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.

eddelbuettel avatar eddelbuettel commented on August 20, 2024

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:

image

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.

eddelbuettel avatar eddelbuettel commented on August 20, 2024

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.

adi-bose avatar adi-bose commented on August 20, 2024

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.

adi-bose avatar adi-bose commented on August 20, 2024

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.

adi-bose avatar adi-bose commented on August 20, 2024

Thank you! I'm not a native software person so this is very helpful :)

from rcpparmadillo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.