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

2.20.4 fails to build with Fedora: ‘typedef void traceable_allocator<void>::value_type’ is private within this context #10147

Open
juhp opened this issue Mar 4, 2024 · 3 comments
Labels

Comments

@juhp
Copy link

juhp commented Mar 4, 2024

src/libutil/ref.hh:35:21: note:   122 | class small_vector_allocator
src/libutil/ref.hh:35:21: note:       |       ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:145:48:   required from ‘struct boost::container::allocator_traits<boost::container::small_vector_allocator<nix::Value*, traceable_allocator<void>, void> >’
src/libutil/ref.hh:35:21: note:   145 |    typedef typename allocator_type::value_type value_type;
src/libutil/ref.hh:35:21: note:       |                                                ^~~~~~~~~~
/usr/include/boost/container/vector.hpp:802:88:   required from ‘class boost::container::vector<nix::Value*, boost::container::small_vector_allocator<nix::Value*, traceable_allocator<void>, void>, void>’
src/libutil/ref.hh:35:21: note:   802 |    typedef typename   allocator_traits<allocator_type>::pointer                        pointer;
src/libutil/ref.hh:35:21: note:       |                                                                                        ^~~~~~~
/usr/include/boost/container/small_vector.hpp:341:7:   required from ‘class boost::container::small_vector_base<nix::Value*, traceable_allocator<nix::Value*>, void>’
src/libutil/ref.hh:35:21: note:   341 | class small_vector_base
src/libutil/ref.hh:35:21: note:       |       ^~~~~~~~~~~~~~~~~
/usr/include/boost/container/small_vector.hpp:531:7:   required from ‘class boost::container::small_vector<nix::Value*, 4, traceable_allocator<nix::Value*>, void>’
src/libutil/ref.hh:35:21: note:   531 | class small_vector
src/libutil/ref.hh:35:21: note:       |       ^~~~~~~~~~~~
src/libexpr/eval.cc:1730:31:   required from here
src/libutil/ref.hh:35:21: note:  1730 |     SmallValueVector<4> vArgs(args.size());
src/libutil/ref.hh:35:21: note:       |                               ^~~~
/usr/include/boost/container/allocator_traits.hpp:145:48: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  145 |    typedef typename allocator_type::value_type value_type;
      |                                                ^~~~~~~~~~
In file included from src/libexpr/value.hh:15:
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:210:13: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  210 |             pointer;
      |             ^~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:215:16: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  215 |                const_pointer;
      |                ^~~~~~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:215:16: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  215 |                const_pointer;
      |                ^~~~~~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:219:13: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  219 |             reference;
      |             ^~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:223:16: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  223 |                const_reference;
      |                ^~~~~~~~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:228:16: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  228 |                void_pointer;
      |                ^~~~~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
/usr/include/boost/container/allocator_traits.hpp:233:16: error: ‘typedef void traceable_allocator<void>::value_type’ is private within this context
  233 |                const_void_pointer;
      |                ^~~~~~~~~~~~~~~~~~
/usr/include/gc/gc_allocator.h:319:23: note: declared private here
  319 |   typedef void        value_type;
      |                       ^~~~~~~~~~
make: *** [mk/patterns.mk:3: src/libexpr/eval.o] Error 1
rm src/nix/generated-doc/files/profiles.md

Happens with both unreleased Fedora 40 (or Rawhide) and current Fedora 39.

https://src.fedoraproject.org/rpms/boost
https://src.fedoraproject.org/rpms/gcc

@juhp juhp added the bug label Mar 4, 2024
@juhp juhp changed the title 2.20.4 fails to build with Fedora 2.20.4 fails to build with Fedora: ‘typedef void traceable_allocator<void>::value_type’ is private within this context Mar 4, 2024
@thufschmitt
Copy link
Member

cc @roberth . I thinks that's due to the boehm patch, but I don't have all the context around it, so I'll let you answer :)

@roberth
Copy link
Member

roberth commented Mar 5, 2024

That is correct. We needed this patch to fix a stack overflow.

Possible resolutions:

  • apply the patch to bdwgc / boehmgc (whichever it's called on Fedora)
  • or build without gc, ./configure --disable-gc (only if you have memory to spare and/or you only use this build to then build Nix with Nix and switch to that)

The patch has been applied upstream, but not released, afaik. Other preparations for the next bdwgc release are in #9900; wip, not a solution yet.

@juhp
Copy link
Author

juhp commented Mar 8, 2024

  • apply the patch to bdwgc / boehmgc (whichever it's called on Fedora)

(It is called gc in Fedora, still 8.2.2)

It appears to be in 8.2.6 released last month:

  • Make gc_allocator members public

https://github.com/ivmai/bdwgc/blob/v8.2.6/include/gc_allocator.h#L330

* or build without gc, `./configure --disable-gc` 

I seem able to build with --disable-gc, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants