From owner-freebsd-ports@FreeBSD.ORG Tue Apr 29 02:39:24 2014 Return-Path: Delivered-To: freebsd-ports@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 597BEE67 for ; Tue, 29 Apr 2014 02:39:24 +0000 (UTC) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 193C31BA for ; Tue, 29 Apr 2014 02:39:23 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id oy12so9033453veb.4 for ; Mon, 28 Apr 2014 19:39:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=DNxvTCxIG6+3akNzZUrbGopmLbG277li7MWkpTU67d0=; b=gAEFdm24JxXDcPg+xCO3fFmLgGJA4EvCfskP8zWQNVooBUrQnlgf6nTHNyL3d0dZoT 4kjmBba/QFItenSTjb0zcTHWZ3kwoacuKar5dtK5CmE6L8dZlwxq1q7t7iFtE+iNa3LY fHmbwqjU6aq96DX9WYAfuN+VdyTM0hcCRZuLE1gw6M/ZYdDAZ+dx6mEW1ZgdOoU1mOpV zG2bme1b388eqba/1wMTH/gSuspKOVfxtd3wTMd18Fb4GyGPSEwvBTsGlieBQ1TLnYNm z2puG/tVMoDRpfxDXbJHDoNChyoDT53/Gy2bAuSkVoIjHlKlRC2ZMHiEioejjyjw0D2K a4iA== X-Gm-Message-State: ALoCoQkdwspITNa13YYHmmVGFhubG0pjFMD6shyWW6zc+e+3UdYAPg9IPt4llCyR/AoEbtsR46Te X-Received: by 10.220.190.197 with SMTP id dj5mr26812313vcb.19.1398739156109; Mon, 28 Apr 2014 19:39:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.178.139 with HTTP; Mon, 28 Apr 2014 19:38:55 -0700 (PDT) X-Originating-IP: [71.181.227.126] From: Geoff Speicher Date: Mon, 28 Apr 2014 22:38:55 -0400 Message-ID: Subject: USES=compiler:c++11-lib on FreeBSD 8.4 To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 02:39:24 -0000 Not sure if ports is the right place for this post so apologies in advance if I'm not in the right place. I'm porting an application that requires c++11, and I'm trying to create the port on a FreeBSD 8.4 box. From everything I have read, it appears that c++11 is only supported in 9.1+ when world has been built with the c++11 toolchain. However, the various ports switches such as USES=compiler:c++11-lib don't yield any warnings on 8.4, yet don't seem to work either. Can anyone comment on whether or not this option is supposed to work on 8.4? Taking ports out of the equation for a moment, I can't compile the following c++11 file: // test.cpp #include #include int main() { int number = 10; std::string value; value = std::to_string(number); } // EOF clang++33 fails on a new c++11 include file: $ clang++33 -std=c++11 test.cpp test.cpp:1:10: fatal error: 'type_traits' file not found #include ^ 1 error generated. g++47 at least finds the include file but doesn't appear to define std::to_string as it should: $ g++47 -std=c++11 test.cpp test.cpp: In function 'int main()': test.cpp:7:11: error: 'to_string' is not a member of 'std' I also tried installing devel/libc++ and that fails trying to include xlocale.h, which only appears to exist in 9.1 and later. Am I missing something here or is c++11 simply not supported on 8.4? Assuming the latter, is there a way to automatically make ports fail with a meaningful error message on <9.0 when attempting to use c++11-lang or c++11-lib? Geoff