NetBSD Problem Report #51256

From www@NetBSD.org  Sun Jun 19 14:25:44 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BE97E7A46A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 19 Jun 2016 14:25:44 +0000 (UTC)
Message-Id: <20160619142542.BD48F7AAB0@mollari.NetBSD.org>
Date: Sun, 19 Jun 2016 14:25:42 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: cad/kicad build failure w/boost-headers 1.61
X-Send-Pr-Version: www-1.0

>Number:         51256
>Category:       pkg
>Synopsis:       cad/kicad build failure w/boost-headers 1.61
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 19 14:30:00 +0000 2016
>Last-Modified:  Wed Jul 20 00:20:01 +0000 2016
>Originator:     John D. Baker
>Release:        NetBSD/amd64-7.0_STABLE, pkgsrc-HEAD (pre-pkgsrc-2016Q2)
>Organization:
>Environment:
NetBSD dpe2850b.technoskunk.fur 7.0_STABLE NetBSD 7.0_STABLE (RACKMOUNT) #26: Wed Jun 15 08:59:04 CDT 2016  sysop@yggdrasil.technoskunk.fur:/r0/build/netbsd-7/obj/amd64/sys/arch/amd64/compile/RACKMOUNT amd64

>Description:
The update of devel/boost-headers to v1.61 breaks building cad/kicad.

The first part of the problem is that a number of header files are
now located down an additional directory level, so the #include
directives fail to find them.

The first such instance is in ${WRKSRC}/include/tool/coroutine.h
where "#include <boost/context/fcontext.hpp>" needs to be changed
to "#include <boost/context/detail/fcontext.hpp>".

After doing the above, this provokes a different failure:

[...]
In file included from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/common/tool/tool_manager.cpp:46:0:
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:225:49: error: 'boost::context::fcontext_t' has not been declared
     static inline intptr_t jump(boost::context::fcontext_t* aOld, boost::context::fcontext_t* aNew,
                                                 ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:225:83: error: 'boost::context::fcontext_t' has not been declared
     static inline intptr_t jump(boost::context::fcontext_t* aOld, boost::context::fcontext_t* aNew,
                                                                                   ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:255:5: error: 'fcontext_t' in namespace 'boost::context' does not name a type
     boost::context::fcontext_t* m_saved;
     ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:258:5: error: 'fcontext_t' in namespace 'boost::context' does not name a type
     boost::context::fcontext_t* m_self;
     ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In constructor 'COROUTINE<ReturnType, ArgType>::COROUTINE()':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:61:9: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_saved'
         m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ),
         ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:61:26: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_self'
         m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ),
                          ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In constructor 'COROUTINE<ReturnType, ArgType>::COROUTINE(T*, ReturnType (T::*)(ArgType))':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:72:32: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_self'
         m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ),
                                ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:72:48: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_saved'
         m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ),
                                                ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In constructor 'COROUTINE<ReturnType, ArgType>::COROUTINE(DELEGATE<ReturnType, ArgType>)':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:82:27: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_saved'
         m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ),
                           ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:82:44: error: class 'COROUTINE<ReturnType, ArgType>' does not have any field named 'm_self'
         m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ),
                                            ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In destructor 'COROUTINE<ReturnType, ArgType>::~COROUTINE()':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:92:13: error: 'm_saved' was not declared in this scope
         if( m_saved )
             ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:96:13: error: 'm_self' was not declared in this scope
         if( m_self )
             ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In member function 'void COROUTINE<ReturnType, ArgType>::Yield()':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:113:15: error: 'm_self' was not declared in this scope
         jump( m_self, m_saved, 0 );
               ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:113:23: error: 'm_saved' was not declared in this scope
         jump( m_self, m_saved, 0 );
                       ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In member function 'void COROUTINE<ReturnType, ArgType>::Yield(ReturnType&)':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:125:15: error: 'm_self' was not declared in this scope
         jump( m_self, m_saved, 0 );
               ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:125:23: error: 'm_saved' was not declared in this scope
         jump( m_self, m_saved, 0 );
                       ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In member function 'bool COROUTINE<ReturnType, ArgType>::Call(ArgType)':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:160:9: error: 'm_self' was not declared in this scope
         m_self = new boost::context::fcontext_t();
         ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:160:22: error: expected type-specifier
         m_self = new boost::context::fcontext_t();
                      ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:160:22: error: expected ';'
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:161:19: error: 'make_fcontext' is not a member of 'boost::context'
         *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
                   ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:161:19: note: suggested alternative:
