Trouble Building llvm-gcc-4.2

I'm almost finished with the BuildBot validation config, but I'm having
trouble convincing it to compiler llvm-gcc-4.2.

Here's the relevant portion of the config:

  f.addStep(SVN(workdir=“llvm-gcc-4.2/src”, mode=‘clobber’,
baseURL=‘http://llvm.org/svn/llvm-project/llvm-gcc-4.2/’,
defaultBranch=‘trunk’))
  checking=""
  if optimized == “--disable-optimized”:
    checking="--enable-checking"
  f.addStep(Configure(workdir=“llvm-gcc-4.2/obj”, command=["../src/configure",
WithProperties("--prefix=%s/install", “absbuilddir”),
“--program-prefix=llvm-”,
WithProperties("--enable-llvm=%s/build-llvm-initial/obj", “absbuilddir”),
“--enable-languages=c,c++”, checking]))
  f.addStep(WarningCountingShellCommand, workdir=“llvm-gcc-4.2/obj”, name =
“llvm-gcc-4.2_clean”, command=“make clean”, haltOnFailure = True,
description=“cleaning llvm-gcc-4.2”, descriptionDone=“clean llvm-gcc-4.2”)
  f.addStep(WarningCountingShellCommand, workdir=“llvm-gcc-4.2/obj”, name =
“llvm-gcc-4.2_compile”, command=“nice -n 10 make bootstrap”, haltOnFailure =
True, description=“compiling llvm-gcc-4.2”, descriptionDone=“compile
llvm-gcc-4.2”)
  f.addStep(WarningCountingShellCommand, name = “llvm-gcc-4.2_install”,
command=“nice -n 10 make install”, haltOnFailure = True,
description=“installing llvm-gcc-4.2”, descriptionDone=“install
llvm-gcc-4.2”)
  f.addStep(DejaGNUTester(description=“testing llvm-gcc-4.2”,
descriptionDone=“test llvm-gcc-4.2”, workdir=“llvm-gcc-4.2/obj”))

Note that I pass --enable-llvm=<abs llvm obj dir> to configure for
llvm-gcc-4.2. However, the build fails with:

configure: error: You must specify valid path to your LLVM tree with
--enable-llvm=DIR

The initial configure of llvm-gcc-4.2 works just fine. It's the actual build
that fails, when the configure is done is subdirectories as part of "make
bootstrap."

Any hints?

                                               -Dave

I'm almost finished with the BuildBot validation config, but I'm having
trouble convincing it to compiler llvm-gcc-4.2.

