-
Notifications
You must be signed in to change notification settings - Fork 255
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
Error installing BoomSpikeSlab #61
Comments
The compiler error says that std::iterator_traits is being specialized in
the wrong namespace. It looks like your C++ toolchain calls that an error,
while other toolchains on CRAN and my own setup don't make an issue of it.
I'll make a note of this for the next release of Boom, etc. If you don't
want to wait that long, go find .../LinAlg/ArrayIterator.hpp and at the
bottom of that file replace the following lines...
template <> struct std::iterator_traits<BOOM::ArrayIterator> {
using iterator_category = std::forward_iterator_tag;
// using difference_type = std::ptrdiff_t;
using difference_type = void;
using value_type = double;
using pointer = double*;
using reference = double&;
};
template<> struct std::iterator_traits<BOOM::ConstArrayIterator> {
using iterator_category = std::forward_iterator_tag;
// using difference_type = std::ptrdiff_t;
using difference_type = void;
using value_type = double;
using pointer = double*;
using reference = double&;
};
with
namespace std {
template <> struct iterator_traits<BOOM::ArrayIterator> {
using iterator_category = std::forward_iterator_tag;
// using difference_type = std::ptrdiff_t;
using difference_type = void;
using value_type = double;
using pointer = double*;
using reference = double&;
};
template<> struct iterator_traits<BOOM::ConstArrayIterator> {
using iterator_category = std::forward_iterator_tag;
// using difference_type = std::ptrdiff_t;
using difference_type = void;
using value_type = double;
using pointer = double*;
using reference = double&;
};
} // namespace std
You might need to make a similar replacement for other iterators. Notably
VectorViewIterator.
…On Thu, Jul 7, 2022 at 10:07 AM akshat3492 ***@***.***> wrote:
Hi Everyone,
I am trying to install bsts package for that I need to install its
dependencies Boom and BoomSpikeSlab. I was successfully able to install
Boom after trying Mac Binaries from its CRAN page but I am not able to
install BoomSpikeSlab. I am having Linus-gnu operating system and working
on Rstudio.
Below is the error that I am getting......
Installing package into ‘/libs/workspace’
(as ‘lib’ is unspecified)
trying URL '
https://cloud.r-project.org/src/contrib/BoomSpikeSlab_1.2.5.tar.gz'
Content type 'application/x-gzip' length 129209 bytes (126 KB)
downloaded 126 KB
- installing *source* package ‘BoomSpikeSlab’ ...
** package ‘BoomSpikeSlab’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I/opt/R/3.6.1/lib/R/bin/Rscript
-e "cat(system.file(package='Boom'))"/include -DADD_ -DR_NO_REMAP
-DRLANGUAGE -I"/libs/workspace/Boom/include" -I/usr/local/include -fpic -g
-O2 -c boom_spike_slab_init.cc -o boom_spike_slab_init.o
g++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I/opt/R/3.6.1/lib/R/bin/Rscript
-e "cat(system.file(package='Boom'))"/include -DADD_ -DR_NO_REMAP
-DRLANGUAGE -I"/libs/workspace/Boom/include" -I/usr/local/include -fpic -g
-O2 -c logit_spike_slab_wrapper.cc -o logit_spike_slab_wrapper.o
In file included from
/libs/workspace/Boom/include/LinAlg/VectorView.hpp:28:0,
from /libs/workspace/Boom/include/LinAlg/Matrix.hpp:24,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:25,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/VectorViewIterator.hpp:183:24:
error: specialization of ‘template struct std::iterator_traits’ in
different namespace [-fpermissive]
template<> struct std::iterator_traitsBOOM::VectorViewIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error:
from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from
/libs/workspace/Boom/include/LinAlg/VectorView.hpp:28:0,
from /libs/workspace/Boom/include/LinAlg/Matrix.hpp:24,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:25,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/VectorViewIterator.hpp:191:25:
error: specialization of ‘template struct std::iterator_traits’ in
different namespace [-fpermissive]
template <> struct std::iterator_traitsBOOM::VectorViewConstIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error:
from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from
/libs/workspace/Boom/include/LinAlg/Array.hpp:23:0,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:28,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/ArrayIterator.hpp:135:25: error:
specialization of ‘template struct std::iterator_traits’ in different
namespace [-fpermissive]
template <> struct std::iterator_traitsBOOM::ArrayIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error:
from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from
/libs/workspace/Boom/include/LinAlg/Array.hpp:23:0,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:28,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/ArrayIterator.hpp:144:24: error:
specialization of ‘template struct std::iterator_traits’ in different
namespace [-fpermissive]
template<> struct std::iterator_traitsBOOM::ConstArrayIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error:
from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
make: *** [logit_spike_slab_wrapper.o] Error 1
ERROR: compilation failed for package ‘BoomSpikeSlab’
- removing ‘/libs/workspace/BoomSpikeSlab’
Warning in install.packages :
installation of package ‘BoomSpikeSlab’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmprDP2RP/downloaded_packages’
Could any one please help me out how to install BoomSpikeSlab on R-Studio?
—
Reply to this email directly, view it on GitHub
<#61>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMVDVJQOGPUY7DACLBCZL3VS4FFTANCNFSM526EKJ5A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Everyone,
I am trying to install bsts package for that I need to install its dependencies Boom and BoomSpikeSlab. I was successfully able to install Boom after trying Mac Binaries from its CRAN page but I am not able to install BoomSpikeSlab. I am having Linus-gnu operating system and working on Rstudio.
Below is the error that I am getting......
Installing package into ‘/libs/workspace’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/BoomSpikeSlab_1.2.5.tar.gz'
Content type 'application/x-gzip' length 129209 bytes (126 KB)
downloaded 126 KB
** package ‘BoomSpikeSlab’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I
/opt/R/3.6.1/lib/R/bin/Rscript -e "cat(system.file(package='Boom'))"
/include -DADD_ -DR_NO_REMAP -DRLANGUAGE -I"/libs/workspace/Boom/include" -I/usr/local/include -fpic -g -O2 -c boom_spike_slab_init.cc -o boom_spike_slab_init.og++ -std=gnu++11 -I"/opt/R/3.6.1/lib/R/include" -DNDEBUG -I
/opt/R/3.6.1/lib/R/bin/Rscript -e "cat(system.file(package='Boom'))"
/include -DADD_ -DR_NO_REMAP -DRLANGUAGE -I"/libs/workspace/Boom/include" -I/usr/local/include -fpic -g -O2 -c logit_spike_slab_wrapper.cc -o logit_spike_slab_wrapper.oIn file included from /libs/workspace/Boom/include/LinAlg/VectorView.hpp:28:0,
from /libs/workspace/Boom/include/LinAlg/Matrix.hpp:24,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:25,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/VectorViewIterator.hpp:183:24: error: specialization of ‘template struct std::iterator_traits’ in different namespace [-fpermissive]
template<> struct std::iterator_traitsBOOM::VectorViewIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error: from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from /libs/workspace/Boom/include/LinAlg/VectorView.hpp:28:0,
from /libs/workspace/Boom/include/LinAlg/Matrix.hpp:24,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:25,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/VectorViewIterator.hpp:191:25: error: specialization of ‘template struct std::iterator_traits’ in different namespace [-fpermissive]
template <> struct std::iterator_traitsBOOM::VectorViewConstIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error: from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from /libs/workspace/Boom/include/LinAlg/Array.hpp:23:0,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:28,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/ArrayIterator.hpp:135:25: error: specialization of ‘template struct std::iterator_traits’ in different namespace [-fpermissive]
template <> struct std::iterator_traitsBOOM::ArrayIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error: from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
In file included from /libs/workspace/Boom/include/LinAlg/Array.hpp:23:0,
from /libs/workspace/Boom/include/r_interface/boom_r_tools.hpp:28,
from /libs/workspace/Boom/include/r_interface/seed_rng_from_R.hpp:22,
from logit_spike_slab_wrapper.cc:10:
/libs/workspace/Boom/include/LinAlg/ArrayIterator.hpp:144:24: error: specialization of ‘template struct std::iterator_traits’ in different namespace [-fpermissive]
template<> struct std::iterator_traitsBOOM::ConstArrayIterator {
^
In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:65:0,
from /usr/include/c++/4.8.2/bits/char_traits.h:39,
from /usr/include/c++/4.8.2/string:40,
from logit_spike_slab_wrapper.cc:5:
/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h:159:12: error: from definition of ‘template struct std::iterator_traits’ [-fpermissive]
struct iterator_traits
^
make: *** [logit_spike_slab_wrapper.o] Error 1
ERROR: compilation failed for package ‘BoomSpikeSlab’
Warning in install.packages :
installation of package ‘BoomSpikeSlab’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmprDP2RP/downloaded_packages’
Could any one please help me out how to install BoomSpikeSlab on R-Studio?
The text was updated successfully, but these errors were encountered: