Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-15 Thread Bogdan Vatra
Package: libboost-coroutine-dev
Version: 1.62.0.1
Severity: normal

--- Please enter the report below this line. ---

If I swicth to c++14/11 the problem vanish.
Most probably we'll need a newer boost version (1.68)?

--- System information. ---
Architecture: 
Kernel:   Linux 4.18.0-2-amd64

Debian Release: buster/sid
  500 unstable-debug  debug.mirrors.debian.org 
  500 unstablerepo.skype.com 
  500 unstableftp.debian.org 
  500 unstabledl.winehq.org 
  500 stable  dl.google.com 

--- Package information. ---
Depends (Version) | Installed
=-+-===
libboost-coroutine1.62-dev| 1.62.0+dfsg-10


Package's Recommends field is empty.

Package's Suggests field is empty.



Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-16 Thread Bogdan Vatra
According to https://www.boost.org/users/history/version_1_68_0.html it seems 
1.68 has some fixes for context & coroutine2:

Context:
 #78: Linker error with context-impl=ucontext: multiple definition of 
boost::context::detail::current_rec
Coroutine2:
 #14: crash while stack unwinding
 #20: failes to compile test in due to the error C2039 (looks similar with 
what I enounter on linux)
[...]

IMHO Debian buster should use 1.68 ...

Cheers,
BogDan.



Bug#913871: Fwd: Re: Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-16 Thread Bogdan Vatra
--  Mesaj înaintat  --

Subiect: Re: Bug#913871: [libboost-coroutine-dev] Projects using libboost-
coroutine2 fails to compile with g++8 and -std=gnu++17
Dată: vineri, 16 noiembrie 2018, 12:57:51 EET
De la: Bogdan Vatra 
To: Giovanni Mascellani 
CC: 913871-cl...@bugs.debian.org

Hi,

În ziua de vineri, 16 noiembrie 2018, la 11:24:08 EET, Giovanni Mascellani a 
scris:
> Hi,
> 
> Il 16/11/18 08:38, Bogdan Vatra ha scritto:
> > If I swicth to c++14/11 the problem vanish.
> > Most probably we'll need a newer boost version (1.68)?
> 
> We cannot know if you do not post the code which is giving you problems.
> I am using coroutine2 from boost1.67 on a project compiling wich g++ 8
> and C++17 and it works.
> 
> I am closing this report because it is too generic. If you want to
> reopen, please be sure of detailing what bug you are encountering. At
> this stage, it is much more probable that your code is C++17 incompatible.
> 
> Giovanni.


I have a simple example:

[cpp]
#include 
using YieldType = boost::coroutines2::coroutine::pull_type;
class Test {
public:
Test()
: m_coro(std::bind(&Test::callMe, this, std::placeholders::_1))
{}
void callMe(YieldType &yield) {}
using Call = boost::coroutines2::coroutine::push_type;
Call m_coro;
};

int main()
{
Test t;
return 0;
}
[/cpp]

$ g++ test.cpp -std=gnu++14 -lboost_coroutine -lboost_context
works just fine 
$ g++ test.cpp -std=gnu++17 -lboost_coroutine -lboost_context
gives me following errors:
In file included from /usr/include/boost/context/execution_context.hpp:13,
 from /usr/include/boost/coroutine2/detail/
pull_control_block_ecv2.hpp:14,
 from /usr/include/boost/coroutine2/detail/coroutine.hpp:37,
 from /usr/include/boost/coroutine2/coroutine.hpp:15,
 from test.cpp:1:
