[LLVMdev] error compiling llvm 2.9/3.2 from source on macosx (possibly stdlibc++ issue)

Herbie Robinson HerbieRobinson at verizon.net
Sat May 10 20:24:01 PDT 2014


I'm stuck on 10.8.5 and got around it by:

1.  Building the most recent stable branch of libc++.  I got a couple of 
errors in the regression tests, but they looked like something obscure 
enough to net affect the compiler and so far, that is panning out.

2.  I ran configure as follows:

../llvm/configure CXXFLAGS="-stdlib=libc++ 
-I/Programming/llvm/libcxx34/test/support 
-I/Programming/llvm/libcxx34/include" 
LDFLAGS="-L/Programming/llvm/libcxx34/lib"

I don't remember what the libcxx34/test/support dir is about.  I 
probably cut and pasted the search paths from one of the LLVM docs.  Or 
maybe it's only need to run the tests.  It takes a long time to build, 
you do want to use the -j option with make.

I believe this completely avoids using anything from GCC (except maybe 
the assembler).

I used the stable 3.4 branch and the regression tests all appear to pass 
(there is a lot of output; so, I could have missed something).

Caveat:  Outside of running the regressions, I haven't executed any 
code, yet.  I'm actually porting LLVM to the Stratus VOS operating 
system (in my spare time, this isn't an official project).  I won't 
really start testing things until I get some basic ABI tweaks done.

According to the online docs, you can also get it to work by installing 
a recent GCC compiler suite.  That seemed like a lot more work for me.  
Especially because that would probably be a nightmare on the new OS, 
because the GCC that's ported over there is way to old to build LLVM and 
there is no practical way to upgrade it.

On 5/10/14 7:56 AM, Andras Csizmadia wrote:
> Hello,
>
> I've some exceptions which I would like to solve to build LLVM+Clang 
> from source on MacOSX 10.8+.
>
> "
> /Users/travis/build/vpmedia/crossbridge/llvm-2.9/lib/Transforms/Utils/CodeExtractor.cpp:728:28: 
> 
> error:  no matching constructor for initialization of 
> 'std::vector<BasicBlock *>' std::vector<BasicBlock*> 
> Succs(succ_begin(codeReplacer),
> "
>
> I understand that it is some kind of C++ library issue (stdlibc++ vs. 
> c++v1)  but not exactly how to solve it. (Passing -stdlib=libstdc++  
> as CXX flag does not solve this).
>
> You can check out a related github ticket here:
> https://github.com/Homebrew/homebrew-versions/issues/384
>
> Also a Travis CI build:
> https://s3.amazonaws.com/archive.travis-ci.org/jobs/24856999/log.txt
>
> I've googled for solution but I've only found partial informations 
> regarding this.
>
> Any tips what should I do to easily fix these problems without 
> modifying the LLVM source code?
>
>
> Thanks!
> Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140510/19664042/attachment.html>


More information about the llvm-dev mailing list