./configure CXX=~/clang-3.3/bin/clang++checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... build-aux/install-sh -c -dchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking whether we are using the GNU C++ compiler... nochecking whether ~/clang-3.3/bin/clang++ accepts -g... nochecking dependency style of ~/clang-3.3/bin/clang++... nonechecking whether ~/clang-3.3/bin/clang++ supports C++11 features by default... nochecking whether ~/clang-3.3/bin/clang++ supports C++11 features with -std=c++11... nochecking whether ~/clang-3.3/bin/clang++ supports C++11 features with -std=c++0x... noconfigure: error: *** A compiler with support for C++11 language features is required.
brew install llvm --with-clang --with-asan --all-targets --rtti --universal --with-python
....
./configure CXX=/usr/local/bin/clang++checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... build-aux/install-sh -c -dchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking whether we are using the GNU C++ compiler... yeschecking whether /usr/local/opt/llvm/bin/clang accepts -g... yeschecking dependency style of /usr/local/opt/llvm/bin/clang... gcc3checking whether /usr/local/opt/llvm/bin/clang supports C++11 features by default... nochecking whether /usr/local/opt/llvm/bin/clang supports C++11 features with -std=c++11... yeschecking whether /usr/local/opt/llvm/bin/clang -std=c++11 supports C++11 library features by default... nochecking whether /usr/local/opt/llvm/bin/clang -std=c++11 supports C++11 library features with -stdlib=libc++... noconfigure: error: *** A C++ library support for C++11 features is required.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
Visit this group at http://groups.google.com/group/capnproto.
Unfortunately, I get the same error if I use the full path to the copy in my home directory. Perhaps there's something different in our environment that has this working for you?
It appears the homebrew installed llvm does not (yet) pass the --enable-libcpp flag to configure:Hopefully that'll be resolved soon, making everything a lot easier for OSX devs.In the meantime, I'll just use a GNU/Linux vm,
and continue writing my Ruby c extension there :).
I suspect you are now getting a slightly different error that happens to look similar. :) This line makes it pretty clear that your clang binary wasn't working at all:
checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... build-aux/install-sh -c -dchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking whether we are using the GNU C++ compiler... yes
checking whether /Users/charlesstrahan/clang-3.3/bin/clang++ accepts -g... yeschecking dependency style of /Users/charlesstrahan/clang-3.3/bin/clang++... gcc3checking whether /Users/charlesstrahan/clang-3.3/bin/clang++ supports C++11 features by default... nochecking whether /Users/charlesstrahan/clang-3.3/bin/clang++ supports C++11 features with -std=c++11... yeschecking whether /Users/charlesstrahan/clang-3.3/bin/clang++ -std=c++11 supports C++11 library features by default... nochecking whether /Users/charlesstrahan/clang-3.3/bin/clang++ -std=c++11 supports C++11 library features with -stdlib=libc++... no
configure: error: *** A C++ library support for C++11 features is required.
λ ln -s /usr/lib/c++ $HOME/clang-3.3/lib/c++λ ls -la $HOME/clang-3.3/lib/ | grep c++lrwxr-xr-x 1 charlesstrahan staff 12 Aug 1 11:36 c++ -> /usr/lib/c++
ln -s /usr/lib/c++ ~/clang-3.2/lib/c++
checking dependency style of /Users/duff/Source/clang-3.2/bin/clang++... gcc3
checking whether /Users/duff/Source/clang-3.2/bin/clang++ supports C++11 features by default... no
checking whether /Users/duff/Source/clang-3.2/bin/clang++ supports C++11 features with -std=gnu++11... yes
checking whether /Users/duff/Source/clang-3.2/bin/clang++ -std=gnu++11 supports C++11 library features by default... no
checking whether /Users/duff/Source/clang-3.2/bin/clang++ -std=gnu++11 supports C++11 library features with -stdlib=libc++... no
I would appreciate exact step-by-step as I can’t build this on OS X.
The steps posted show:
ln -s /usr/lib/c++ ~/clang-3.2/lib/c++
uctions (also, /usr/lib/c++ already exist on my system).
I also tried with clang from MacPorts and gcc 4.8, but both of those failed as well.
Btw: trying to build without creating the above symlink gives me the following failure from ./configure:
checking dependency style of /Users/duff/Source/clang-3.2/bin/clang++... gcc3
checking whether /Users/duff/Source/clang-3.2/bin/clang++ supports C++11 features by default... no
checking whether /Users/duff/Source/clang-3.2/bin/clang++ supports C++11 features with -std=gnu++11... yes
checking whether /Users/duff/Source/clang-3.2/bin/clang++ -std=gnu++11 supports C++11 library features by default... no
checking whether /Users/duff/Source/clang-3.2/bin/clang++ -std=gnu++11 supports C++11 library features with -stdlib=libc++... no
On 16 Aug 2013, at 12:50, Kenton Varda wrote:
[…] /usr/lib/c++ is supposed to already exist. The command makes
~/clang-3.2/lib/c++ point to /usr/lib/c++.
Ah, I had it the other way around. The text says “Xcode’s libstdc++ […] is too old” so I was expecting to find a newer libc++ in clang-3.2 that I had to make /usr/lib/c++ point to.
For clang 3.2 and 3.4-svn I got a compiler stack dump indicating a bug in clang (or a problem with my build of clang).
Anyway, I got it working using the clang 3.2 binary distro, after creating the proper symbolic link.
Undefined symbols for architecture x86_64:
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
std::__1::vector<kj::ArrayPtr<capnp::word const>, std::__1::allocator<kj::ArrayPtr<capnp::word const> > >::__append(unsigned long) in arena.o
void std::__1::vector<kj::Own<capnp::_::SegmentBuilder>, std::__1::allocator<kj::Own<capnp::_::SegmentBuilder> > >::__push_back_slow_path<kj::Own<capnp::_::SegmentBuilder> >(kj::Own<capnp::_::SegmentBuilder>&&) in arena.o
"std::__1::__next_prime(unsigned long)", referenced from:
std::__1::__hash_table<std::__1::pair<unsigned int, kj::Own<capnp::_::SegmentReader> >, std::__1::__unordered_map_hasher<unsigned int, kj::Own<capnp::_::SegmentReader>, std::__1::hash<unsigned int>, true>, std::__1::__unordered_map_equal<unsigned int, kj::Own<capnp::_::SegmentReader>, std::__1::equal_to<unsigned int>, true>, std::__1::allocator<std::__1::pair<unsigned int, kj::Own<capnp::_::SegmentReader> > > >::rehash(unsigned long) in arena.o
ld: symbol(s) not found for architecture x86_64
g++ -std=c++11 -I ~/usr/include ~/usr/lib/libcapnp.a main.cpp test.capnp.c++
Thanks. Also can you provide a quick example of how to create an object using an existing buffer that I supply? For example, one that is in the stack rather than in the heap? FlatMessageBuilder I cannot get to work... Thx!