Re: codecvt and libc++ on FreeBSD 9.x
On 01 Sep 2016, at 20:39, Ben Laverywrote: ... > In file included from /root/bunnysay/work/bunnysay-1.0/src/BunnySay.cpp:22:0: > /root/bunnysay/work/bunnysay-1.0/src/BunnySay.h:33:19: fatal error: codecvt: > No such file or directory > #include ... > On the submission (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212278) > CPM has said of the issue "Second it seems that codecvt is missing, so it > needs libc++ support" - but I'm not sure how to add this. I've tried adding > the following which I found in multiple threads on the forums, but to no > avail: > > CC=clang > CXX=clang++ > CPP=clang-cpp > WITH_LIBCPLUSPLUS=yes Putting this in your make.conf, then rebuilding world and installing it, will install libc++ headers and libraries into your base system. That is step one. Step two is to add -stdlib=libc++ to your clang command line. On 9.x and earlier, clang uses libstdc++ by default, so you have to actively tell it to use libc++. > I *think* this is because clang is too old on FreeBSD 9.3? FreeBSD 9.3 has clang 3.4.1, which should be new enough, but libc++ is not installed by default. > But I'm not sure if I can/should reference a newer version from ports (and > how to go about this in the proper way), and how to make this apply to > FreeBSD 9.x only as it works fine "as is" on FreeBSD 10. You could make it depend on the devel/libc++ port, as some other ports do. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: codecvt and libc++ on FreeBSD 9.x
On 09/01/16 20:59, Michelle Sullivan wrote: Ben Lavery wrote: On the submission (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212278) CPM has said of the issue "Second it seems that codecvt is missing, so it needs libc++ support" - but I'm not sure how to add this. I've tried adding the following which I found in multiple threads on the forums, but to no avail: CC=clang CXX=clang++ CPP=clang-cpp WITH_LIBCPLUSPLUS=yes I *think* this is because clang is too old on FreeBSD 9.3? But I'm not sure if I can/should reference a newer version from ports (and how to go about this in the proper way), and how to make this apply to FreeBSD 9.x only as it works fine "as is" on FreeBSD 10. Did you go with the base compiler or use the clang in ports? You might want to do that - you can also probably use GCC which is also available in ports. Regards, Michelle Yes I did am using the base compiler, I know I can do a "BUILD_DEPENDS" to ensure a port (e.g. lang/clang35 would do, I think) is available at build time, but I'm unsure: a) if that will indeed solve my issue b) how to ensure this doesn't affect FreeBSD 10 and above builds - if there some kind of ".if FreeBSd 9"? c) how to ensure cmake uses the ports version of clang rather than base - would I modify the variables I mentioned in my original post? Many thanks, Ben ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
codecvt and libc++ on FreeBSD 9.x
Good evening all, Fairly new to porting and I've tried porting what I thought would be a trivial program, bunnysay. Written in C++ I've patched the code to work on FreeBSD 10, however it doesn't work on FreeBSD 9 because I've included codecvt. It fails with the following error and I'm feeling a little out of my depth: ===> Building for bunnysay-1.0 [ 50%] Building CXX object CMakeFiles/bunnysay.dir/src/BunnySay.cpp.o In file included from /root/bunnysay/work/bunnysay-1.0/src/BunnySay.cpp:22:0: /root/bunnysay/work/bunnysay-1.0/src/BunnySay.h:33:19: fatal error: codecvt: No such file or directory #include ^ compilation terminated. *** [CMakeFiles/bunnysay.dir/src/BunnySay.cpp.o] Error code 1 1 error *** [CMakeFiles/bunnysay.dir/all] Error code 2 1 error *** [all] Error code 2 1 error *** [do-build] Error code 2 Stop in /root/bunnysay. On the submission (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212278) CPM has said of the issue "Second it seems that codecvt is missing, so it needs libc++ support" - but I'm not sure how to add this. I've tried adding the following which I found in multiple threads on the forums, but to no avail: CC=clang CXX=clang++ CPP=clang-cpp WITH_LIBCPLUSPLUS=yes I *think* this is because clang is too old on FreeBSD 9.3? But I'm not sure if I can/should reference a newer version from ports (and how to go about this in the proper way), and how to make this apply to FreeBSD 9.x only as it works fine "as is" on FreeBSD 10. Many thanks for any advice and words of wisdom. Ben ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"