Skip to content
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

INSTALLATION: Requires gcc (> 4.8.5) - compiles with gcc 5.3.1 (useful for RHEL/CentOS users) #13

Closed
HenrikBengtsson opened this issue Feb 15, 2020 · 6 comments

Comments

@HenrikBengtsson
Copy link

Just wanna mention that RcppAlgos requires something newer than gcc 4.8.5 (see error below), which is the default on the RHEL/CentOS 7 distro. I've confirmed that gcc 5.3.1 is sufficient.

Maybe you could add a note on this in the DESCRIPTION file? It'll help people on RHEL/CentOS.

With

RedHat/CentOS users: If you're on RHEL/CentOS and have CentOS Software Collections (SCL) installed - check with scl --list, you can compile RcppAlgos using one of them. This is what I did on an up-to-date CentOS 7 distro:

## Too old
$ gcc --version | head -1
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

## Use a less old gcc version
$ scl enable devtoolset-4
$ gcc --version | head
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)

## Now we can compile RcppAlgos
$ Rscript -e "install.packages('RcppAlgos')"
* installing *source* package ‘RcppAlgos’ ...
** package ‘RcppAlgos’ successfully unpacked and MD5 sums checked
** using staged installation
...
** testing if installed package keeps a record of temporary installation path
* DONE (RcppAlgos)

## Done; disable the SCL again
$ exit

## Back too old setup, ...
$ gcc --version | head -1
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

## ... but it doesn't matter when it comes using RcppAlgos
$ Rscript -e "packageVersion('RcppAlgos')" -e "loadNamespace('RcppAlgos')"
[1] ‘2.3.6’
<environment: namespace:RcppAlgos>

The error you get with gcc 4.8.5 is:

* installing *source* package ‘RcppAlgos’ ...
** package ‘RcppAlgos’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/wynton/home/cbi/shared/software/CBI/R-3.6.2/lib64/R/include" -DNDEBUG -I../inst/include/ -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include" -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include" -I/usr/local/include  -fpic  -g -O2  -c BigNumCount.cpp -o BigNumCount.o
g++ -std=gnu++11 -I"/wynton/home/cbi/shared/software/CBI/R-3.6.2/lib64/R/include" -DNDEBUG -I../inst/include/ -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include" -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include" -I/usr/local/include  -fpic  -g -O2  -c CheckReturn.cpp -o CheckReturn.o
g++ -std=gnu++11 -I"/wynton/home/cbi/shared/software/CBI/R-3.6.2/lib64/R/include" -DNDEBUG -I../inst/include/ -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include" -I"/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include" -I/usr/local/include  -fpic  -g -O2  -c CombPermMaster.cpp -o CombPermMaster.o
In file included from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread.h:11:0,
                 from ../inst/include/Permutations.h:7,
                 from ../inst/include/CombPermPtr.h:5,
                 from CombPermMaster.cpp:2:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/Thread.hpp: In lambda function:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/Thread.hpp:42:19: error: parameter packs not expanded with ‘...’:
                 f(args...);
                   ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/Thread.hpp:42:19: note:         ‘args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/Thread.hpp:42:23: error: expansion pattern ‘args’ contains no argument packs
                 f(args...);
                       ^
