-
Notifications
You must be signed in to change notification settings - Fork 108
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
Failing to build static lib with GCC 4.8 and C++11 #121
Comments
problem of gcc-4.8/9
Am 20.04.2017 11:18 vorm. schrieb "Deniz Bahadir" <notifications@github.com
…:
Compiling the newest Boost release (version *1.64.0*) fails when trying
to compile *Boost.Fiber* as *static library* with *GCC 4.8* and -std=c++11
.
This seems to be related to this issue
<boostorg/context#52> with *Boost.Context*. The
call to callcc is an ambiguous overload.
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/algorithm.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/round_robin.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/shared_work.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/work_stealing.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/barrier.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/condition_variable.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o
libs/fiber/src/context.cpp: In constructor ‘boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)’:
libs/fiber/src/context.cpp:236:14: error: call of overloaded ‘callcc(const std::allocator_arg_t&, const boost::context::preallocated&, const default_stack&, boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5)’ is ambiguous
});
^
libs/fiber/src/context.cpp:236:14: note: candidates are:
In file included from ./boost/fiber/context.hpp:28:0,
from libs/fiber/src/context.cpp:7:
./boost/context/continuation.hpp:469:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, StackAlloc, Fn&&, Arg ...) [with StackAlloc = boost::context::preallocated; Fn = const boost::context::basic_fixedsize_stack<boost::context::stack_traits>&; Arg = {boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5}]
callcc( std::allocator_arg_t, StackAlloc salloc, Fn && fn, Arg ... arg) {
^
./boost/context/continuation.hpp:483:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, boost::context::preallocated, StackAlloc, Fn&&, Arg ...) [with StackAlloc = boost::context::basic_fixedsize_stack<boost::context::stack_traits>; Fn = boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5; Arg = {}]
callcc( std::allocator_arg_t, preallocated palloc, StackAlloc salloc, Fn && fn, Arg ... arg) {
^
./boost/context/continuation.hpp:514:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, boost::context::preallocated, StackAlloc, Fn&&) [with StackAlloc = boost::context::basic_fixedsize_stack<boost::context::stack_traits>; Fn = boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5]
callcc( std::allocator_arg_t, preallocated palloc, StackAlloc salloc, Fn && fn) {
^
./boost/context/continuation.hpp:457:1: note: boost::context::continuation boost::context::callcc(Fn&&, Arg ...) [with Fn = const std::allocator_arg_t&; Arg = {boost::context::preallocated, boost::context::basic_fixedsize_stack<boost::context::stack_traits>, boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5}; <template-parameter-1-3> = void]
callcc( Fn && fn, Arg ... arg) {
^
"g++-4.8" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -m64 -m64 -fpic -std=c++11 -m64 -fpic -DBOOST_ALL_NO_LIB=1 -DBOOST_DISABLE_ASSERTS -DBOOST_FIBERS_SOURCE -DNDEBUG -I"." -c -o "/home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o" "libs/fiber/src/context.cpp"
...failed gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o...
HTH,
Deniz Bahadir
PS: I reported this issue already for the beta releases of *Boost 1.64.0*
on the Boost mailing-list but it obviously got not much attention.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#121>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA30QD3_Eh8oIQ0sGX9aww3144mrtVhGks5rxyLWgaJpZM4NCwgC>
.
|
I mean it's a bug of gcc-4.8/4.9 - the code compiles with gcc-5/6, clang ,
intel and msvc
Am 20.04.2017 11:37 vorm. schrieb "Oliver Kowalke" <oliver.kowalke@gmail.com
:
problem of gcc-4.8/9
Am 20.04.2017 11:18 vorm. schrieb "Deniz Bahadir" <notifications@github.com
…:
Compiling the newest Boost release (version *1.64.0*) fails when trying
to compile *Boost.Fiber* as *static library* with *GCC 4.8* and -std=c++11
.
This seems to be related to this issue
<boostorg/context#52> with *Boost.Context*. The
call to callcc is an ambiguous overload.
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi
common.mkdir /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/algorithm.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/round_robin.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/shared_work.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/algo/work_stealing.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/barrier.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/condition_variable.o
gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o
libs/fiber/src/context.cpp: In constructor ‘boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)’:
libs/fiber/src/context.cpp:236:14: error: call of overloaded ‘callcc(const std::allocator_arg_t&, const boost::context::preallocated&, const default_stack&, boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5)’ is ambiguous
});
^
libs/fiber/src/context.cpp:236:14: note: candidates are:
In file included from ./boost/fiber/context.hpp:28:0,
from libs/fiber/src/context.cpp:7:
./boost/context/continuation.hpp:469:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, StackAlloc, Fn&&, Arg ...) [with StackAlloc = boost::context::preallocated; Fn = const boost::context::basic_fixedsize_stack<boost::context::stack_traits>&; Arg = {boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5}]
callcc( std::allocator_arg_t, StackAlloc salloc, Fn && fn, Arg ... arg) {
^
./boost/context/continuation.hpp:483:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, boost::context::preallocated, StackAlloc, Fn&&, Arg ...) [with StackAlloc = boost::context::basic_fixedsize_stack<boost::context::stack_traits>; Fn = boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5; Arg = {}]
callcc( std::allocator_arg_t, preallocated palloc, StackAlloc salloc, Fn && fn, Arg ... arg) {
^
./boost/context/continuation.hpp:514:1: note: boost::context::continuation boost::context::callcc(std::allocator_arg_t, boost::context::preallocated, StackAlloc, Fn&&) [with StackAlloc = boost::context::basic_fixedsize_stack<boost::context::stack_traits>; Fn = boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5]
callcc( std::allocator_arg_t, preallocated palloc, StackAlloc salloc, Fn && fn) {
^
./boost/context/continuation.hpp:457:1: note: boost::context::continuation boost::context::callcc(Fn&&, Arg ...) [with Fn = const std::allocator_arg_t&; Arg = {boost::context::preallocated, boost::context::basic_fixedsize_stack<boost::context::stack_traits>, boost::fibers::context::context(boost::fibers::dispatcher_context_t, const boost::context::preallocated&, const default_stack&, boost::fibers::scheduler*)::__lambda5}; <template-parameter-1-3> = void]
callcc( Fn && fn, Arg ... arg) {
^
"g++-4.8" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -m64 -m64 -fpic -std=c++11 -m64 -fpic -DBOOST_ALL_NO_LIB=1 -DBOOST_DISABLE_ASSERTS -DBOOST_FIBERS_SOURCE -DNDEBUG -I"." -c -o "/home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o" "libs/fiber/src/context.cpp"
...failed gcc.compile.c++ /home/jenkins/workspace/TEST_Boost_Build/gcc48/build/boost/boost/bin.v2/libs/fiber/build/gcc-4.8/release/link-static/threading-multi/context.o...
HTH,
Deniz Bahadir
PS: I reported this issue already for the beta releases of *Boost 1.64.0*
on the Boost mailing-list but it obviously got not much attention.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#121>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA30QD3_Eh8oIQ0sGX9aww3144mrtVhGks5rxyLWgaJpZM4NCwgC>
.
|
Mmhhh... I see. You could provide a workaround by adding copies of the original Of course this is kind of ugly but might help in this case. I tried it out and it works. See the attached patches (against the Boost 1.64.0 release). context__include__continuation.hpp.diff.txt |
I was able to build Boost.Fiber with Would you be able to verify? |
I can confirm that Boost.Fiber from Boost releases 1.64.0 with these patches compiles fine with GCC 4.8. I assume that during compilation with (However, I just tried to compile Boost.Fiber and no other Boost-library which depends on it or Boost.Context.) |
I actually don't think the tests are run unless you explicitly run them. I'm fairly new to the Boost build toolchain, so there might be better ways to do this, but here's how I run the tests for a specific module:
If it says anything about "skipped" or "failed" targets at the end of the run, then that indicates a problem. |
OK, you are right. I somehow thought that the unit-tests would have been run automatically. (Maybe that is the case for some other Boost-libraries?) One unit-test failed and a second was skipped because of this, when compiling with GCC 4.8. GCC 6 compiles fine instead (while Clang 3.8 does only compile the library but does not even try to compile the libraries). So I can confirm your findings. The failure seems to be due to the unit-test somehow trying to use the deleted copy-constructor of a move-only type ( |
Yes, that's the same error I observed.
I'm guessing that this is actually an issue/deficiency in the C++ standard library that ships with GCC 4.8, which means the boost library can't really work around it (aside from maybe documenting the limitation and suggesting to upgrade your compiler toolchain). But, the good news is that everything else worked, so as long as you don't try to copy something with a deleted copy constructor into a Boost.Fiber promise, then I think you should be fine using GCC 4.8. |
should be fixed now (not the atomic ctor issue), ty |
I think this problem is not solved entirely (maybe related to gcc 4.9), here is my build error (branch develop):
Updated: I fixed by checking out the boost_context to develop branch too. |
Use mmap(2) MAP_STACK to allocate stacks on OpenBSD
Compiling the newest Boost release (version 1.64.0) fails when trying to compile Boost.Fiber as static library with GCC 4.8 and
-std=c++11
.This seems to be related to this issue with Boost.Context. The call to
callcc
is an ambiguous overload.HTH,
Deniz Bahadir
PS: I reported this issue already for the beta releases of Boost 1.64.0 on the Boost mailing-list but it obviously got not much attention.
The text was updated successfully, but these errors were encountered: