[LLVMdev] Trouble Building llvm-gcc-4.2

Török Edwin edwintorok at gmail.com
Wed Dec 10 12:26:00 PST 2008


On 2008-12-10 22:17, David Greene wrote:
> On Wednesday 10 December 2008 12:18, Török Edwin wrote:
>   
>> On 2008-12-10 19:54, David Greene wrote:
>>     
>>> 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



More information about the llvm-dev mailing list