From nobody@FreeBSD.org  Mon Sep 30 21:13:58 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 0C7964E4
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 30 Sep 2013 21:13:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id EDA13260E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 30 Sep 2013 21:13:57 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8ULDveZ062429
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 30 Sep 2013 21:13:57 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8ULDvJV062422;
	Mon, 30 Sep 2013 21:13:57 GMT
	(envelope-from nobody)
Message-Id: <201309302113.r8ULDvJV062422@oldred.freebsd.org>
Date: Mon, 30 Sep 2013 21:13:57 GMT
From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: devel/kdesdk4: /usr/include/c++/v1/string:1143:24: error: union member '__lx' has a non-trivial constructor
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182527
>Category:       ports
>Synopsis:       devel/kdesdk4: /usr/include/c++/v1/string:1143:24: error: union member '__lx' has a non-trivial constructor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 30 21:20:00 UTC 2013
>Closed-Date:    Tue Nov 05 22:19:22 UTC 2013
>Last-Modified:  Tue Nov  5 22:20:02 UTC 2013
>Originator:     O. Hartmann
>Release:        FreeBSD 10.0-CURRENT/amd64
>Organization:
FU Berlin
>Environment:
FreeBSD 10.0-ALPHA4 #1 r255939: Sun Sep 29 18:39:00 CEST 2013 amd64

BIND free
no libstdc++
no -std=c++ option
>Description:

While the port devel/kdesk4 was able to build after the big libiconv mess (see UPDATING 20130904), I run now on all CURRENT systems into this after I had to recompile most of the ports due to UPDATING 20130929.


[...]
In file included from /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp:20:
In file included from /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/ast.h:23:
In file included from /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/position.h:41:
In file included from /usr/local/include/boost/spirit/include/classic.hpp:11:
In file included from /usr/local/include/boost/spirit/home/classic.hpp:24:
In file included from /usr/local/include/boost/spirit/home/classic/core.hpp:32:
In file included from /usr/local/include/boost/spirit/home/classic/core/primitives/primitives.hpp:16:
In file included from /usr/local/include/boost/spirit/home/classic/core/composite/impl/directives.ipp:16:
In file included from /usr/local/include/boost/spirit/home/classic/core/scanner/skipper.hpp:16:
In file included from /usr/local/include/boost/spirit/home/classic/core/primitives/impl/primitives.ipp:26:
/usr/include/c++/v1/string:1143:24: error: union member '__lx' has a non-trivial constructor
            value_type __lx;

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kde 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Sep 30 21:20:16 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182527 

From: Rod Taylor <rbt@rbt.ca>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: ports/182527: devel/kdesdk4: /usr/include/c /v1/string:1143:24:
 error: union member &#39;__lx&#39; has a non-trivial constructor
Date: Mon, 4 Nov 2013 15:22:12 -0500

 --047d7b624e2ad446a504ea5fab05
 Content-Type: text/plain; charset=UTF-8
 
 A clean install of 10 Beta 2 with an up-to-date ports tree also has this
 compile issue.
 
 In file included from
 /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp:20:
 In file included from
 /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/ast.h:23:
 In file included from
 /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/position.h:41:
 In file included from
 /usr/local/include/boost/spirit/include/classic.hpp:11:
 In file included from /usr/local/include/boost/spirit/home/classic.hpp:24:
 In file included from
 /usr/local/include/boost/spirit/home/classic/core.hpp:32:
 In file included from
 /usr/local/include/boost/spirit/home/classic/core/primitives/primitives.hpp:16:
 In file included from
 /usr/local/include/boost/spirit/home/classic/core/composite/impl/directives.ipp:16:
 In file included from
 /usr/local/include/boost/spirit/home/classic/core/scanner/skipper.hpp:16:
 In file included from
 /usr/local/include/boost/spirit/home/classic/core/primitives/impl/primitives.ipp:26:
 /usr/include/c++/v1/string:1143:24: error: union member '__lx' has a
 non-trivial constructor
             value_type __lx;
                        ^
 
 --047d7b624e2ad446a504ea5fab05
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr">A clean install of 10 Beta 2 with an up-to-date ports tree=
  also has this compile issue.<br><br>In file included from /usr/ports/devel=
 /kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppparser/ast.=
 cpp:20:<br>
 In file included from /usr/ports/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/=
 umbrello/codeimport/kdevcppparser/ast.h:23:<br>In file included from /usr/p=
 orts/devel/kdesdk4/work/kdesdk-4.10.5/umbrello/umbrello/codeimport/kdevcppp=
 arser/position.h:41:<br>
 In file included from /usr/local/include/boost/spirit/include/classic.hpp:1=
 1:<br>In file included from /usr/local/include/boost/spirit/home/classic.hp=
 p:24:<br>In file included from /usr/local/include/boost/spirit/home/classic=
 /core.hpp:32:<br>
 In file included from /usr/local/include/boost/spirit/home/classic/core/pri=
 mitives/primitives.hpp:16:<br>In file included from /usr/local/include/boos=
 t/spirit/home/classic/core/composite/impl/directives.ipp:16:<br>In file inc=
 luded from /usr/local/include/boost/spirit/home/classic/core/scanner/skippe=
 r.hpp:16:<br>
 In file included from /usr/local/include/boost/spirit/home/classic/core/pri=
 mitives/impl/primitives.ipp:26:<br>/usr/include/c++/v1/string:1143:24: erro=
 r: union member &#39;__lx&#39; has a non-trivial constructor<br>=C2=A0=C2=
 =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value_type __lx;<=
 br>
 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
 =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^<br><br></div>
 
 --047d7b624e2ad446a504ea5fab05--
