NetBSD Problem Report #42746
From sdrake@xnet.co.nz Fri Feb 5 04:20:56 2010
Return-Path: <sdrake@xnet.co.nz>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 0BC5E63B886
for <gnats-bugs@gnats.NetBSD.org>; Fri, 5 Feb 2010 04:20:56 +0000 (UTC)
Message-Id: <alpine.LNX.2.00.1002051712440.3545@vqena.qenxr.bet.am>
Date: Fri, 5 Feb 2010 17:13:27 +1300 (NZDT)
From: Steven Drake <sdrake@xnet.co.nz>
To: gnats-bugs@NetBSD.org
Subject: devel/boost-libs needs an extra flag with gcc-4.4
>Number: 42746
>Category: pkg
>Synopsis: devel/boost-libs needs an extra flag with gcc-4.4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 05 04:25:00 +0000 2010
>Closed-Date: Mon Apr 04 06:25:40 +0000 2011
>Last-Modified: Mon Apr 04 06:25:40 +0000 2011
>Originator: Steven Drake
>Release: boost-libs-1.41.0 (pkgsrc-2009Q4)
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.
gcc (GCC) 4.4.1
>Description:
gcc-4.4 needs the command line flag '-std=c++0x' to use scoped enums.
>How-To-Repeat:
cd devel/boost-libs ; make
[....]
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.4.1/release/threading-multi/instantiate_cpp_exprgrammar.o
In file included from ./boost/spirit/home/support/iterators/multi_pass_fwd.hpp:14,
from ./boost/spirit/home/support/iterators/detail/first_owner_policy.hpp:11,
from ./boost/spirit/home/support/multi_pass.hpp:16,
from ./boost/spirit/include/support_multi_pass.hpp:17,
from ./boost/wave/cpplexer/cpp_lex_iterator.hpp:23,
from libs/wave/src/instantiate_cpp_exprgrammar.cpp:23:
./boost/spirit/home/support/multi_pass_wrapper.hpp:22: warning: scoped enums only available with -std=c++0x or -std=gnu++0x
./boost/spirit/home/support/multi_pass_wrapper.hpp:31: error: 'clear_mode' is not a class or namespace
In file included from ./boost/spirit/home/support/iterators/detail/first_owner_policy.hpp:11,
from ./boost/spirit/home/support/multi_pass.hpp:16,
from ./boost/spirit/include/support_multi_pass.hpp:17,
from ./boost/wave/cpplexer/cpp_lex_iterator.hpp:23,
from libs/wave/src/instantiate_cpp_exprgrammar.cpp:23:
./boost/spirit/home/support/iterators/multi_pass_fwd.hpp:77: error: 'clear_mode' is not a class or namespace
In file included from ./boost/spirit/home/support/multi_pass.hpp:35,
from ./boost/spirit/include/support_multi_pass.hpp:17,
from ./boost/wave/cpplexer/cpp_lex_iterator.hpp:23,
from libs/wave/src/instantiate_cpp_exprgrammar.cpp:23:
./boost/spirit/home/support/iterators/multi_pass.hpp:133: error: 'boost::spirit::traits::clear_mode' is not a class or namespace
./boost/spirit/home/support/iterators/multi_pass.hpp: In member function 'void boost::spirit::multi_pass<T, Policies>::clear_queue(boost::spirit::traits::clear_mode)':
./boost/spirit/home/support/iterators/multi_pass.hpp:135: error: 'boost::spirit::traits::clear_mode' is not a class or namespace
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/wave/build/gcc-4.4.1/release/threading-multi/instantiate_cpp_exprgrammar.o" "libs/wave/src/instantiate_cpp_exprgrammar.cpp"
...failed gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.4.1/release/threading-multi/instantiate_cpp_exprgrammar.o...
[....]
...failed updating 16 targets...
>Fix:
Using 'make build-env', then cutting and pasting the g++ command lines
from the trace output (as shown above) adding the '-std=c++0x', exiting
the build-env and doing a 'make' witch now completes successfully.
Sorry I don't know enough about bjam to come up with a better fix!
--
Steven
>Release-Note:
>Audit-Trail:
From: Tim Zingelman <tez@netbsd.org>
To: Steven Drake <sdrake@xnet.co.nz>
Cc: gnats-bugs@netbsd.org, jmmv@netbsd.org
Subject: Re: pkg/42746 (devel/boost-libs needs an extra flag with gcc-4.4)
Date: Wed, 6 Oct 2010 18:37:11 -0500
So, it looks like the real fix might be to adjust
pkgsrc/mk/compiler/gcc.mk to add something like these lines:
.if !empty(USE_LANGUAGES:Mc++0x)
GCC_REQD+= 4.4
_WRAP_EXTRA_ARGS.CXX+= -std=c++0x
.endif
and then add to the pkgsrc/devel/boost-libs/Makefile this line:
USE_LANGUAGES+= c++0x
Trouble is this then requires at least gcc 4.4 to build boost-libs,
while in reality they build fine with 3.4.6... a bit of chicken and
egg, since we'd like to check CC_VERSION to see which compiler version
we have and then if we have gcc-4.4+ add the USE_LANGUAGES+= c++0x...
but it is not clear if there is a clean way to do that since
mk/compiler.mk sets CC_VERSION and so it can't also later act on
USE_LANGUAGES.
A short term work around is to simply add:
.if !empty(CC_VERSION:Mgcc-4.4.*)
_WRAP_EXTRA_ARGS.CXX+= -std=c++0x
.endif
to the pkgsrc/devel/boost-libs/Makefile but I think this should not be
added to the cvs repo because the _WRAP_EXTRA_ARGS.CXX is likely
intended to be internal to pkgsrc/mk/...
Can anyone else comment on this?
(see also http://gnats.netbsd.org/43465 which may or may not be related)
From: Steven Drake <sbd@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/42746 (devel/boost-libs needs an extra flag with gcc-4.4)
Date: Fri, 8 Oct 2010 10:51:38 +1300 (NZDT)
On Wed, 6 Oct 2010, Tim Zingelman wrote:
> So, it looks like the real fix might be to adjust
> pkgsrc/mk/compiler/gcc.mk to add something like these lines:
>
> .if !empty(USE_LANGUAGES:Mc++0x)
> GCC_REQD+= 4.4
> _WRAP_EXTRA_ARGS.CXX+= -std=c++0x
> .endif
> and then add to the pkgsrc/devel/boost-libs/Makefile this line:
> USE_LANGUAGES+= c++0x
>
> Trouble is this then requires at least gcc 4.4 to build boost-libs,
> while in reality they build fine with 3.4.6... a bit of chicken and
> egg, since we'd like to check CC_VERSION to see which compiler version
> we have and then if we have gcc-4.4+ add the USE_LANGUAGES+= c++0x...
> but it is not clear if there is a clean way to do that since
> mk/compiler.mk sets CC_VERSION and so it can't also later act on
> USE_LANGUAGES.
How about the following patch:
===================================================================
RCS file: /srv/NetBSD-cvs/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.106
diff -u -p -r1.106 gcc.mk
--- compiler/gcc.mk 30 Jul 2010 07:58:59 -0000 1.106
+++ compiler/gcc.mk 7 Oct 2010 21:48:38 -0000
@@ -185,6 +185,9 @@ _NEED_GCC34= yes
.endfor
_NEED_GCC44?= no
.for _pattern_ in ${_GCC44_PATTERNS}
+. if !empty(_GCC_VERSION:M${_pattern_})
+_GCC44= yes
+. endif
. if !empty(_GCC_REQD:M${_pattern_})
_NEED_GCC44= yes
. endif
@@ -213,6 +216,9 @@ _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lan
.if !empty(USE_LANGUAGES:Mc99)
_WRAP_EXTRA_ARGS.CC+= -std=gnu99
.endif
+.if !empty(USE_LANGUAGES:Mc++0x) && defined(_GCC44)
+_WRAP_EXTRA_ARGS.CXX+= -std=c++0x
+.endif
--
Steven
From: Steven Drake <sbd@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/42746 (devel/boost-libs needs an extra flag with gcc-4.4)
Date: Fri, 8 Oct 2010 10:58:40 +1300 (NZDT)
Now some files need -fno-strict-aliasing as well so with so digging I've
found that can be fixed by adding the following to the Makefile:
BJAM_BUILD+= cxxflags=-fno-strict-aliasing
--
Steven
From: "Adam Ciarcinski" <adam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42746 CVS commit: pkgsrc/devel/boost-jam
Date: Wed, 30 Mar 2011 08:58:57 +0000
Module Name: pkgsrc
Committed By: adam
Date: Wed Mar 30 08:58:57 UTC 2011
Modified Files:
pkgsrc/devel/boost-jam: bjam.mk
Log Message:
Add -std=c++0x to CXXFLAGS; fix for PR#42746
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/boost-jam/bjam.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: PR/42746 CVS commit: pkgsrc/devel/boost-jam
Date: Wed, 30 Mar 2011 20:27:09 +0900
On Wed, 30 Mar 2011 18:00:10 +0900, Adam Ciarcinski <adam@netbsd.org> wrote:
> Log Message:
> Add -std=c++0x to CXXFLAGS; fix for PR#42746
It break build with C++ compiler lacking -std=c++0x support.
For example, gcc-4.1.3 on NetBSD-5.1.
It should be conditionally.
From: "Adam Ciarcinski" <adam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42746 CVS commit: pkgsrc/devel/boost-jam
Date: Thu, 31 Mar 2011 06:07:19 +0000
Module Name: pkgsrc
Committed By: adam
Date: Thu Mar 31 06:07:19 UTC 2011
Modified Files:
pkgsrc/devel/boost-jam: bjam.mk
Log Message:
Restrict -std=c++0x to GCC 4.4 and above; fix for PR#42746
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/devel/boost-jam/bjam.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: adam@NetBSD.org
State-Changed-When: Mon, 04 Apr 2011 06:25:40 +0000
State-Changed-Why:
This seems to be fixed.
>Unformatted:
(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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.