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

Fails to build on boost-1.76.0 #2030

Closed
maxice8 opened this issue Apr 19, 2021 · 4 comments · Fixed by #2036
Closed

Fails to build on boost-1.76.0 #2030

maxice8 opened this issue Apr 19, 2021 · 4 comments · Fixed by #2036
Milestone

Comments

@maxice8
Copy link

maxice8 commented Apr 19, 2021

Found while mass-rebuilding repository for Alpine Linux

Ledger-3.2.1

In file included from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/print.h:47,
                 from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/print.cc:34:
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:68:5: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
   68 |     scoped_ptr<struct element_t> next;
      |     ^~~~~~~~~~
      |     scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:106:3: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
  106 |   scoped_ptr<element_t> elements;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'void ledger::format_t::parse_format(const string&, const boost::optional<ledger::format_t&>&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:138:5: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  138 |     elements.reset(parse_elements(_format, tmpl));
      |     ^~~~~~~~
      |     element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::mark_uncompiled()':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:29: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                             ^~~~~~~~
      |                             element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:64: error: 'struct ledger::format_t::element_t' has no member named 'next'
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                                                                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::dump(std::ostream&) const':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:154:35: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  154 |     for (const element_t * elem = elements.get();
      |                                   ^~~~~~~~
      |                                   element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:156:23: error: 'const struct ledger::format_t::element_t' has no member named 'next'
  156 |          elem = elem->next.get())
      |                       ^~~~
In file included from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:34:
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:68:5: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
   68 |     scoped_ptr<struct element_t> next;
      |     ^~~~~~~~~~
      |     scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:106:3: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
  106 |   scoped_ptr<element_t> elements;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'void ledger::format_t::parse_format(const string&, const boost::optional<ledger::format_t&>&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:138:5: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  138 |     elements.reset(parse_elements(_format, tmpl));
      |     ^~~~~~~~
      |     element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::mark_uncompiled()':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:29: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                             ^~~~~~~~
      |                             element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:64: error: 'struct ledger::format_t::element_t' has no member named 'next'
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                                                                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::dump(std::ostream&) const':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:154:35: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  154 |     for (const element_t * elem = elements.get();
      |                                   ^~~~~~~~
      |                                   element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:156:23: error: 'const struct ledger::format_t::element_t' has no member named 'next'
  156 |          elem = elem->next.get())
      |                       ^~~~
In file included from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/report.h:53,
                 from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/stats.cc:38:
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:68:5: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
   68 |     scoped_ptr<struct element_t> next;
      |     ^~~~~~~~~~
      |     scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:106:3: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
  106 |   scoped_ptr<element_t> elements;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'void ledger::format_t::parse_format(const string&, const boost::optional<ledger::format_t&>&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:138:5: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  138 |     elements.reset(parse_elements(_format, tmpl));
      |     ^~~~~~~~
      |     element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::mark_uncompiled()':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:29: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                             ^~~~~~~~
      |                             element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:64: error: 'struct ledger::format_t::element_t' has no member named 'next'
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                                                                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::dump(std::ostream&) const':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:154:35: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  154 |     for (const element_t * elem = elements.get();
      |                                   ^~~~~~~~
      |                                   element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:156:23: error: 'const struct ledger::format_t::element_t' has no member named 'next'
  156 |          elem = elem->next.get())
      |                       ^~~~
