Date: Mon, 13 May 2013 20:50:32 +0200 From: Michael Gmelin <freebsd@grem.de> To: freebsd-ports@freebsd.org Subject: Re: Adding a C++11 based port Message-ID: <20130513205032.18b84039@bsd64.grem.de> In-Reply-To: <CAO%2BPfDfLVzP5KPcsPzQWEfDa4EHomCjLGz9WUob6Y54AXkZVJg@mail.gmail.com> References: <CAO%2BPfDfLVzP5KPcsPzQWEfDa4EHomCjLGz9WUob6Y54AXkZVJg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 May 2013 17:14:38 +0200 David Demelier <demelier.david@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130513205032.18b84039>