From owner-freebsd-current@FreeBSD.ORG Tue Nov 12 21:19:58 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51275291; Tue, 12 Nov 2013 21:19:58 +0000 (UTC) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id 7FFA8278B; Tue, 12 Nov 2013 21:19:57 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmMGAJiaglJbsLPN/2dsb2JhbABaDoJ5wCGBKRd0giUBAQU6HCMQCw4KCSUPKh4GExuHagG/Q49fB4QxA5gOkguCZ0A7 Received: from 205.179-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.179.205]) by relay.skynet.be with ESMTP; 12 Nov 2013 22:19:49 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id rACLJlpd012854; Tue, 12 Nov 2013 22:19:48 +0100 (CET) (envelope-from tijl@coosemans.org) Date: Tue, 12 Nov 2013 22:19:46 +0100 From: Tijl Coosemans To: Steve Kargl Subject: Re: Are clang++ and libc++ compatible? Message-ID: <20131112221946.78602db0@kalimero.tijl.coosemans.org> In-Reply-To: <20131112201922.GA4330@troutmask.apl.washington.edu> References: <20131112163219.GA2834@troutmask.apl.washington.edu> <77CB2B92-216A-4C80-B033-7E582B5F0DFC@FreeBSD.org> <20131112165422.GA2939@troutmask.apl.washington.edu> <20131112175556.GA3319@troutmask.apl.washington.edu> <20131112201922.GA4330@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: David Chisnall , freebsd-current@FreeBSD.org, Dimitry Andric X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 21:19:58 -0000 On Tue, 12 Nov 2013 12:19:22 -0800 Steve Kargl wrote: > On Tue, Nov 12, 2013 at 09:55:56AM -0800, Steve Kargl wrote: >> On Tue, Nov 12, 2013 at 06:37:39PM +0100, Dimitry Andric wrote: >>> On 12 Nov 2013, at 17:54, Steve Kargl wrote: >>>> >>>> struct Entry { >>>> time_t date; >>>> Severity severity; >>>> std::deque messages; >>>> std::string message; >>>> bool is_child; >>>> Entry() : is_child(false) { } >>>> }; >>> >>> I think the problem is that the code tries to use std::deque as a >>> member of struct Entry, before it is completely defined. This is not >>> allowed by the standard, although some libraries (e.g. GNU libstdc++) >>> apparently permit it for some container types. >>> >>> You could try to work around it with -fdelayed-template-parsing, but I >>> am not sure if it will help. Alternatively, compile the code with >>> libstdc++, or rewrite it to conform. :-) >> >> Thanks for the suggestions. -fdelayed-template-parsing did not >> help. (Un)fortunately, I know very little about C++, so rewriting >> the code is not option for me. I guess I'll add a USE_GCC to the >> port's Makefile to if it will build. > > Sigh. Adding USE_GCC isn't the solution. There's a similar problem with graphics/blender. There's a class TreeElement which links to its parent TreeElement like this: std::map::const_iterator parent; Works with libstdc++, fails with libc++. If the standard doesn't specify this it would still be a very convenient extension. > % pan > Segmentation fault (core dumped) > % ldd /usr/local/bin/pan | grep ++ > libstdc++.so.6 => /usr/local/lib/gcc46/libstdc++.so.6 (0x3c52bf000) > libc++.so.1 => /usr/lib/libc++.so.1 (0x3c81ea000) > > This can't be good. And, unfortunately, testing math/octave shows > no better :( > > % octave > Segmentation fault (core dumped) > % ldd /usr/local/bin/octave-3.6.4 | grep ++ > libstdc++.so.6 => /usr/local/lib/gcc46/libstdc++.so.6 (0x3c92ec000) > libc++.so.1 => /usr/lib/libc++.so.1 (0x3c9801000) This could be because you enabled the OPENMP option in math/fftw3.