Installation fails with rice 4.1.0
mdesantis opened this issue · 1 comments
mdesantis commented
Hello! This is what happens attempting to install outliertree
while rice 4.1.0
is installed:
> gem ins outliertree
Building native extensions. This could take a while...
ERROR: Error installing outliertree:
ERROR: Failed to build gem native extension.
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
/ruby/3.2.2/bin/ruby extconf.rb
checking for rice/rice.hpp in /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include... yes
checking for -lstdc++... yes
checking for -lomp... no
checking for -lgomp... yes
creating Makefile
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-669769-u8ua29 sitelibdir\=./.gem.20231219-669769-u8ua29 clean
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-669769-u8ua29 sitelibdir\=./.gem.20231219-669769-u8ua29
compiling ext.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/cat_outlier.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/clusters.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/fit_model.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/misc.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/predict.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/split.cpp
In file included from /ruby/3.2.2/include/ruby-3.2.0/ruby/internal/config.h:22,
from /ruby/3.2.2/include/ruby-3.2.0/ruby/ruby.h:15,
from /ruby/3.2.2/include/ruby-3.2.0/ruby.h:38,
from /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:15,
from ext.cpp:5:
/ruby/3.2.2/include/ruby-3.2.0/x86_64-linux/ruby/config.h:82: warning: "restrict" redefined
82 | #define restrict __restrict__
|
In file included from ext.cpp:2:
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/outlier_tree.hpp:83: note: this is the location of the previous definition
83 | #define restrict __restrict
|
In file included from ext.cpp:5:
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp: In instantiation of ‘class Rice::detail::From_Ruby<signed char&>’:
/usr/include/c++/11/tuple:69:28: required from ‘struct std::_Tuple_impl<0, Rice::detail::From_Ruby<signed char&> >’
/usr/include/c++/11/tuple:609:11: required from ‘class std::tuple<Rice::detail::From_Ruby<signed char&> >’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:4066:23: required from ‘class Rice::detail::NativeFunction<std::vector<signed char>, Rice::stl::VectorHelper<std::vector<signed char> >::define_comparable_methods()::<lambda(std::vector<signed char>&, Rice::stl::VectorHelper<std::vector<signed char> >::Value_T&)>, true>’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:7851:60: required from ‘void Rice::Data_Type<T>::wrap_native_call(VALUE, std::string, Function_T&&, Rice::MethodInfo*) [with bool IsMethod = true; Function_T = Rice::stl::VectorHelper<std::vector<signed char> >::define_comparable_methods()::<lambda(std::vector<signed char>&, Rice::stl::VectorHelper<std::vector<signed char> >::Value_T&)>; T = std::vector<signed char>; VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:7418:31: required from ‘auto& Rice::Data_Type<T>::define_method(std::string, Function_T&&, const Arg_Ts& ...) [with Function_T = Rice::stl::VectorHelper<std::vector<signed char> >::define_comparable_methods()::<lambda(std::vector<signed char>&, Rice::stl::VectorHelper<std::vector<signed char> >::Value_T&)>; Arg_Ts = {}; T = std::vector<signed char>; std::string = std::__cxx11::basic_string<char>]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/stl.hpp:2057:31: [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/stl.hpp:2256:34: required from ‘Rice::Data_Type<T> Rice::define_vector_auto() [with T = std::vector<signed char>]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/stl.hpp:2270:45: required from ‘static bool Rice::detail::Type<std::vector<T> >::verify() [with T = signed char]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:686:36: required from ‘void Rice::detail::verifyType() [with T = std::vector<signed char>]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:7847:50: required from ‘void Rice::Data_Type<T>::wrap_native_call(VALUE, std::string, Function_T&&, Rice::MethodInfo*) [with bool IsMethod = true; Function_T = Init_ext()::<lambda(Cluster&)>; T = Cluster; VALUE = long unsigned int; std::string = std::__cxx11::basic_string<char>]’
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:7418:31: required from ‘auto& Rice::Data_Type<T>::define_method(std::string, Function_T&&, const Arg_Ts& ...) [with Function_T = Init_ext()::<lambda(Cluster&)>; Arg_Ts = {}; T = Cluster; std::string = std::__cxx11::basic_string<char>]’
ext.cpp:106:19: required from here
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:8237:19: error: static assertion failed: Data_Object cannot be used with fundamental types
8237 | static_assert(!std::is_fundamental_v<intrinsic_type<T>>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include/rice/rice.hpp:8237:19: note: ‘!(bool)std::is_fundamental_v<signed char>’ evaluates to false
make: *** [Makefile:239: ext.o] Errore 1
make failed, exit code 2
Gem files will remain installed in /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0 for inspection.
Results logged to /ruby/3.2.2/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/outliertree-0.3.0/gem_make.out
No problems with rice 4.0.2 instead:
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
/ruby/3.2.2/bin/ruby extconf.rb
checking for rice/rice.hpp in /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.0.2/include... yes
checking for -lstdc++... yes
checking for -lomp... no
checking for -lgomp... yes
creating Makefile
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-767170-bn51j1 sitelibdir\=./.gem.20231219-767170-bn51j1 clean
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-767170-bn51j1 sitelibdir\=./.gem.20231219-767170-bn51j1
compiling ext.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/cat_outlier.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/clusters.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/fit_model.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/misc.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/predict.cpp
compiling /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/split.cpp
In file included from /ruby/3.2.2/include/ruby-3.2.0/ruby/internal/config.h:22,
from /ruby/3.2.2/include/ruby-3.2.0/ruby/ruby.h:15,
from /ruby/3.2.2/include/ruby-3.2.0/ruby.h:38,
from /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.0.2/include/rice/rice.hpp:14,
from ext.cpp:5:
/ruby/3.2.2/include/ruby-3.2.0/x86_64-linux/ruby/config.h:82: warning: "restrict" redefined
82 | #define restrict __restrict__
|
In file included from ext.cpp:2:
/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/vendor/outliertree/src/outlier_tree.hpp:83: note: this is the location of the previous definition
83 | #define restrict __restrict
|
linking shared-object outliertree/ext.so
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-767170-bn51j1 sitelibdir\=./.gem.20231219-767170-bn51j1 install
/usr/bin/install -c -m 0755 ext.so ./.gem.20231219-767170-bn51j1/outliertree
current directory: /ruby/3.2.2/lib/ruby/gems/3.2.0/gems/outliertree-0.3.0/ext/outliertree
make DESTDIR\= sitearchdir\=./.gem.20231219-767170-bn51j1 sitelibdir\=./.gem.20231219-767170-bn51j1 clean
OS: Linux Ubuntu 22.04.3
Ruby version: 3.2.2
rice version: 4.1.0
outliertree version: 0.3.0
mdesantis commented
Sorry! This issue was meant for outliertree
. Closing.