Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#10558 closed Bugs (worksforme)

boost 1.56 and gcc.4.9.1 invalid use of incomplete type 'struct boost::detail::shared_state_base'

Reported by: Richard PALO <richard@…> Owned by: viboes
Milestone: Component: thread
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

Trying a build with gcc4.9.1 in pkgsrc and am encountering the following:

gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.1/release/threading-multi/pthread/thread.o libs/thread/src/pthread/thread.cpp: In destructor 'virtual boost::detail::thread_data_base::~thread_data_base()': libs/thread/src/pthread/thread.cpp:56:21: error: invalid use of incomplete type 'struct boost::detail::shared_state_base'

(*i)->make_ready();

In file included from ./boost/thread/thread_only.hpp:17:0,

from libs/thread/src/pthread/thread.cpp:11:

./boost/thread/pthread/thread_data.hpp:84:16: error: forward declaration of 'struct boost::detail::shared_state_base'

struct shared_state_base;

In file included from ./boost/system/system_error.hpp:14:0,

from ./boost/thread/exceptions.hpp:22, from ./boost/thread/pthread/thread_data.hpp:10, from ./boost/thread/thread_only.hpp:17, from libs/thread/src/pthread/thread.cpp:11:

Change History (9)

comment:1 by viboes, 8 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 8 years ago

The file libs/thread/src/pthread/thread.cpp includes already the file <boost/thread/future.hpp> which defines shared_state_base.

I don't see where is the problem.

comment:3 by Richard PALO <richard@…>, 8 years ago

I try to attach the output of preprocess only with '-E -dD' but even compressed the output is > 365K perhaps that will give some insight. If I can mail it somewhere let me know.

in reply to:  3 comment:4 by viboes, 8 years ago

Replying to Richard PALO <richard@…>:

I try to attach the output of preprocess only with '-E -dD' but even compressed the output is > 365K perhaps that will give some insight. If I can mail it somewhere let me know.

Yes please, sent it to vicente.botet at wanadoo.fr

comment:5 by Richard PALO <richard@…>, 8 years ago

I'm going to put this to sleep for now, the original report was done in an environment upgraded from gcc 4.7.3 to 4.9.1 where perhaps something went awry during the boost components upgrade. Building in a pristine gcc 4.9.1 environment did not manifest this error.

comment:6 by viboes, 8 years ago

Milestone: To Be Determined
Resolution: worksforme
Status: assignedclosed

Please reopen it when you see it again.

comment:7 by anonymous, 7 years ago

I'm also getting the same errors with boost 1.54 and gcc 4.8

comment:8 by zhaojeff2012@…, 5 years ago

I'm also getting the same errors in xcode with boost 1.60 and gcc 4.2.1

 ~ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

comment:9 by viboes, 5 years ago

We are now in boost-1.66 and are releasing boost-1.66.

Have you this problem in this version?

Note: See TracTickets for help on using tickets.