Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 17:19:32 GMT
From:      Dan McGregor <dan.mcgregor@usask.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/182162: Fluxbox fails to compile with libc++
Message-ID:  <201309161719.r8GHJWbB098440@oldred.freebsd.org>
Resent-Message-ID: <201309161720.r8GHK1rO027943@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182162
>Category:       ports
>Synopsis:       Fluxbox fails to compile with libc++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 16 17:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Dan McGregor
>Release:        10-CURRENT
>Organization:
>Environment:
FreeBSD shadrach.dyndns.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r255453: Tue Sep 10 15:39:55 CST 2013     dan@shadrach.dyndns.org:/usr/obj/tank/src10/sys/SHADRACH  amd64

>Description:
x11-wm/fluxbox fails to compile with libc++ in 10-CURRENT. The error message from the build is:

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include  -O2 -pipe -march=bdver1 -fno-strict-aliasing  -I/usr/local/include  -D_THREAD_SAFE -I/usr/local/include/freetype2 -I/usr/local/include   -MT fluxbox.o -MD -MP -MF .deps/fluxbox.Tpo -c -o fluxbox.o fluxbox.cc
In file included from fluxbox.cc:25:
In file included from ./fluxbox.hh:29:
In file included from ./FbTk/Resource.hh:30:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:18:
In file included from /usr/include/c++/v1/mutex:177:
/usr/include/c++/v1/functional:684:13: error: no matching constructor for initialization of 'binder2nd<std::__1::equal_to<WinClient *> >'
    {return binder2nd<__Operation>(__op, __x);}
            ^                      ~~~~~~~~~
fluxbox.cc:1362:25: note: in instantiation of function template specialization 'std::__1::bind2nd<std::__1::equal_to<WinClient *>, const WinClient *>' requested here
                Compose(bind2nd(equal_to<WinClient *>(), client),
                        ^
/usr/include/c++/v1/functional:670:5: note: candidate constructor not viable: 2nd argument ('const WinClient *const') would lose const qualifier
    binder2nd(const __Operation& __x, const typename __Operation::second_argument_type __y)
    ^
/usr/include/c++/v1/functional:661:24: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
class _LIBCPP_TYPE_VIS binder2nd
                       ^
1 error generated.

>How-To-Repeat:
Simply try to compile x11-wm on 10-CURRENT.
>Fix:
Change the function Fluxbox::validateClient to take a WinClient * instead of a const WinClient *.  Patch attached.

Patch attached with submission follows:

diff -u -t -u src/fluxbox.cc.orig src/fluxbox.cc
--- src/fluxbox.cc.orig	2013-09-16 10:51:30.000000000 -0600
+++ src/fluxbox.cc	2013-09-16 10:49:18.000000000 -0600
@@ -1355,7 +1355,7 @@
         FocusControl::setFocusedWindow(0);
 }
 
-bool Fluxbox::validateClient(const WinClient *client) const {
+bool Fluxbox::validateClient(WinClient *client) const {
     WinClientMap::const_iterator it =
         find_if(m_window_search.begin(),
                 m_window_search.end(),
diff -u -t -u src/fluxbox.hh.orig src/fluxbox.hh
--- src/fluxbox.hh.orig	2013-09-16 10:51:30.000000000 -0600
+++ src/fluxbox.hh	2013-09-16 10:49:18.000000000 -0600
@@ -88,7 +88,7 @@
     /// main event loop
     void eventLoop();
     bool validateWindow(Window win) const;
-    bool validateClient(const WinClient *client) const;
+    bool validateClient(WinClient *client) const;
 
     void grab();
     void ungrab();


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309161719.r8GHJWbB098440>