Here's the relevant portion of the config:

  f.addStep(SVN(workdir=“llvm-gcc-4.2/src”, mode=‘clobber’,
baseURL=‘http://llvm.org/svn/llvm-project/llvm-gcc-4.2/’,
defaultBranch=‘trunk’))
  checking=""
  if optimized == “--disable-optimized”:
    checking="--enable-checking"
  f.addStep(Configure(workdir=“llvm-gcc-4.2/obj”, command=["../src/configure",
WithProperties("--prefix=%s/install", “absbuilddir”),
  
Are you sure buildbot provides absbuilddir?

The initial configure of llvm-gcc-4.2 works just fine. It's the actual build
that fails, when the configure is done is subdirectories as part of "make
bootstrap."

Any hints?

How does the configure line actually look like? (stdio output)

Best regards,
--Edwin

> I’m almost finished with the BuildBot validation config, but I’m having
> trouble convincing it to compiler llvm-gcc-4.2.
>
> Here’s the relevant portion of the config:
>
> f.addStep(SVN(workdir=“llvm-gcc-4.2/src”, mode=‘clobber’,
> baseURL=‘http://llvm.org/svn/llvm-project/llvm-gcc-4.2/’,
> defaultBranch=‘trunk’))
> checking=""
> if optimized == “--disable-optimized”:
> checking="--enable-checking"
> f.addStep(Configure(workdir=“llvm-gcc-4.2/obj”,
> command=["../src/configure", WithProperties("--prefix=%s/install",
> “absbuilddir”),

Are you sure buildbot provides absbuilddir?

Yes, I wrote a BuildStep to compute it. I know it picks it up because the
error used to tell me to provide an absolute path. That happened during
the configure stage.

> The initial configure of llvm-gcc-4.2 works just fine. It's the actual
> build that fails, when the configure is done is subdirectories as part of
> "make bootstrap."
>
> Any hints?

How does the configure line actually look like? (stdio output)

The initial configure runs as:

./src/configure
--prefix=/ptmp/dag/buildbot/slaves/llvm-validate/llvm-validate-debug-x86_64-linux/build/install
--program-prefix=llvm-
--enable-llvm=/ptmp/dag/buildbot/slaves/llvm-validate/llvm-validate-debug-x86_64-linux/build/build-llvm-initial/obj
--enable-languages=c,c++ --enable-checking

During the build stage, make outputs:

Configuring stage 1 in ./gcc
configure: loading cache ./config.cache
[lots of checking messages...]
checking for dsymutil... no
dsymutil is not available
configure: error: You must specify valid path to your LLVM tree with
--enable-llvm=DIR

                                                   -Dave

  

I'm almost finished with the BuildBot validation config, but I'm having
trouble convincing it to compiler llvm-gcc-4.2.

Here's the relevant portion of the config:

  f.addStep(SVN(workdir=“llvm-gcc-4.2/src”, mode=‘clobber’,
baseURL=‘http://llvm.org/svn/llvm-project/llvm-gcc-4.2/’,
defaultBranch=‘trunk’))
  checking=""
  if optimized == “--disable-optimized”:
    checking="--enable-checking"
  f.addStep(Configure(workdir=“llvm-gcc-4.2/obj”,
command=["../src/configure", WithProperties("--prefix=%s/install",
“absbuilddir”),
      

Are you sure buildbot provides absbuilddir?
    
Yes, I wrote a BuildStep to compute it. I know it picks it up because the
error used to tell me to provide an absolute path. That happened during
the configure stage.

The initial configure of llvm-gcc-4.2 works just fine. It's the actual
build that fails, when the configure is done is subdirectories as part of
"make bootstrap."

Any hints?
      

How does the configure line actually look like? (stdio output)
    
The initial configure runs as:

./src/configure
--prefix=/ptmp/dag/buildbot/slaves/llvm-validate/llvm-validate-debug-x86_64-linux/build/install
--program-prefix=llvm-
--enable-llvm=/ptmp/dag/buildbot/slaves/llvm-validate/llvm-validate-debug-x86_64-linux/build/build-llvm-initial/obj
--enable-languages=c,c++ --enable-checking

That is very similar to what I use, except I build LLVM for release
(--enable-optimized).

During the build stage, make outputs:

Configuring stage 1 in ./gcc
configure: loading cache ./config.cache
[lots of checking messages...]
checking for dsymutil... no
dsymutil is not available
configure: error: You must specify valid path to your LLVM tree with
--enable-llvm=DIR

FWIW my script that builds llvm from a cronjob looks like this, and it
works:

rm -rf $DIR/install &&
rm -rf $DIR/llvm-obj &&
rm -rf $DIR/llvm-gcc-obj &&
mkdir $DIR/install &&
mkdir $DIR/llvm-obj &&
mkdir $DIR/llvm-gcc-obj &&
cd $DIR/llvm && svn up &&
cd $DIR/llvm-gcc4.2 && contrib/gcc_update &&
cd $DIR/llvm-obj &&
../llvm/configure --enable-optimized --prefix=$DIR/install &&
make -j4 >/dev/null &&
make install &&
../llvm-gcc4.2/configure --prefix=`pwd`/../install
--program-prefix=llvm- --enable-llvm=$DIR/llvm-obj/ --disable-multilib
--enable-languages=c,c++ &&
make -j4 >/dev/null &&
make install
....

Best regards,
--Edwin

I changed a few things and now it works. I can't say with absolute
certainty yet but I suspect the problem is that I was compiling with -j.
Perhaps the llvm-gcc-4.2 Makefiles are not threadsafe.

                                      -Dave