facebook / facebook/folly

Met protected error when compiling heap_vector_types.h

Open
#1,848 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

gcc toolchain: 8.3.0
debian 10 with only build-essential, cmake and libssl-dev installed.

I don't install full dependency because I want `getdep` to do this. So just run `./build.sh` and got this.

```shell
/data00/home/lxt/folly/folly/container/test/heap_vector_types_test.cpp:1644:29: required from here
/data00/home/lxt/folly/folly/container/heap_vector_types.h:737:28: error: ‘__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > > folly::detail::heap_vector_detail::heap_vector_container, std::less<{anonymous}::CountCopyCtor>, std::allocator >, void, std::vector, std::allocator > >, {anonymous}::CountCopyCtor, folly::detail::heap_vector_detail::value_compare_map, std::pair<{anonymous}::CountCopyCtor, int> > >::heap_iterator<__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > > >::ptr_’ is protected within this context
: ptr_(rawIterator.ptr_), cont_(rawIterator.cont_) {}
~~~~~~~~~~~~^~~~
/data00/home/lxt/folly/folly/container/heap_vector_types.h:846:10: note: declared protected here
Iter ptr_;
^~~~
/data00/home/lxt/folly/folly/container/heap_vector_types.h:737:53: error: ‘std::vector, std::allocator > >* folly::detail::heap_vector_detail::heap_vector_container, std::less<{anonymous}::CountCopyCtor>, std::allocator >, void, std::vector, std::allocator > >, {anonymous}::CountCopyCtor, folly::detail::heap_vector_detail::value_compare_map, std::pair<{anonymous}::CountCopyCtor, int> > >::heap_iterator<__gnu_cxx::__normal_iterator*, std::vector, std::allocator > > > >::cont_’ is protected within this context
: ptr_(rawIterator.ptr_), cont_(rawIterator.cont_) {}
~~~~~~~~~~~~^~~~~
/data00/home/lxt/folly/folly/container/heap_vector_types.h:847:16: note: declared protected here
Container* cont_;
^~~~~
[469/893] Building CXX object CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o
ninja: build stopped: subcommand failed.
Command '['/tmp/fbcode_builder_getdeps-Zdata00ZhomeZlxtZfollyZbuildZfbcode_builder/installed/cmake-FyWjws7tVR6u-ePlEfGJUuh7WukY4PQKE7brm_7dptc/bin/cmake', '--build', '/tmp/fbcode_builder_getdeps-Zdata00ZhomeZlxtZfollyZbuildZfbcode_builder/build/folly', '--target', 'install', '--config', 'Release', '-j', '8']' returned non-zero exit status 1.
!! Failed
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with ./build.sh on the reported GCC 8.3.0 and Debian 10 setup. Inspect folly/container/heap_vector_types.h around line 737 and folly/container/test/heap_vector_types_test.cpp around line 1644; done means the heap_vector_types tests and the full build complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.