[LLVMdev] LLVM-3.0 fails to build on linux ppc32

Hal Finkel hfinkel at anl.gov
Fri Dec 2 07:27:27 PST 2011


On Fri, 2011-12-02 at 09:15 -0600, Hal Finkel wrote:
> On Fri, 2011-12-02 at 06:58 -0600, Hal Finkel wrote:
> > Nico,
> > 
> > There is a third place that '#undef PPC' is needed (at the top of
> > PPCFixupKinds.h). Alternatively, you can run configure with -UPPC in
> > your CPPFLAGS. I'll try to get this fixed in trunk shortly.
> 
> I just tested this, and I was wrong: passing -UPPC to configure in
> CPPFLAGS does not work for some reason. Providing CPPFLAGS=-UPPC as an
> argument to make, however, does seem to work.
> 
> $ make CPPFLAGS=-UPPC

Unfortunately, this also causes problems. This seems better:

$ make CXX='g++ -UPPC'

(where g++ should be whatever your original CXX was).

 -Hal

> 
>  -Hal
> 
> > 
> >  -Hal
> > 
> > On Fri, 2011-12-02 at 12:30 +0100, acrux_it at libero.it wrote:
> > > hi, i just try to build llvm-3.0 (stable) on linux ppc32 (CRUX PPC 2.7) with
> > > gcc-4.5.3, binutils-2.21.1, glibc-2.12.2 .
> > > 
> > > As this suggestion:
> > > http://llvm.org/bugs/show_bug.cgi?id=10969
> > > I applied a patch like this one:
> > > 
> > > --- llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h     
> > > 2011-07-26 01:24:55.000000000 +0200
> > > +++ llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h     
> > > 2011-12-02 02:04:06.000000000 +0100
> > > @@ -34,6 +34,10 @@
> > > 
> > >  } // End llvm namespace
> > > 
> > > +// Generated files will use "namespace PPC". To avoid symbol clash,
> > > +// undefine PPC here. PPC may be predefined on some hosts.
> > > +#undef PPC
> > > +
> > >  // Defines symbolic names for PowerPC registers.  This defines a mapping from
> > >  // register name to register number.
> > >  //
> > > --- llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h       
> > > 2011-07-26 02:24:13.000000000 +0200
> > > +++ llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h       
> > > 2011-12-02 02:05:22.000000000 +0100
> > > @@ -14,6 +14,10 @@
> > >  #ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H
> > >  #define LLVM_TARGET_POWERPC_PPCPREDICATES_H
> > > 
> > > +// Generated files will use "namespace PPC". To avoid symbol clash,
> > > +// undefine PPC here. PPC may be predefined on some hosts.
> > > +#undef PPC
> > > +
> > >  namespace llvm {
> > >  namespace PPC {
> > >    /// Predicate - These are "(BI << 5) | BO"  for various predicates.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > but i got this further error:
> > > 
> > > [...]
> > > make[3]: Leaving directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/JIT'
> > > make[3]: Entering directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/MCJIT'
> > > llvm[3]: Compiling Intercept.cpp for Release build
> > > llvm[3]: Compiling MCJIT.cpp for Release build
> > > llvm[3]: Building Release Archive Library libLLVMMCJIT.a
> > > make[3]: Leaving directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/MCJIT'
> > > make[3]: Entering directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/RuntimeDyld'
> > > llvm[3]: Compiling RuntimeDyld.cpp for Release build
> > > llvm[3]: Compiling RuntimeDyldMachO.cpp for Release build
> > > llvm[3]: Building Release Archive Library libLLVMRuntimeDyld.a
> > > make[3]: Leaving directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/RuntimeDyld'
> > > make[2]: Leaving directory
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine'
> > > make[2]: Entering directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.
> > > src/lib/Linker'
> > > llvm[2]: Compiling LinkArchives.cpp for Release build
> > > llvm[2]: Compiling LinkItems.cpp for Release build
> > > llvm[2]: Compiling LinkModules.cpp for Release build
> > > llvm[2]: Compiling Linker.cpp for Release build
> > > llvm[2]: Building Release Archive Library libLLVMLinker.a
> > > make[2]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/Linker'
> > > make[2]: Entering directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC'
> > > llvm[2]: Compiling ELFObjectWriter.cpp for Release build
> > > In file included from ELFObjectWriter.cpp:33:0:
> > > ../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected
> > > identifier before numeric constant
> > > ../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected
> > > unqualified-id before numeric constant
> > > ELFObjectWriter.cpp:1832:1: error: expected '}' at end of input
> > > /bin/rm: cannot remove
> > > `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC/Release/ELFObjectWriter.d.tmp':
> > > No such file or directory
> > > make[2]: ***
> > > [/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC/Release/ELFObjectWriter.o] 
> > > Error
> > > 1
> > > make[2]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC'
> > > make[1]: *** [MC/.makeall] Error 2
> > > make[1]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib'
> > > make: *** [all] Error 1
> > > 
> > > 
> > > cheers,
> > > --nico
> > > _______________________________________________
> > > LLVM Developers mailing list
> > > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > 
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list