Boost logo

Boost Users :

Subject: Re: [Boost-users] Context and coroutine for ARM
From: Daniel Estermann (estermad_at_[hidden])
Date: 2017-05-13 18:15:47


Thank you again for your responses.

First of all to clarify the my different logs with gnueabihf and gnueabi.
The one of them runs in my native environment, i.e. in Cygwin, the other
one in a Virtual Box on a Linux. To make sure that the errors are not
Cygwin related. So these installations aren't mixed.

>First, why in the world do you want to declare an exception variable apart
from a try/catch block?
I think this it sufficient to see if that type is declared at all.

>From compiling the example with '-v' I learned the location of the included
exception header. At the end of this header I saw:

#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
#include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endif

Playing around with #error's I found out ATOMIC_INT_LOCK_FREE is set to 1
so this condition isn't fulfilled. The next thing i tried out is to comment
that condition. The result was:

/cygdrive/d/Development/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/include/c++/6.3.0/bits/nested_exception.h:43:4:
error: #error This platform does not support exception propagation.

I checked then if this example compiles on Pi. It worked. So it seems I
have to rebuild my cross-compiler. Do you maybe know which option should I
pay attention to, to have this option set?

2017-05-13 18:41 GMT+02:00 d25fe0be_at_[hidden] <d25fe0be_at_[hidden]>:

> Try compiling it with '-v' (g++ -v t.cpp) so that the include search paths
> are printed ('#include <...> search starts here: ...'), and examine them to
> see if there is some other implementation (which presumably does not
> implement std::exception_ptr) of STL is included and takes precedence over
> the libstdc++ coming with GCC 6.3.
>
> If there is, I suggest you do a clean build of your cross-compiling
> toolchain.
>
> I also noticed that this time you're using `arm-unknown-linux-gnueabihf-gcc`
> (an unknown version) instead of `arm-unknown-linux-gnueabi-gcc` (which
> should be 6.3.0 from your previous post), and they seems to be two
> different installations. I'm not sure if this is related, but there's a
> chance that the two installations are messed together in some way, which
> may cause some problems.
>
> > On 14 May 2017, at 00:11, Daniel Estermann via Boost-users <
> boost-users_at_[hidden]> wrote:
> >
> > Thanks for the minimal example hint. Here is what I get:
> >
> > $ arm-unknown-linux-gnueabihf-gcc -xc++ - <<EOF
> > > #include <exception>
> > >
> > > std::exception_ptr x;
> > >
> > > int main() {}
> > >
> > > EOF
> > <stdin>:3:6: error: 'exception_ptr' in namespace 'std' does not name a
> type
> >
> >
> > 2017-05-13 17:05 GMT+02:00 d25fe0be_at_[hidden] <d25fe0be_at_[hidden]>:
> > It may be worth to try to compile the following code snippet to see if
> your compiler is working as expected:
> >
> > $ cat t.cpp
> > #include <exception>
> >
> > std::exception_ptr x;
> >
> > int main() {}
> > $ g++-6 ./t.cpp
> > $
> >
> > Perhaps your compiler (or libstdc++) is broken in some way.
> >
> > > On 13 May 2017, at 21:17, Daniel Estermann via Boost-users <
> boost-users_at_[hidden]> wrote:
> > >
> > > No matter if I add -std=c++11 to the flags, I still get the error
> message: http://sprunge.us/gSXb
> > > This is my compiler's configuration: http://sprunge.us/iaWZ
> > > I'm not sure how to check why C++11 code is used though.
> > >
> > >
> > >
> > > 2017-05-13 15:02 GMT+02:00 Oliver Kowalke via Boost-users <
> boost-users_at_[hidden]>:
> > > exception_ptr is part of C++11 but not used in boost.coroutine (and
> the fcontext-API of boost.context) -
> > > you could apply -std=c++11(cxxflags) or check why C++11 code is used
> > >
> > > _______________________________________________
> > > Boost-users mailing list
> > > Boost-users_at_[hidden]
> > > https://lists.boost.org/mailman/listinfo.cgi/boost-users
> > >
> > > _______________________________________________
> > > Boost-users mailing list
> > > Boost-users_at_[hidden]
> > > https://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net