/usr/include/boost/context/execution_context_v2.hpp: In instantiation of 
‘boost::context::detail::transfer_t boost::context::detail::record::run(boost::context::detail::transfer_t) [with Ctx = 
boost::context::execution_context; StackAlloc = 
boost::context::basic_fixedsize_stack; Fn = 
boost::coroutines2::detail::push_coroutine::control_block::control_block(boost::context::preallocated,
 
StackAllocator, Fn&&) [with StackAllocator = 
boost::context::basic_fixedsize_stack; Fn = 
std::_Bind))
(boost::coroutines2::detail::pull_coroutine&)>; T = 
int]::, int*)>; Params = {}]’:
/usr/include/boost/context/execution_context_v2.hpp:70:11:   required from 
‘void 
boost::context::detail::context_entry(boost::context::detail::transfer_t) 
[with Rec = 
boost::context::detail::record, 
boost::context::basic_fixedsize_stack, 
boost::coroutines2::detail::push_coroutine::control_block::control_block(boost::context::preallocated,
 
StackAllocator, Fn&&) [with StackAllocator = 
boost::context::basic_fixedsize_stack; Fn = 
std::_Bind))
(boost::coroutines2::detail::pull_coroutine&)>; T = 
int]::, int*)> >]’
/usr/include/boost/context/execution_context_v2.hpp:198:42:   required from 
‘void* boost::context::detail::context_create(boost::context::preallocated, 
StackAlloc, Fn&&, Params&& ...) [with Ctx = 
boost::context::execution_context; StackAlloc = 
boost::context::basic_fixedsize_stack; Fn = 
boost::coroutines2::detail::push_coroutine::control_block::control_block(boost::context::preallocated,
 
StackAllocator, Fn&&) [with StackAllocator = 
boost::context::basic_fixedsize_stack; Fn = 
std::_Bind))
(boost::coroutines2::detail::pull_coroutine&)>; T = 
int]::, int*)>; Params = {}; 
boost::context::detail::fcontext_t = void*]’
/usr/include/boost/context/execution_context_v2.hpp:281:59:   required from 
‘boost::context::execution_context::execution_context(std::allocator_arg_t,
 
boost::context::preallocated, StackAlloc, Fn&&, Params&& ...) [with StackAlloc 
= boost::context::basic_fixedsize_stack; Fn = 
boost::coroutines2::detail::push_coroutine::control_block::control_block(boost::context::preallocated,
 
StackAllocator, Fn&&) [with StackAllocator = 
boost::context::basic_fixedsize_stack; Fn = 
std::_Bind))
(boost::coroutines2::detail::pull_coroutine&)>; T = 
int]::, int*)>; Params = {}; 
Args = {int*}]’
/usr/include/boost/coroutine2/detail/push_control_block_ecv2.ipp:111:12:   
required from 
‘boost::coroutines2::detail::push_coroutine::control_block::control_block(boost::context::preallocated,
 
StackAllocator, Fn&&) [with StackAllocator = 
boost::context::basic_fixedsize_stack; Fn = 
std::_Bind))
(boost::coroutines2::detail::pull_coroutine&)>; T = int]’
/usr/include/boost/coroutine2/detail/create_control_block.ipp:50:12:   
required from ‘ControlBlock* 
boost::coroutines2::detail::create_control_block(StackAllocator, Fn&&) [with 
ControlBlock = boost::coroutines2::detail::push_coroutine::control_block; 
StackAllo

Bug#913871: Fwd: Re: Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-16 Thread Giovanni Mascellani
Dear Bogdan,

Il 16/11/18 11:58, Bogdan Vatra ha scritto:
> I have a simple example:

Your example works on my installation, with all compatibility levels
from C++11 to C++17.

However, I just noticed that you are still using boost 1.62. Boost 1.67
has recently been uploaded to unstable. Your program should start
working as soon as you upload boost-defaults.

Bye, Giovanni.
-- 
Giovanni Mascellani 
Postdoc researcher - Université Libre de Bruxelles



Bug#913871: Fwd: Re: Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-19 Thread Bogdan Vatra
Hi,

În ziua de vineri, 16 noiembrie 2018, la 19:16:54 EET, Giovanni Mascellani a 
scris:
> Dear Bogdan,
> 
> Il 16/11/18 11:58, Bogdan Vatra ha scritto:
> > I have a simple example:
> Your example works on my installation, with all compatibility levels
> from C++11 to C++17.
> 
> However, I just noticed that you are still using boost 1.62. Boost 1.67
> has recently been uploaded to unstable. Your program should start
> working as soon as you upload boost-defaults.
> 
> Bye, Giovanni.

I test it again with 1.67 and is working.
Will it be the default boost in buster ?
Will you consider to bump 1.68? As I mentioned in my previous comment, it 
fixes some serious problems.

Cheers,
BogDan.

P.S. I tried to clone https://salsa.debian.org/debian/boost-defaults.git to 
change it for 1.68 and to help your with a pach.
But I could not find any docs about how to use & build it.
Especially how to use "debian/create-boost-defaults-control.py".
Will be great if you can add a README.md/txt file to debian folder which 
explains to begginers how to get started ;-).



Bug#913871: Fwd: Re: Bug#913871: [libboost-coroutine-dev] Projects using libboost-coroutine2 fails to compile with g++8 and -std=gnu++17

2018-11-19 Thread Giovanni Mascellani
Hi,

Il 19/11/18 17:58, Bogdan Vatra ha scritto:
> I test it again with 1.67 and is working.

Good.

> Will it be the default boost in buster ?
> Will you consider to bump 1.68? As I mentioned in my previous comment, it 
> fixes some serious problems.

Most probably not, buster will have Boost 1.67. Uploading a new version
is extremely time consuming and there is no real indication on what
benefits it provides.

> P.S. I tried to clone https://salsa.debian.org/debian/boost-defaults.git to 
> change it for 1.68 and to help your with a pach.
> But I could not find any docs about how to use & build it.
> Especially how to use "debian/create-boost-defaults-control.py".
> Will be great if you can add a README.md/txt file to debian folder which 
> explains to begginers how to get started ;-).

boost-defaults does not contain the actual Boost, it just depends on the
default Boost version. For the actual Boost package you should look at
boost1.67.

However, be warned: Boost is a very complicated piece of software, and
boost1.67 is a rather complicated package, so it's not the right place
for beginners. If you are a beginner, just use boost1.67, it will be
more than ok for nearly anything you have to do.

Giovanni.
-- 
Giovanni Mascellani 
Postdoc researcher - Université Libre de Bruxelles