[cfe-dev] clang bootstrap broken on darwin10

Jack Howarth howarth at bromo.med.uc.edu
Sun Mar 6 10:53:50 PST 2011


On Sun, Mar 06, 2011 at 10:34:34AM -0800, Chris Lattner wrote:
> 
> On Mar 5, 2011, at 11:26 AM, Jack Howarth wrote:
> 
> >   I found the origin of the build failure. It is the habitually
> > leaky buildroot in llvm's projects. I have constantly had to deinstall
> > the prior copies of llvm/clang/llvm-gcc42 before the new builds 
> > consistently complete. The problem seems to be that the llvm Makefiles
> > allow the previously installed copies of the llvm shared libraries to be
> > used in later in the builds rather than the newly built copies. I am
> > amazed that this issue isn't run into more often.
> 
> I'm not sure what you mean Jack.  Can you describe more of what you're doing here?
> 
> -Chris

Chris,
   I have fink llvm-clang packaging that builds with...

  $ ../llvm-2.9/configure --prefix=/sw --prefix=/sw --mandir=/sw/share/man --infodir=/sw/share/info --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --with-as=/Developer/usr/bin/as --with-ld=/Developer/usr/bin/ld --with-nm=/Developer/usr/bin/nm --enable-optimized --enable-assertions --enable-pic --enable-targets=host-only

where the build directory, llvm_objdir, is at the same level as the source
directory. The build problems always seem to arise from having a either a previous
release (2.8) or an older svn copy of llvm/clang installed. I believe the problem
is that the shared libs...

     /sw/lib/BugpointPasses.dylib
     /sw/llib/libEnhancedDisassembly.dylib
     /sw/lib/LLVMHello.dylib
     /sw/lib/profile_rt.dylib
     /sw/lib/libLTO.dylib
     /sw/lib/libclang.dylib

from the older installed build of llvm/clang are incorrectly used during the build
of the newer llvm/clang (hence my usage of the term 'leaky buildroot'). I also believe
this problem may even extend to the installed binaries (such as tblgen), where the
older copy may be run instead of that in the buildroot. Note that in fink we set
automatically set...

CPPFLAGS: -I/sw/include
LDFLAGS: -L/sw/lib

during the build. Also /sw/bin is added to the front of PATH so that the tblgen copy is
found first. I suspect that llvm/clang is being lax about enforcing a tight buildroot
to insure that the newly built shared libraries and executables are always those being
used during the build.
           Jack
ps In every case where this problem has arisen, deinstalling the older packages has
eliminated the build problems which is a telltale that this definitely is a leaky
buildroot issue.



More information about the cfe-dev mailing list