In file included from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:30:0,
                 from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/common/tool/tool_manager.cpp:46:
/tmp/pkgsrc/cad/kicad/work/.buildlink/include/boost/context/detail/fcontext.hpp:33:35: note:   'boost::context::detail::make_fcontext'
 fcontext_t BOOST_CONTEXT_CALLDECL make_fcontext( void * sp, std::size_t size, void (* fn)( transfer_t) );
                                   ^
In file included from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/common/tool/tool_manager.cpp:46:0:
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:165:9: error: 'm_saved' was not declared in this scope
         m_saved = new boost::context::fcontext_t();
         ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:165:23: error: expected type-specifier
         m_saved = new boost::context::fcontext_t();
                       ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:165:23: error: expected ';'
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In member function 'bool COROUTINE<ReturnType, ArgType>::Resume()':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:182:15: error: 'm_saved' was not declared in this scope
         jump( m_saved, m_self, 0 );
               ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:182:24: error: 'm_self' was not declared in this scope
         jump( m_saved, m_self, 0 );
                        ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h: In static member function 'static __intptr_t COROUTINE<ReturnType, ArgType>::jump(int*, int*, __intptr_t, bool)':
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:229:16: error: 'jump_fcontext' is not a member of 'boost::context'
         return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
                ^
/tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:229:16: note: suggested alternative:
In file included from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/include/tool/coroutine.h:30:0,
                 from /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1/common/tool/tool_manager.cpp:46:
/tmp/pkgsrc/cad/kicad/work/.buildlink/include/boost/context/detail/fcontext.hpp:31:35: note:   'boost::context::detail::jump_fcontext'
 transfer_t BOOST_CONTEXT_CALLDECL jump_fcontext( fcontext_t const to, void * vp);
                                   ^
[ 57%] Building CXX object pcbnew/router/CMakeFiles/pnsrouter.dir/pns_tool_base.cpp.o
[ 57%] Building CXX object 3d-viewer/CMakeFiles/3d-viewer.dir/CImage.cpp.o
--- common/CMakeFiles/common.dir/tool/tool_manager.cpp.o ---
*** [common/CMakeFiles/common.dir/tool/tool_manager.cpp.o] Error code 1

make[2]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
A failure has been detected in another branch of the parallel make

make[2]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
--- 3d-viewer/CMakeFiles/3d-viewer.dir/all ---
*** [3d-viewer/CMakeFiles/3d-viewer.dir/all] Error code 2

make[1]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
1 error

make[2]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
--- common/CMakeFiles/common.dir/all ---
*** [common/CMakeFiles/common.dir/all] Error code 2

make[1]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
A failure has been detected in another branch of the parallel make

make[2]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
--- pcbnew/router/CMakeFiles/pnsrouter.dir/all ---
*** [pcbnew/router/CMakeFiles/pnsrouter.dir/all] Error code 2

make[1]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
3 errors

make[1]: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
*** [all] Error code 2

make: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
1 error

make: stopped in /tmp/pkgsrc/cad/kicad/work/kicad-4.0.1
*** Error code 2

Stop.
make[1]: stopped in /x/pkgsrc/cad/kicad
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/cad/kicad

>How-To-Repeat:
See above.
>Fix:
Is there a more recent release of "kicad" that can deal with boost-1.61?
Will reverting to boost-1.60 break other packages (e.g., libreoffice)?
Otherwise, grovel through kicad sources and prepare more patches...

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51256: cad/kicad build failure w/boost-headers 1.61
Date: Mon, 20 Jun 2016 11:36:37 -0500 (CDT)

 Thinking about this a bit, the failure seems to indicate that the
 machine-arch-specific "fcontext.hpp" file is not being pulled in, as that
 is where "fcontext_t" is actually defined (is otherwise typdef'd as void*).

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51256: cad/kicad build failure w/boost-headers 1.61
Date: Tue, 19 Jul 2016 19:18:45 -0500 (CDT)

 As a workaround, roll back "meta-pkgs/boost" and "devel/boost-*" (probably
 only need to roll back "devel/boost-{jam,headers,libs}") to pkgsrc-2016Q1.

 So far, the older boost package (1.60.0) is sufficient for other packages
 in pkgsrc-2016Q2 which depend on it--at least those I commonly build:

 Direct dependency:
   cad/kicad
   games/pingus
   misc/libreoffice

 Indirect dependency:
   editors/abiword-plugins
   graphics/inkscape

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.