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 failure due to rapidjson #78

Open
e-kwsm opened this issue Jul 24, 2024 · 0 comments
Open

installation failure due to rapidjson #78

e-kwsm opened this issue Jul 24, 2024 · 0 comments

Comments

@e-kwsm
Copy link

e-kwsm commented Jul 24, 2024

See Tencent/rapidjson#719

$ python3.12 -m venv venv
$ . ./venv/bin/activate
$ pip install pyrfr
Collecting pyrfr
  Using cached pyrfr-0.9.0.tar.gz (295 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: pyrfr
  Building wheel for pyrfr (pyproject.toml): started
  Building wheel for pyrfr (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pyrfr (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [81 lines of output]
      Deprecated command line option: -modern. Ignored, this option is now always on.
      Deprecated command line option: -py3. Ignored, this option is no longer supported.
      ./include/rfr/nodes/k_ary_node.hpp:253: Warning 401: Nothing known about base class 'k_ary_node_minimal< 2,rfr::splits::binary_split_one_feature_rss_loss< double,double,unsigned int,std::default_random_engine,128 >,double,double,unsigned int,std::default_random_engine >'. Ignored.
      ./include/rfr/nodes/k_ary_node.hpp:253: Warning 401: Maybe you forgot to instantiate 'k_ary_node_minimal< 2,rfr::splits::binary_split_one_feature_rss_loss< double,double,unsigned int,std::default_random_engine,128 >,double,double,unsigned int,std::default_random_engine >' using %template.
      In file included from ./include/cereal/archives/json.hpp:56,
                       from ./include/rfr/forests/regression_forest.hpp:21,
                       from ./include/rfr/trees/k_ary_tree.hpp:26,
                       from pyrfr/regression_wrap.cpp:3367:
      ./include/cereal/external/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
      ./include/cereal/external/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
        319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
            |                                                                           ~~~~~~~^~~~~~~~~~~~
      In file included from ./include/rfr/trees/k_ary_tree.hpp:22:
      ./include/rfr/nodes/k_ary_node.hpp: In instantiation of ‘void rfr::nodes::k_ary_node_minimal<k, split_type, num_t, response_t, index_t, rng_t>::print_info() const [with int k = 2; split_type = rfr::splits::binary_split_one_feature_rss_loss<double, double, unsigned int, std::linear_congruential_engine<long unsigned int, 16807, 0, 2147483647>, 128>; num_t = double; response_t = double; index_t = unsigned int; rng_t = std::linear_congruential_engine<long unsigned int, 16807, 0, 2147483647>]’:
      ./include/rfr/nodes/k_ary_node.hpp:307:20:   required from ‘void rfr::nodes::k_ary_node_full<k, split_type, num_t, response_t, index_t, rng_t>::print_info() const [with int k = 2; split_type = rfr::splits::binary_split_one_feature_rss_loss<double, double, unsigned int, std::linear_congruential_engine<long unsigned int, 16807, 0, 2147483647>, 128>; num_t = double; response_t = double; index_t = unsigned int; rng_t = std::linear_congruential_engine<long unsigned int, 16807, 0, 2147483647>]’
        307 |                 super::print_info();
            |                 ~~~~~~~~~~~~~~~~~^~
      pyrfr/regression_wrap.cpp:22434:183:   required from here
      22434 |       ((rfr::nodes::k_ary_node_full< 2,rfr::splits::binary_split_one_feature_rss_loss< num_t,response_t,index_t,rng_t,128 >,num_t,response_t,index_t,rng_t > const *)arg1)->print_info();
            |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      ./include/rfr/nodes/k_ary_node.hpp:209:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
        209 |             for (auto i=0; i<data_indices.size(); i++)
            |                            ~^~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h: In instantiation of ‘void rapidjson::GenericValue<Encoding, Allocator>::SetObjectRaw(Member*, rapidjson::SizeType, Allocator&) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; Member = rapidjson::GenericMember<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> >; rapidjson::SizeType = unsigned int]’:
      ./include/cereal/external/rapidjson/document.h:2363:55:   required from ‘bool rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::EndObject(rapidjson::SizeType) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator; rapidjson::SizeType = unsigned int]’
       2363 |         stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount, GetAllocator());
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/reader.h:1736:40:   required from ‘rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::IterativeParsingState rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Transit(IterativeParsingState, Token, IterativeParsingState, InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
       1736 |             bool hr = handler.EndObject(c);
            |                       ~~~~~~~~~~~~~~~~~^~~
      ./include/cereal/external/rapidjson/reader.h:1832:58:   required from ‘rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::IterativeParse(InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
       1832 |             IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);
            |                                       ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/reader.h:487:46:   required from ‘rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
        487 |             return IterativeParse<parseFlags>(is, handler);
            |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:2159:57:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseStream(InputStream&) [with unsigned int parseFlags = 272; SourceEncoding = rapidjson::UTF8<>; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator]’
       2159 |         parseResult_ = reader.template Parse<parseFlags>(is, *this);
            |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:2185:70:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseStream(InputStream&) [with InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator]’
       2185 |         return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
            |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      ./include/cereal/archives/json.hpp:427:34:   required from here
        427 |         itsDocument.ParseStream<>(itsReadStream);
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:1952:24: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘rapidjson::GenericValue<rapidjson::UTF8<> >::Member’ {aka ‘struct rapidjson::GenericMember<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> >’} with no trivial copy-assignment; use copy-assignment instead [-Wclass-memaccess]
       1952 |             std::memcpy(m, members, count * sizeof(Member));
            |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:71:8: note: ‘rapidjson::GenericValue<rapidjson::UTF8<> >::Member’ {aka ‘struct rapidjson::GenericMember<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> >’} declared here
         71 | struct GenericMember {
            |        ^~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h: In instantiation of ‘void rapidjson::GenericValue<Encoding, Allocator>::SetArrayRaw(rapidjson::GenericValue<Encoding, Allocator>*, rapidjson::SizeType, Allocator&) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; rapidjson::SizeType = unsigned int]’:
      ./include/cereal/external/rapidjson/document.h:2371:54:   required from ‘bool rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::EndArray(rapidjson::SizeType) [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator; rapidjson::SizeType = unsigned int]’
       2371 |         stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount, GetAllocator());
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/reader.h:1766:39:   required from ‘rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::IterativeParsingState rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Transit(IterativeParsingState, Token, IterativeParsingState, InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
       1766 |             bool hr = handler.EndArray(c);
            |                       ~~~~~~~~~~~~~~~~^~~
      ./include/cereal/external/rapidjson/reader.h:1832:58:   required from ‘rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::IterativeParse(InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
       1832 |             IterativeParsingState d = Transit<parseFlags>(state, t, n, is, handler);
            |                                       ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/reader.h:487:46:   required from ‘rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with unsigned int parseFlags = 272; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Handler = rapidjson::GenericDocument<rapidjson::UTF8<> >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]’
        487 |             return IterativeParse<parseFlags>(is, handler);
            |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:2159:57:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseStream(InputStream&) [with unsigned int parseFlags = 272; SourceEncoding = rapidjson::UTF8<>; InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator]’
       2159 |         parseResult_ = reader.template Parse<parseFlags>(is, *this);
            |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:2185:70:   required from ‘rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>& rapidjson::GenericDocument<Encoding, Allocator, StackAllocator>::ParseStream(InputStream&) [with InputStream = rapidjson::BasicIStreamWrapper<std::basic_istream<char> >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; StackAllocator = rapidjson::CrtAllocator]’
       2185 |         return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
            |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      ./include/cereal/archives/json.hpp:427:34:   required from here
        427 |         itsDocument.ParseStream<>(itsReadStream);
            |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:1939:24: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class rapidjson::GenericValue<rapidjson::UTF8<> >’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
       1939 |             std::memcpy(e, values, count * sizeof(GenericValue));
            |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/cereal/external/rapidjson/document.h:540:7: note: ‘class rapidjson::GenericValue<rapidjson::UTF8<> >’ declared here
        540 | class GenericValue {
            |       ^~~~~~~~~~~~
      [<setuptools.extension.Extension('pyrfr._regression') at 0x7b22e22e3410>, <setuptools.extension.Extension('pyrfr._util') at 0x7b22e22e33b0>]
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyrfr
Failed to build pyrfr
ERROR: Could not build wheels for pyrfr, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 24.0 -> 24.1.2
[notice] To update, run: pip install --upgrade pip
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

1 participant