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

build fails #14

Open
1f604 opened this issue Nov 26, 2021 · 3 comments
Open

build fails #14

1f604 opened this issue Nov 26, 2021 · 3 comments

Comments

@1f604
Copy link

1f604 commented Nov 26, 2021

-e \x1b[31;01m[release]\x1b[0m Link \x1b[35;01mrelease/bin/boost_po_v1\x1b[0m
-e \x1b[31;01m[release]\x1b[0m Compile \x1b[35;01msrc/vector_list/bench.cpp\x1b[0m
In file included from src/vector_list/bench.cpp:21:
include/policies.hpp:368:13: error: ‘plf’ was not declared in this scope
  368 | struct Sort<plf::colony<T> > {
      |             ^~~
include/policies.hpp:368:28: error: template argument 1 is invalid
  368 | struct Sort<plf::colony<T> > {
      |                            ^
make: *** [Makefile:31: release/src/vector_list/bench.cpp.o] Error 1

Also one of the benchmark files includes a "bench.hpp" file but I can't find that file anywhere.

Thanks.

@wichtounet
Copy link
Owner

Hi,

Can you try make vector_list_update_1, it seems like vector_list is missing an include indeed.
As for bench.hpp, it's in the include directory.

@ryao
Copy link

ryao commented Jan 13, 2024

make vector_list_update_1 builds, but make intrusive_list does not for me.

This patch makes make intrusive_list work for me:

diff --git a/include/policies.hpp b/include/policies.hpp
index 652927e..f2c8ee1 100644
--- a/include/policies.hpp
+++ b/include/policies.hpp
@@ -6,6 +6,7 @@
 //=======================================================================
 
 #include <boost/intrusive/list.hpp>
+#include "../plf_colony/plf_colony.h"
 
 // create policies

Unfortunately, g++ 12.3.1_p20230526 gives warnings:

$ make intrusive_list
[release] Compile src/intrusive_list/bench.cpp
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/allocator.h:46,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/string:41,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/random:40,
                 from src/intrusive_list/bench.cpp:8:
In member function ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Normal<1024>; _Args = {const Normal<1024>&}; _Tp = std::_List_node<Normal<1024> >]’,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = Normal<1024>; _Args = {const Normal<1024>&}; _Tp = std::_List_node<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/alloc_traits.h:516:17,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::_Node* std::__cxx11::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const Normal<1024>&}; _Tp = Normal<1024>; _Alloc = std::allocator<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:713:33,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_insert(iterator, _Args&& ...) [with _Args = {const Normal<1024>&}; _Tp = Normal<1024>; _Alloc = std::allocator<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:2005:32,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Normal<1024>; _Alloc = std::allocator<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1306:24,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_fill_initialize(size_type, const value_type&) [with _Tp = Normal<1024>; _Alloc = std::allocator<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1946:13,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::list(size_type, const value_type&, const allocator_type&) [with _Tp = Normal<1024>; _Alloc = std::allocator<Normal<1024> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:787:27,
    inlined from ‘static std::unique_ptr<Container> SmartFilled<Container>::make(std::size_t) [with Container = std::__cxx11::list<Normal<1024>, std::allocator<Normal<1024> > >]’ at include/policies.hpp:124:43,
    inlined from ‘void bench(const std::string&, const std::initializer_list<int>&) [with Container = std::__cxx11::list<Normal<1024>, std::allocator<Normal<1024> > >; DurationUnit = std::chrono::duration<long int, std::ratio<1, 1000000> >; CreatePolicy = SmartFilled; TestPolicy = {SmartDelete}]’ at include/bench.hpp:50:18,
    inlined from ‘static void {anonymous}::bench_destruction<T>::run() [with T = Normal<1024>]’ at src/intrusive_list/bench.cpp:85:109:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/new_allocator.h:175:11: warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized]
  175 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/intrusive_list/bench.cpp:21:
include/policies.hpp: In static member function ‘static void {anonymous}::bench_destruction<T>::run() [with T = Normal<1024>]’:
include/policies.hpp:124:83: note: ‘<anonymous>’ declared here
  124 |         return std::unique_ptr<Container>(new Container(size, typename Container::value_type()));
      |                                                                                   ^~~~~~~~~~~~
In member function ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Normal<32>; _Args = {const Normal<32>&}; _Tp = std::_List_node<Normal<32> >]’,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = Normal<32>; _Args = {const Normal<32>&}; _Tp = std::_List_node<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/alloc_traits.h:516:17,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::_Node* std::__cxx11::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const Normal<32>&}; _Tp = Normal<32>; _Alloc = std::allocator<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:713:33,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_insert(iterator, _Args&& ...) [with _Args = {const Normal<32>&}; _Tp = Normal<32>; _Alloc = std::allocator<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:2005:32,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Normal<32>; _Alloc = std::allocator<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1306:24,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_fill_initialize(size_type, const value_type&) [with _Tp = Normal<32>; _Alloc = std::allocator<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1946:13,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::list(size_type, const value_type&, const allocator_type&) [with _Tp = Normal<32>; _Alloc = std::allocator<Normal<32> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:787:27,
    inlined from ‘static std::unique_ptr<Container> SmartFilled<Container>::make(std::size_t) [with Container = std::__cxx11::list<Normal<32>, std::allocator<Normal<32> > >]’ at include/policies.hpp:124:43,
    inlined from ‘void bench(const std::string&, const std::initializer_list<int>&) [with Container = std::__cxx11::list<Normal<32>, std::allocator<Normal<32> > >; DurationUnit = std::chrono::duration<long int, std::ratio<1, 1000000> >; CreatePolicy = SmartFilled; TestPolicy = {SmartDelete}]’ at include/bench.hpp:50:18,
    inlined from ‘static void {anonymous}::bench_destruction<T>::run() [with T = Normal<32>]’ at src/intrusive_list/bench.cpp:85:109,
    inlined from ‘void bench_types() [with Benchmark = {anonymous}::bench_destruction; T = Normal<32>; Types = {Normal<128>, Normal<1024>}]’ at include/bench.hpp:73:22,
    inlined from ‘void bench_types() [with Benchmark = {anonymous}::bench_destruction; T = Normal<8>; Types = {Normal<32>, Normal<128>, Normal<1024>}]’ at include/bench.hpp:74:37,
    inlined from ‘void {anonymous}::bench_all() [with Types = {Normal<8>, Normal<32>, Normal<128>, Normal<1024>}]’ at src/intrusive_list/bench.cpp:187:50,
    inlined from ‘int main()’ at src/intrusive_list/bench.cpp:204:22:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/new_allocator.h:175:11: warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized]
  175 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/policies.hpp: In function ‘int main()’:
include/policies.hpp:124:83: note: ‘<anonymous>’ declared here
  124 |         return std::unique_ptr<Container>(new Container(size, typename Container::value_type()));
      |                                                                                   ^~~~~~~~~~~~
In member function ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Normal<128>; _Args = {const Normal<128>&}; _Tp = std::_List_node<Normal<128> >]’,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = Normal<128>; _Args = {const Normal<128>&}; _Tp = std::_List_node<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/alloc_traits.h:516:17,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::_Node* std::__cxx11::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const Normal<128>&}; _Tp = Normal<128>; _Alloc = std::allocator<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:713:33,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_insert(iterator, _Args&& ...) [with _Args = {const Normal<128>&}; _Tp = Normal<128>; _Alloc = std::allocator<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:2005:32,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Normal<128>; _Alloc = std::allocator<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1306:24,
    inlined from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_fill_initialize(size_type, const value_type&) [with _Tp = Normal<128>; _Alloc = std::allocator<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:1946:13,
    inlined from ‘std::__cxx11::list<_Tp, _Alloc>::list(size_type, const value_type&, const allocator_type&) [with _Tp = Normal<128>; _Alloc = std::allocator<Normal<128> >]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_list.h:787:27,
    inlined from ‘static std::unique_ptr<Container> SmartFilled<Container>::make(std::size_t) [with Container = std::__cxx11::list<Normal<128>, std::allocator<Normal<128> > >]’ at include/policies.hpp:124:43,
    inlined from ‘void bench(const std::string&, const std::initializer_list<int>&) [with Container = std::__cxx11::list<Normal<128>, std::allocator<Normal<128> > >; DurationUnit = std::chrono::duration<long int, std::ratio<1, 1000000> >; CreatePolicy = SmartFilled; TestPolicy = {SmartDelete}]’ at include/bench.hpp:50:18,
    inlined from ‘static void {anonymous}::bench_destruction<T>::run() [with T = Normal<128>]’ at src/intrusive_list/bench.cpp:85:109,
    inlined from ‘void bench_types() [with Benchmark = {anonymous}::bench_destruction; T = Normal<128>; Types = {Normal<1024>}]’ at include/bench.hpp:73:22,
    inlined from ‘void bench_types() [with Benchmark = {anonymous}::bench_destruction; T = Normal<32>; Types = {Normal<128>, Normal<1024>}]’ at include/bench.hpp:74:37,
    inlined from ‘void bench_types() [with Benchmark = {anonymous}::bench_destruction; T = Normal<8>; Types = {Normal<32>, Normal<128>, Normal<1024>}]’ at include/bench.hpp:74:37,
    inlined from ‘void {anonymous}::bench_all() [with Types = {Normal<8>, Normal<32>, Normal<128>, Normal<1024>}]’ at src/intrusive_list/bench.cpp:187:50,
    inlined from ‘int main()’ at src/intrusive_list/bench.cpp:204:22:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/new_allocator.h:175:11: warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized]
  175 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/policies.hpp: In function ‘int main()’:
include/policies.hpp:124:83: note: ‘<anonymous>’ declared here
  124 |         return std::unique_ptr<Container>(new Container(size, typename Container::value_type()));
      |                                                                                   ^~~~~~~~~~~~
[release] Compile src/graphs.cpp
[release] Compile src/demangle.cpp
[release] Link release/bin/intrusive_list

@wichtounet
Copy link
Owner

wichtounet commented Jan 13, 2024 via email

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

3 participants