[cfe-dev] Weird LLVM build problem

Marshall Clow mclow.lists at gmail.com
Thu Jun 2 10:49:12 PDT 2011


I posted about this before, but I have more information now.
I have two machines:
	a MacPro with Xcode 3.2.5 installed - LLVM builds fine there.
	a MacBookPro with Xcode 4.0.1 installed - LLVM fails to build there.

In both cases, the LLVM code base is not on the boot volume, and I am building out-of-tree.
The directory hierarchy looks like this:
	llvm/
	llvm-build/
	llvm-nodebug/

for a clean build, I do:
	rm -rf llvm-build
	mkdir llvm-build ; cd llvm-build
	../llvm/configure
	make

make -k -n shows (in the failing build):

> make -k -n
> for dir in lib/Support utils lib/VMCore lib tools/llvm-config tools runtime docs unittests; do \
> 	  if ([ ! -f $dir/Makefile ] || \
> 	      command test $dir/Makefile -ot /$dir/Makefile ); then \
> 	    /Volumes/EyeFive/Marshall/Sources/LLVM/llvm/autoconf/mkinstalldirs $dir; \
> 	    /bin/cp /$dir/Makefile $dir/Makefile; \
> 	  fi; \
> 	  (make -C $dir all ) || exit 1; \
> 	done

while in the succeeding build:

> for dir in lib/Support utils lib/VMCore lib tools/llvm-config tools runtime docs unittests; do \
> 	  if ([ ! -f $dir/Makefile ] || \
> 	      command test $dir/Makefile -ot /Volumes/Bay2/LLVM/llvm/$dir/Makefile ); then \
> 	    /Volumes/Bay2/LLVM/llvm/autoconf/mkinstalldirs $dir; \
> 	    /bin/cp /Volumes/Bay2/LLVM/llvm/$dir/Makefile $dir/Makefile; \
> 	  fi; \
> 	  (make -C $dir all ) || exit 1; \
> 	done
> 

It appears that somehow the variable LLVM_SRC_ROOT is somehow getting set to the empty string.

Here's what I think is the appropriate bit from llvm/Makefile.rules:

> ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
> $(RecursiveTargets)::
> 	$(Verb) for dir in $(DIRS); do \
> 	  if ([ ! -f $$dir/Makefile ] || \
> 	      command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \
> 	    $(MKDIR) $$dir; \
> 	    $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
> 	  fi; \
> 	  ($(MAKE) -C $$dir $@ ) || exit 1; \
> 	done
> else
> $(RecursiveTargets)::
> 	$(Verb) for dir in $(DIRS); do \
> 	  ($(MAKE) -C $$dir $@ ) || exit 1; \
> 	done
> endif
> 



Any ideas?
I've tried a clean checkout of the LLVM sources - no change.

Both machines are using gmake 3.8.1.

Thanks in advance!

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the cfe-dev mailing list