Date: Mon, 28 Apr 2014 22:38:55 -0400 From: Geoff Speicher <geoff@sea-incorporated.com> To: freebsd-ports@freebsd.org Subject: USES=compiler:c++11-lib on FreeBSD 8.4 Message-ID: <CAFMeXObeWJUZ1fhA35GpT8U4w3QimSRO1F7AZ2VhtpQ=Jor3=w@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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 <type_traits> #include <string> 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 <type_traits> ^ 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMeXObeWJUZ1fhA35GpT8U4w3QimSRO1F7AZ2VhtpQ=Jor3=w>