NetBSD Problem Report #45802

From www@NetBSD.org  Mon Jan  9 04:52:24 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 6114F63B9F6
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  9 Jan 2012 04:52:24 +0000 (UTC)
Message-Id: <20120109045223.381A363B8C3@www.NetBSD.org>
Date: Mon,  9 Jan 2012 04:52:23 +0000 (UTC)
From: noud4@home.nl
Reply-To: noud4@home.nl
To: gnats-bugs@NetBSD.org
Subject: meta-pkgs/boost, update to 1.48 breaks games/wesnoth and possible others
X-Send-Pr-Version: www-1.0

>Number:         45802
>Category:       pkg
>Synopsis:       meta-pkgs/boost, update to 1.48 breaks games/wesnoth and possible others
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    adam
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 09 04:55:00 +0000 2012
>Closed-Date:    Mon Apr 09 07:18:51 +0000 2012
>Last-Modified:  Mon Apr 09 07:18:51 +0000 2012
>Originator:     B.ICT A.P. deBROUWER Jr.
>Release:        5.99.59
>Organization:
-none-
>Environment:
NetBSD 10.0.2.17 5.99.59 NetBSD 5.99.59 (MONOLITHIC) #0: Tue Dec 27 01:19:12 UTC 2011  builds@b8.netbsd.org:/home/builds/ab/HEAD/i386/201112261820Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/MONOLITHIC i386
>Description:
the latest boost update from 1.47.0 to 1.48.0 breaks games/wesnoth.
upstream boost is aware but no release yet.
https://svn.boost.org/trac/boost/ticket/6131
https://svn.boost.org/trac/boost/changeset/75540

games/wesnoth build will break like:

if [ "" = "" ] || [ "" = "exported" ]; then echo '' >/tmp/westemp$$;  else echo '#define REVISION    ""' >/tmp/westemp$$; fi; if cmp -s revision.hpp /tmp/westemp$$ 2>/dev/null; then :; else cp /tmp/westemp$$ revision.hpp; fi;  if [ -e /tmp/westemp$$ ]; then rm /tmp/westemp$$; fi
c++ -DHAVE_CONFIG_H -I. -I..    -I/usr/include -I/usr/pkg/include/SDL -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/include -I/usr/pkg/include   -pthread -D_REENTRANT -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/cairo -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/pixman-1 -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libpng15   -I/usr/pkg/include -DHAVE_REVISION -I../intl -I../intl -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE  -DWESNOTH_PATH=\"/usr/pkg/share/wesnoth\"  -DLOCALEDIR=\"translations\" -DHAS_RELATIVE_LOCALEDIR=1 -DFIFODIR=\"/usr/pkg/var/run/wesnothd\"  -DWESNOTH_PREFIX=\"/usr/pkg\" -Wno-unused-parameter -Wno-strict-aliasing -O2 -W -Wall -ansi -O2 -pthread -I/usr/include -I/usr/pkg/include/SDL -I/usr/pkg/include -I/usr/pkg/include/freetype2 -DDISABLE_POOL_ALLOC -DOLD_FRIBIDI -I/usr/pkg/include/fribidi   -D_X11     -I/usr/pkg/include -c -o language.o language.cpp
In file included from language.cpp:18:0:
foreach.hpp:6:17: error: 'boost::BOOST_FOREACH' has not been declared
*** Error code 1

>How-To-Repeat:
cd pkgsrc/games/wesnoth && make
>Fix:
conform https://svn.boost.org/trac/boost/changeset/75540:

$NetBSD$

https://svn.boost.org/trac/boost/ticket/6131

--- boost/foreach.hpp.orig	2012-01-09 03:15:22.000000000 +0000
+++ boost/foreach.hpp	2012-01-09 03:16:51.000000000 +0000
@@ -165,7 +165,7 @@
 //   this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy
 //   at the global namespace for your type.
 template<typename T>
-inline boost::foreach::is_lightweight_proxy<T> *
+inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
 boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }

 template<typename T>
@@ -190,7 +190,7 @@
 //   this one works on legacy compilers. Overload boost_foreach_is_noncopyable
 //   at the global namespace for your type.
 template<typename T>
-inline boost::foreach::is_noncopyable<T> *
+inline boost::BOOST_FOREACH::is_noncopyable<T> *
 boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }

 namespace boost

$NetBSD$

--- boost/foreach_fwd.hpp.orig	2012-01-09 03:15:43.000000000 +0000
+++ boost/foreach_fwd.hpp	2012-01-09 03:25:32.000000000 +0000
@@ -14,6 +14,8 @@
 #ifndef BOOST_FOREACH_FWD_HPP
 #define BOOST_FOREACH_FWD_HPP

+#include <utility> // for std::pair
+
 // This must be at global scope, hence the uglified name
 enum boost_foreach_argument_dependent_lookup_hack
 {
@@ -25,6 +27,9 @@

 namespace foreach
 {
+    template<typename T>
+    std::pair<T, T> in_range(T begin, T end);
+
     ///////////////////////////////////////////////////////////////////////////////
     // boost::foreach::tag
     //
@@ -46,6 +51,24 @@

 } // namespace foreach

-} // namespace boost
+// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131 
+namespace BOOST_FOREACH 
+{ 
+   using foreach::in_range; 
+   using foreach::tag; 
+ 
+   template<typename T> 
+   struct is_lightweight_proxy 
+     : foreach::is_lightweight_proxy<T> 
+   {}; 
+ 
+   template<typename T> 
+   struct is_noncopyable 
+     : foreach::is_noncopyable<T> 
+   {}; 
+  
+} // namespace BOOST_FOREACH 

+} // namespace boost
+ 
 #endif

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 09 Jan 2012 05:00:12 +0000
Responsible-Changed-Why:
Over to updater.


From: "Adam Ciarcinski" <adam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45802 CVS commit: pkgsrc
Date: Mon, 9 Jan 2012 16:33:14 +0000

 Module Name:	pkgsrc
 Committed By:	adam
 Date:		Mon Jan  9 16:33:14 UTC 2012

 Modified Files:
 	pkgsrc/devel/boost-headers: Makefile
 	pkgsrc/meta-pkgs/boost: distinfo
 Added Files:
 	pkgsrc/meta-pkgs/boost/patches: patch-boost_foreach.hpp
 	    patch-boost_foreach_fwd.hpp

 Log Message:
 Fix for boost::foreach, PR#45802


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/boost-headers/Makefile
 cvs rdiff -u -r1.38 -r1.39 pkgsrc/meta-pkgs/boost/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/meta-pkgs/boost/patches/patch-boost_foreach.hpp \
     pkgsrc/meta-pkgs/boost/patches/patch-boost_foreach_fwd.hpp

 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: dholland@NetBSD.org
State-Changed-When: Mon, 09 Apr 2012 07:18:51 +0000
State-Changed-Why:
fixed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.