State-Changed-From-To: open->closed 
State-Changed-By: rakuco 
State-Changed-When: Tue Nov 5 22:19:20 UTC 2013 
State-Changed-Why:  
Fixed in r332921. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182527 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182527: commit references a PR
Date: Tue,  5 Nov 2013 22:19:07 +0000 (UTC)

 Author: rakuco
 Date: Tue Nov  5 22:18:59 2013
 New Revision: 332921
 URL: http://svnweb.freebsd.org/changeset/ports/332921
 
 Log:
   Add a patch sent upstream to fix the build with libc++:
   
     http://article.gmane.org/gmane.linux.umbrello.devel/11418
   
   PR:		ports/182527
 
 Added:
   head/devel/kdesdk4/files/
   head/devel/kdesdk4/files/patch-libcxx   (contents, props changed)
 
 Added: head/devel/kdesdk4/files/patch-libcxx
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/devel/kdesdk4/files/patch-libcxx	Tue Nov  5 22:18:59 2013	(r332921)
 @@ -0,0 +1,221 @@
 +commit 6aa61a76e792354ab646849f1dcfeccab7d0063d
 +Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
 +Date:   Sun Nov 3 01:21:49 2013 +0200
 +
 +    kdevcppparser: Always define the `identity' unary function.
 +
 +    _Identity is an internal, libstdc++-specific struct that is not to be relied
 +    upon by external code.
 +
 +    preprocesslexer.cpp used to assume GCC (with libstdc++) and MSVC were the
 +    only compilers available, and defined its own _Identity implementation for
 +    the latter. It breaks things if any other compiler or STL implementation
 +    (such as clang with libc++) is used.
 +
 +    The easiest fix is to just unconditionally define the `identity' unary
 +    function and use it regardless of whether _Identity is defined or not.
 +
 +commit f89f9c6358001619222a4b3c187b5e969b553d0b
 +Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
 +Date:   Sun Nov 3 13:19:56 2013 +0200
 +
 +    kdevcppparser: Replace PositionFilename with a typedef to QString.
 +
 +    The C++ standard (98, 03 and 11) states that std::basic_string is supposed
 +    to work only with POD-like types, which is not the case for QChar.
 +
 +    GCC's libstdc++'s std::basic_string implementation, though, does not use any
 +    features present only in POD types, so the previous behavior of using
 +    std::basic_string<QChar> has worked for most people using Linux, and some
 +    workarounds were present for other compilers such as SunPro CC and MSVC.
 +
 +    Instead of adding yet another workaround to get things working with clang
 +    with libc++, try to fix the problem in a different way by getting rid of the
 +    need for std::basic_string in position.h altogether and using a plain
 +    QString instead.
 +
 +    std::basic_string was used only to store the name of the source file being
 +    processed, which was originally a QString anyway, so we can avoid the
 +    QString -> std::basic_string -> QString conversions, as well as the need to
 +    have a full-fledged PositionFilename class with a toString() method that
 +    performed this conversion.
 +
 +    It also allows us to remove the MSVC/SunPro workarounds from the code and
 +    the build system.
 +--- umbrello/CMakeLists.txt
 ++++ umbrello/CMakeLists.txt
 +@@ -267,37 +267,21 @@ set(libcodeimport_SRCS
 +     codeimport/csharp/csharpimport.cpp
 + )
 + 
 +-if (WIN32 AND NOT MSVC)
 +-    # SunPRO CC have a problem with position.h; we try to put a
 +-    # QChar into a spirit iterator, which, after a bunch of futzing, ends up in
 +-    # the STL string_ref templates, which use
 +-    #
 +-    #     union {
 +-    #        size_type _C_size;    // Number of actual data values stored
 +-    #        _CharT    _C_dummy;   // force the alignment of the first char
 +-    #     } _C_size;               // named to work around an HP aCC 3.30 bug
 +-    #
 +-    # and you can't have a class which requires an initializer in a union.
 +-    #
 +-    add_definitions(-DDISABLE_CPP_IMPORT)
 +-    set(libkdevcppparser_SRCS)
 +-else (WIN32 AND NOT MSVC)
 +-    list(APPEND libcodeimport_SRCS
 +-        codeimport/cppimport.cpp
 +-    )
 +-    set(libkdevcppparser_SRCS
 +-        codeimport/kdevcppparser/ast.cpp
 +-        codeimport/kdevcppparser/driver.cpp
 +-        codeimport/kdevcppparser/errors.cpp
 +-        codeimport/kdevcppparser/lexer.cpp
 +-        codeimport/kdevcppparser/lookup.cpp
 +-        codeimport/kdevcppparser/parser.cpp
 +-        codeimport/kdevcppparser/preprocesslexer.cpp
 +-        codeimport/kdevcppparser/tree_parser.cpp
 +-        codeimport/kdevcppparser/ast_utils.cpp
 +-        codeimport/kdevcppparser/cpptree2uml.cpp
 +-    )
 +-endif(WIN32 AND NOT MSVC)
 ++list(APPEND libcodeimport_SRCS
 ++    codeimport/cppimport.cpp
 ++)
 ++set(libkdevcppparser_SRCS
 ++    codeimport/kdevcppparser/ast.cpp
 ++    codeimport/kdevcppparser/driver.cpp
 ++    codeimport/kdevcppparser/errors.cpp
 ++    codeimport/kdevcppparser/lexer.cpp
 ++    codeimport/kdevcppparser/lookup.cpp
 ++    codeimport/kdevcppparser/parser.cpp
 ++    codeimport/kdevcppparser/preprocesslexer.cpp
 ++    codeimport/kdevcppparser/tree_parser.cpp
 ++    codeimport/kdevcppparser/ast_utils.cpp
 ++    codeimport/kdevcppparser/cpptree2uml.cpp
 ++)
 + 
 + set(libclipboard_SRCS
 +     clipboard/umldragdata.cpp
 +--- umbrello/codeimport/classimport.cpp
 ++++ umbrello/codeimport/classimport.cpp
 +@@ -20,9 +20,7 @@
 + #include "javaimport.h"
 + #include "adaimport.h"
 + #include "pascalimport.h"
 +-#ifndef DISABLE_CPP_IMPORT
 + #include "cppimport.h"
 +-#endif
 + #include "csharpimport.h"
 + #include "codeimpthread.h"
 + 
 +@@ -52,13 +50,8 @@ ClassImport *ClassImport::createImporterByFileExt(const QString &fileName, CodeI
 +         classImporter = new PascalImport(thread);
 +     else if (fileName.endsWith(QLatin1String(".cs")))
 +         classImporter = new CSharpImport(thread);
 +-#ifndef DISABLE_CPP_IMPORT
 +     else
 +         classImporter = new CppImport(thread);  // the default.
 +-#else
 +-    else 
 +-        classImporter = 0;
 +-#endif
 +     return classImporter;
 + }
 + 
 +--- umbrello/codeimport/kdevcppparser/position.h
 ++++ umbrello/codeimport/kdevcppparser/position.h
 +@@ -20,22 +20,6 @@
 + #ifndef POSITION_H
 + #define POSITION_H
 + 
 +-#ifdef _MSC_VER //Q_CC_MSVC isn't defined here
 +-/*
 +-workaround for the following msvc error 
 +-...\Microsoft Visual Studio 8\VC\INCLUDE\xstring(2044) : error C2620: 
 +-    member 'std::basic_string<_Elem>::_Bxty::_Buf ' of union 'std::basic_string<_Elem>::_Bxty' 
 +-    has user-defined constructor or non-trivial default constructor with [  _Elem=QChar]
 +-...\Microsoft Visual Studio 8\VC\INCLUDE\xstring(2046) : see reference to class 
 +-    template instantiation 'std::basic_string<_Elem>::_Bxty' being compiled with [  _Elem=QChar]
 +-..\umbrello\umbrello\codeimport\kdevcppparser\position.h(49) : see reference to class 
 +-    template instantiation 'std::basic_string<_Elem>' being compiled with [  _Elem=QChar]
 +-*/
 +-#define union struct 
 +-#include <xstring>
 +-#undef union 
 +-#endif
 +-
 + #include <limits.h>
 + #include <boost/version.hpp>
 + #include <boost/spirit/include/classic.hpp>
 +@@ -43,34 +27,7 @@ workaround for the following msvc error
 + #include <QChar>
 + #include <QDebug>
 + 
 +-typedef std::basic_string<QChar> PositionFilenameType;
 +-
 +-class PositionFilename : public PositionFilenameType
 +-{
 +-public:
 +-    PositionFilename()
 +-    {
 +-    }
 +-
 +-    explicit PositionFilename(const QString &p) : PositionFilenameType(p.data())
 +-    {
 +-    }
 +-
 +-    QString toString() const
 +-    {
 +-        QString result;
 +-        for(unsigned int i = 0; i < size(); i++)
 +-            result.append(at(i));
 +-        return result;
 +-    }
 +-};
 +-
 +-inline QDebug operator<<(QDebug out, const PositionFilename &p)
 +-{
 +-    out << p.toString();
 +-    return out;
 +-}
 +-
 ++typedef QString PositionFilename;
 + typedef boost::spirit::classic::file_position_base<PositionFilename> PositionType;
 + 
 + class Position : public PositionType
 +--- umbrello/codeimport/kdevcppparser/preprocesslexer.cpp
 ++++ umbrello/codeimport/kdevcppparser/preprocesslexer.cpp
 +@@ -41,13 +41,11 @@
 + 
 + #define PREPROCESSLEXER_DEBUG
 + 
 +-#ifdef Q_CC_MSVC
 + template <class _Tp>
 +-struct _Identity : public std::unary_function<_Tp, _Tp> {
 ++struct identity : public std::unary_function<_Tp, _Tp> {
 +   _Tp& operator()(_Tp& __x) const { return __x; }
 +   const _Tp& operator()(const _Tp& __x) const { return __x; }
 + };
 +-#endif
 + 
 + template <class _Tp>
 + struct tilde : public std::unary_function<_Tp, _Tp> {
 +@@ -593,7 +591,7 @@ void PreprocessLexer::dumpToFile()
 +     if (!d.exists())
 +         d.mkdir(tempPath);
 + 
 +-    QString fileName = tempPath + '/' + currentPosition().file.toString().replace(QRegExp("[/:mn]"), "-");
 ++    QString fileName = tempPath + '/' + currentPosition().file.replace(QRegExp("[/:mn]"), "-");
 +     QFile f(fileName);
 +     if (f.open(QIODevice::WriteOnly | QIODevice::Text)) {
 +         QTextStream out(&f);
 +@@ -839,7 +837,7 @@ int PreprocessLexer::macroPrimary()
 +         if (!l_hit)
 +             result = 0;
 +     } else {
 +-        boost::function < int (int) > l_op = _Identity<int>();
 ++        boost::function < int (int) > l_op = identity<int>();
 +         if (m_source.parse(ch_p('+')
 +                            | ch_p('-')[var(l_op) = std::negate<int>()]
 +                            | ch_p('!')[var(l_op) = std::logical_not<int>()]
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