In file included from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/output.h:47,
                 from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/output.cc:34:
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:68:5: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
   68 |     scoped_ptr<struct element_t> next;
      |     ^~~~~~~~~~
      |     scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:106:3: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
  106 |   scoped_ptr<element_t> elements;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'void ledger::format_t::parse_format(const string&, const boost::optional<ledger::format_t&>&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:138:5: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  138 |     elements.reset(parse_elements(_format, tmpl));
      |     ^~~~~~~~
      |     element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc: In static member function 'static ledger::format_t::element_t* ledger::format_t::parse_elements(const string&, const boost::optional<ledger::format_t&>&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:146:16: error: 'struct ledger::format_t::element_t' has no member named 'next'
  146 |       current->next.reset(new element_t);
      |                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:147:26: error: 'struct ledger::format_t::element_t' has no member named 'next'
  147 |       current = current->next.get();
      |                          ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::mark_uncompiled()':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:29: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                             ^~~~~~~~
      |                             element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:143:64: error: 'struct ledger::format_t::element_t' has no member named 'next'
  143 |     for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                                                                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h: In member function 'virtual void ledger::format_t::dump(std::ostream&) const':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:154:35: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  154 |     for (const element_t * elem = elements.get();
      |                                   ^~~~~~~~
      |                                   element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:156:23: error: 'const struct ledger::format_t::element_t' has no member named 'next'
  156 |          elem = elem->next.get())
      |                       ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:155:16: error: 'struct ledger::format_t::element_t' has no member named 'next'
  155 |       current->next.reset(new element_t);
      |                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:156:26: error: 'struct ledger::format_t::element_t' has no member named 'next'
  156 |       current = current->next.get();
      |                          ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:259:39: error: 'class ledger::format_t' has no member named 'elements'; did you mean 'element_t'?
  259 |         element_t * tmpl_elem = tmpl->elements.get();
      |                                       ^~~~~~~~
      |                                       element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:262:34: error: 'struct ledger::format_t::element_t' has no member named 'next'
  262 |           tmpl_elem = tmpl_elem->next.get();
      |                                  ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:264:36: error: 'struct ledger::format_t::element_t' has no member named 'next'
  264 |             tmpl_elem = tmpl_elem->next.get();
      |                                    ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:389:16: error: 'struct ledger::format_t::element_t' has no member named 'next'
  389 |       current->next.reset(new element_t);
      |                ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:390:26: error: 'struct ledger::format_t::element_t' has no member named 'next'
  390 |       current = current->next.get();
      |                          ^~~~
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc: In member function 'virtual ledger::string ledger::format_t::real_calc(ledger::scope_t&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:403:27: error: 'elements' was not declared in this scope; did you mean 'element_t'?
  403 |   for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                           ^~~~~~~~
      |                           element_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.cc:403:62: error: 'struct ledger::format_t::element_t' has no member named 'next'
  403 |   for (element_t * elem = elements.get(); elem; elem = elem->next.get()) {
      |                                                              ^~~~
In file included from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/report.h:53,
                 from /builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/draft.cc:40:
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:68:5: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
   68 |     scoped_ptr<struct element_t> next;
      |     ^~~~~~~~~~
      |     scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/format.h:106:3: error: 'scoped_ptr' does not name a type; did you mean 'scope_t'?
  106 |   scoped_ptr<element_t> elements;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/expr.cc: In function 'ledger::value_t ledger::source_command(ledger::call_scope_t&)':
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/expr.cc:281:3: error: 'scoped_ptr' was not declared in this scope; did you mean 'scope_t'?
  281 |   scoped_ptr<ifstream> stream;
      |   ^~~~~~~~~~
      |   scope_t
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/expr.cc:281:22: error: expected primary-expression before '>' token
  281 |   scoped_ptr<ifstream> stream;
      |                      ^
/builds/Leo/aports/testing/ledger/src/ledger-3.2.1/src/expr.cc:281:24: error: 'stream' was not declared in this scope
  281 |   scoped_ptr<ifstream> stream;
      |                        ^~~~~~
@krop
Copy link

krop commented Apr 28, 2021

We're now also affected by this issue in openSUSE Tumbleweed

@c-14
Copy link

c-14 commented May 14, 2021

Since ledger already seems to depend on C++11, replacing the three occurrences of scoped_ptr with std::unique_ptr seems to be the go-to method of fixing this.
Alternatively, scoped_ptr still exists in boost/smart_ptr/scoped_ptr.hpp which could be included in boost/smart_ptr/scoped_ptr.hpp with a possible version check on boost 1.65.0 (which according to the boost docs seems to be when that header was introduced)

@tbm tbm added this to the 3.3 milestone May 14, 2021
carlocab added a commit to carlocab/homebrew-core that referenced this issue May 25, 2021
This adds a patch for Boost 1.76 compatibility, taken from

    ledger/ledger#2030
carlocab added a commit to Homebrew/homebrew-core that referenced this issue May 26, 2021
This adds a patch for Boost 1.76 compatibility, taken from

    ledger/ledger#2030
@tbm tbm closed this as completed in #2036 Jun 14, 2021
tbm pushed a commit that referenced this issue Jun 14, 2021
We were previously relying on an indirect include within Boost headers. We're
using scoped_ptr which is defined in <boost/smart_ptr/scoped_ptr.hpp>.

Bug: https://bugs.gentoo.org/790176
Closes: #2030
@tbm
Copy link
Contributor

tbm commented Jun 14, 2021

To the distro maintainers: would it help to make a 3.2.2 release with just fix or can you just backport anyway.

@thesamesam
Copy link
Contributor

thesamesam commented Jun 14, 2021

@tbm

  1. Thanks for asking and the smooth contribution experience!

  2. It's useful if we haven't yet upgraded to e.g. new Boost. Gentoo is usually on top of new Boost releases and but some other distributions are sometimes more conservative given the tendency for consumers to break.

Basically, it saves time if you haven't yet hit the problem, because you don't have to go hunting for a patch if you've just updated to the latest upstream version that's fixed.

TL;DR: I'd do a release if you get time sometime soon, but don't rush over it/hurry.

@spaette spaette mentioned this issue Jan 9, 2023
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

Successfully merging a pull request may close this issue.

5 participants