In file included from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread.h:13:0,
                 from ../inst/include/Permutations.h:7,
                 from ../inst/include/CombPermPtr.h:5,
                 from CombPermMaster.cpp:2:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In member function ‘void RcppThread::ThreadPool::push(F&&, Args&& ...)’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:31: error: expected ‘,’ before ‘...’ token
         jobs_.emplace([f, args...] { f(args...); });
                               ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:31: error: expected identifier before ‘...’ token
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: error: parameter packs not expanded with ‘...’:
         jobs_.emplace([f, args...] { f(args...); });
                                  ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: note:         ‘args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:44: error: expansion pattern ‘args’ contains no argument packs
         jobs_.emplace([f, args...] { f(args...); });
                                            ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In member function ‘std::future RcppThread::ThreadPool::pushReturn(F&&, Args&& ...)’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected ‘,’ before ‘...’ token
     auto job = std::make_shared([&f, args...] {
                                                      ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected identifier before ‘...’ token
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: error: parameter packs not expanded with ‘...’:
     auto job = std::make_shared([&f, args...] {
                                                         ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: note:         ‘args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:145:22: error: expansion pattern ‘args’ contains no argument packs
         return f(args...);
                      ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::referenc\
e_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::referenc\
e_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]’
CombPermMaster.cpp:46:17:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<10>; T = int; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:145:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
         jobs_.emplace([f, args...] { f(args...); });
                           ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::re\
ference_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::re\
ference_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]’
CombPermMaster.cpp:46:17:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<14>; T = double; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:158:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]’
../inst/include/Permutations.h:135:13:   required from ‘void PermuteParallel(typeMatrix&, typeVector, std::vector, int, int, int, int, int, bool) [with typeMatrix = RcppParallel::RMatrix; typeVector = std::vector]’
CombPermMaster.cpp:58:81:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<10>; T = int; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:145:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:31: error: expected identifier before ‘...’ token
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: error: parameter packs not expanded with ‘...’:
         jobs_.emplace([f, args...] { f(args...); });
                                  ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:34: note:         ‘args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:44: error: expansion pattern ‘args’ contains no argument packs
         jobs_.emplace([f, args...] { f(args...); });
                                            ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In member function ‘std::future RcppThread::ThreadPool::pushReturn(F&&, Args&& ...)’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected ‘,’ before ‘...’ token
     auto job = std::make_shared([&f, args...] {
                                                      ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:54: error: expected identifier before ‘...’ token
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: error: parameter packs not expanded with ‘...’:
     auto job = std::make_shared([&f, args...] {
                                                         ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:144:57: note:         ‘args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In lambda function:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:145:22: error: expansion pattern ‘args’ contains no argument packs
         return f(args...);
                      ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::referenc\
e_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::referenc\
e_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]’
CombPermMaster.cpp:46:17:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<10>; T = int; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:145:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
         jobs_.emplace([f, args...] { f(args...); });
                           ^
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::re\
ference_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const std::vector&, std::vector, int, int, int, int, const std::vector&)>; Args = {std::re\
ference_wrapper >, std::reference_wrapper > >, std::vector >&, int&, int&, int&, int&, std::reference_wrapper > >}]’
CombPermMaster.cpp:46:17:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<14>; T = double; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:158:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]’
../inst/include/Permutations.h:135:13:   required from ‘void PermuteParallel(typeMatrix&, typeVector, std::vector, int, int, int, int, int, bool) [with typeMatrix = RcppParallel::RMatrix; typeVector = std::vector]’
CombPermMaster.cpp:58:81:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<10>; T = int; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:145:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘struct RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]::__lambda5’:
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:9:   required from ‘void RcppThread::ThreadPool::push(F&&, Args&& ...) [with F = std::reference_wrapper&, const int*, std::vector, int, int, int, int, int, int, bool)>; Args = {std::reference_wrapper >, int*, std::vector >&, int&, int&, int&, int&, const int&, int&, bool&}]’
../inst/include/Permutations.h:135:13:   required from ‘void PermuteParallel(typeMatrix&, typeVector, std::vector, int, int, int, int, int, bool) [with typeMatrix = RcppParallel::RMatrix; typeVector = std::vector]’
CombPermMaster.cpp:58:81:   required from ‘void MasterReturn(typeRcpp&, std::vector, int, int, bool, bool, bool, bool, bool, const std::vector&, std::vector, const std::vector&, double, __mpz_struct (&)[1], int, int, bool, int) [with typeRcpp = Rcpp::Matrix<14>; T = double; mpz_t = __mpz_struct [1]]’
CombPermMaster.cpp:158:70:   required from here
/wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppThread/include/RcppThread/ThreadPool.hpp:127:27: error: using invalid field ‘RcppThread::ThreadPool::push(F&&, Args&& ...)::__lambda5::__args’
make: *** [CombPermMaster.o] Error 1
ERROR: compilation failed for package ‘RcppAlgos’
@jwood000
Copy link
Owner

Hello @HenrikBengtsson,

Thanks for reporting this. I will add this to the DESCRIPTION file in the next release.

Joseph

@HenrikBengtsson
Copy link
Author

+1 feel free to close when ever you like

@jwood000
Copy link
Owner

Hello @HenrikBengtsson,

I want to make sure I do this right, so I scoured all 15000+ packages on CRAN with the rvest package and only found two occurences requiring a minimum gcc compiler. They are:

I wanted to get your opinion on what the best approach is. With the VARsignR package, they have gcc (>= 4.0) under SystemRequirements and the TexExamRandomizer has ..., A modern compiler (>=gcc-4.9), ... under SystemRequirements. I was thinking about a hybrid like:

  • SystemRequirements: C++11, gmp (>= 4.2.3), A modern compiler (e.g. gcc (>= 4.9))

Thanks,
Joseph

@HenrikBengtsson
Copy link
Author

Wow, that's an impressive scan. I don't know what's best - you might want to reach out on the r-pkg-devel mailing list - but using "A modern compiler (e.g. gcc (>= 4.9))" looks like a good template. It avoids suggesting that one has to use gcc.

The only thing that complicates how to phrase it is the fact that we don't know the lower version limit, only that gcc 4.8.5 is not enough an gcc 5.3.1 works. Using gcc (>= 4.9) may convey that gcc 4.9.0 is sufficient and then someone with that version might pull their hair to figure out why it doesn't work for them. Maybe: A modern compiler (gcc 4.8.5 is too old; gcc 5.3.1 is sufficient).

If it gets too wordy, one could add an INSTALL.md with free-text comments/notes.

@jwood000
Copy link
Owner

@HenrikBengtsson, I really appreciate your feedback.

I forgot to mention the additional research I did that led me to saying at least gcc version 4.9.

First off, I went straight to Writing R Extensions and didn't find anything promising. I then found a couple of post that talked about version 4.8 in regards to C++11 compatibility. Here is a good one with a very simple reproducible example that backs up the claim that 4.8.x isn't C++11 complete: Is GCC 4.8.1 C++11 complete?. This site has some interesting information as well: https://gcc.gnu.org/projects/cxx-status.html.

Anywho, I will definitely reach out to the r-pkg-devel mailing list. In the meantime I will leave this open.

Again, thanks for your help!

@jwood000
Copy link
Owner

@HenrikBengtsson,

I took your advice and added an INSTALL.md file with the relevant information.

Thanks again for your help.

Joseph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants