From owner-freebsd-ports@FreeBSD.ORG Mon May 13 18:57:22 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3E845201 for ; Mon, 13 May 2013 18:57:22 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id A299C20D for ; Mon, 13 May 2013 18:57:20 +0000 (UTC) Received: (qmail 51520 invoked by uid 89); 13 May 2013 18:50:32 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@93.215.182.9) by mail.grem.de with ESMTPA; 13 May 2013 18:50:32 -0000 Date: Mon, 13 May 2013 20:50:32 +0200 From: Michael Gmelin To: freebsd-ports@freebsd.org Subject: Re: Adding a C++11 based port Message-ID: <20130513205032.18b84039@bsd64.grem.de> In-Reply-To: References: X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 18:57:22 -0000 On Mon, 13 May 2013 17:14:38 +0200 David Demelier wrote: > Hello dear, > > I plan to release an application I wrote very soon. If possible I want > to add a port for it. One problem is that I've used C++11 and this is > part of system only if users have compiled world with the new C++ > stack. > > Should I wait until 9.2-RELEASE before requesting that new port? Or is > C++11 only for FreeBSD 10? Hi David, under 9.1-RELEASE you can build ports using C++11, assuming the world has been built using Clang and WITH_LIBCPLUSCPLUS set. All our machines are set up like this, but this is not common practice yet. So you could get the port in and make it fail in these setups. Or alternatively make it depend on some recent GCC that brings its own libstdc++ (I'm not certain if that's possible at this point). If you want it to work for everyone, waiting for 10 might be a better option after all. I spent quite some time making our systems work with clang in C++11 mode and linked against libc++ (which can be quite a PITA). Therefore it would be interesting to know if there is some kind of strategy for the ports tree (C++14 is almost ready too). In my experience mixing libc++ and libstdc++ is not advisable, neither is mixing -std=c++11 and -std=c++98 [actually not possible]. Some support from the ports infrastructure would be really useful. I would like to see flags like "WITH_CPLUSPLUS11" and "WITH_LIBCPP" possible in ports and available as global knobs, to make sure one doesn't end up with a system that got mixed up. I found a couple of ports (e.g. using libtool), which end up liked against libstdc++, regardless of what's in make.conf. Examples are: textproc/aspell, devel/boost-libs, databases/db42, print/teTeX-base, textproc/xerces-c3 and many more. So some better infrastructure support, that could also be checked automatically in a build cluster, would be very welcome. -- Michael Gmelin