You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2021/07/05 18:35:11 UTC

[GitHub] [datasketches-cpp] bryanherger opened a new issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

bryanherger opened a new issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227


   I attempted to compile current master (as of 05 Jul 2021) on CentOS 7.9.2009 with CMake 3.17.5 and g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), but I get the following issue.  Is a minimum g++ version required?  v4.8.5 seems a bit dated relative to my OS release.
   
   [ 66%] Building CXX object theta/test/CMakeFiles/theta_test.dir/theta_a_not_b_test.cpp.o
   In file included from /usr/include/c++/4.8.2/bits/stl_algobase.h:67:0,
                    from /usr/include/c++/4.8.2/bits/char_traits.h:39,
                    from /usr/include/c++/4.8.2/string:40,
                    from /home/bryan/github/datasketches-cpp/common/test/catch.hpp:468,
                    from /home/bryan/github/datasketches-cpp/theta/test/theta_a_not_b_test.cpp:20:
   /usr/include/c++/4.8.2/bits/stl_iterator.h: In instantiation of ‘std::move_iterator<_Iterator>::value_type&& std::move_iterator<_Iterator>::operator*() const [with _Iterator = const long unsigned int*; std::move_iterator<_Iterator>::reference = long unsigned int&&; std::move_iterator<_Iterator>::value_type = long unsigned int]’:
   /usr/include/c++/4.8.2/bits/stl_algo.h:962:13:   required from ‘_OIter std::copy_if(_IIter, _IIter, _OIter, _Predicate) [with _IIter = std::move_iterator<const long unsigned int*>; _OIter = std::back_insert_iterator<std::vector<long unsigned int, std::allocator<long unsigned int> > >; _Predicate = datasketches::key_less_than<long unsigned int, long unsigned int, datasketches::trivial_extract_key>]’
   /home/bryan/github/datasketches-cpp/theta/include/theta_set_difference_base_impl.hpp:49:47:   required from ‘CS datasketches::theta_set_difference_base<Entry, ExtractKey, CompactSketch, Allocator>::compute(FwdSketch&&, const Sketch&, bool) const [with FwdSketch = const datasketches::wrapped_compact_theta_sketch_alloc<std::allocator<long unsigned int> >; Sketch = datasketches::wrapped_compact_theta_sketch_alloc<std::allocator<long unsigned int> >; Entry = long unsigned int; ExtractKey = datasketches::trivial_extract_key; CompactSketch = datasketches::compact_theta_sketch_alloc<std::allocator<long unsigned int> >; Allocator = std::allocator<long unsigned int>]’
   /home/bryan/github/datasketches-cpp/theta/include/theta_a_not_b_impl.hpp:37:63:   required from ‘datasketches::theta_a_not_b_alloc<Allocator>::CompactSketch datasketches::theta_a_not_b_alloc<Allocator>::compute(FwdSketch&&, const Sketch&, bool) const [with FwdSketch = const datasketches::wrapped_compact_theta_sketch_alloc<std::allocator<long unsigned int> >; Sketch = datasketches::wrapped_compact_theta_sketch_alloc<std::allocator<long unsigned int> >; Allocator = std::allocator<long unsigned int>; datasketches::theta_a_not_b_alloc<Allocator>::CompactSketch = datasketches::compact_theta_sketch_alloc<std::allocator<long unsigned int> >]’
   /home/bryan/github/datasketches-cpp/theta/test/theta_a_not_b_test.cpp:186:3:   required from here
   /usr/include/c++/4.8.2/bits/stl_iterator.h:963:37: error: invalid initialization of reference of type ‘std::move_iterator<const long unsigned int*>::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference<const long unsigned int&>::type {aka const long unsigned int}’
          { return std::move(*_M_current); }
                                        ^
   make[2]: *** [theta/test/CMakeFiles/theta_test.dir/theta_a_not_b_test.cpp.o] Error 1
   make[1]: *** [theta/test/CMakeFiles/theta_test.dir/all] Error 2
   make: *** [all] Error 2
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] bryanherger commented on issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
bryanherger commented on issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227#issuecomment-874680610


   I updated to devtools-7 with g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) but still get an error.  This would suggest it's somewhere else in my build environment - most likely libc/glibc since it's in an allocator, but would like to check or upgrade the full stack if needed.  Can you let me know what release/version of components are used for CI?  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] jmalkin commented on issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
jmalkin commented on issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227#issuecomment-874283167


   Thanks for reporting this, I don't think anyone has tried it on 4.8.5 for a while. And I don't recall seeing it as an option in github actions, so we can't get it into our CI build. Operating on the idea that "untested == broken" I guess we should have expected this!
   
   No ETA on this yet, but with luck we'll be able to look into it soon -- although there's a change the answer ends up being that we add a minimum gcc version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] AlexanderSaydakov commented on issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov commented on issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227#issuecomment-875110969


   It seems to me that the problem has to do with a recently introduced wrapped_compact_theta_sketch. I would think that if you are not using this particular class in your code, it should continue to compile and work. If you would like to compile all unit tests, I would suggest commenting out the offending test in theta_a_not_b_test.cpp lines 170-190 for now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] bryanherger edited a comment on issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
bryanherger edited a comment on issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227#issuecomment-874680610


   I updated to devtools-7 with g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) but still get an error.  This would suggest it's somewhere else in my build environment - most likely libc/glibc since it's in an allocator, but would like to check or upgrade the full stack if needed.  Can you let me know what release/version of components are used for CI?  
   
   EDIT: I deployed an AWS instance with latest Amazon Linux 2.0, installed build tools cmake3, gcc-c++, and git, and compiled without issue.  So it might be useful to know what the CI environment is also, but clearly it's a version issue on my side.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] jmalkin commented on issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
jmalkin commented on issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227#issuecomment-874283167


   Thanks for reporting this, I don't think anyone has tried it on 4.8.5 for a while. And I don't recall seeing it as an option in github actions, so we can't get it into our CI build. Operating on the idea that "untested == broken" I guess we should have expected this!
   
   No ETA on this yet, but with luck we'll be able to look into it soon -- although there's a change the answer ends up being that we add a minimum gcc version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] AlexanderSaydakov closed issue #227: Compile error: "error: invalid initialization of reference of type ‘std::move_iterator::reference {aka long unsigned int&&}’ from expression of type ‘std::remove_reference::type {aka const long unsigned int}’"

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov closed issue #227:
URL: https://github.com/apache/datasketches-cpp/issues/227


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org