[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC

Kshitij Sudan kshitij at cs.utah.edu
Mon Feb 23 17:28:53 PST 2009


I am new to LLVM, and I'm trying to compile llvm and llvm-gcc from
subversion on a Solaris10/SPARC machine. I have already tried building
llvm-2.4 on this machine, but it failed.

I then tried the subversion sources (rev. # 65253 fro llvm and
rev#65263 for llvm-gcc) and llvm at least builds correctly ( I however
have not tried testing it!). I can execute binaries located in
llvm-objects/Release (I built a Release version as instructed by
llvm-gcc README).

Since then I am trying to build llvm-gcc and it fails all the time. I
tried building llvm-gcc from svn and 2.5 pre-release. I also tried
building llvm-2.5 pre-release and that succeeds but llvm-gcc-4.2-2.5
pre-release fails again. I have listed below my machine config and the
errors reported by make in each case.

I am not sure if I should file a bug, hence I'm posting this here.
Looking forward to possible solutions.

thanks,
-Kshitij

************************************
Machine configuration and top-level configure switches I use
************************************
[sudan at grad1: space2]$ gcc -v
Using built-in specs. Target: sparc-sun-solaris2.10 Configured with:
../gcc-4.3.2/configure --prefix=/usr/local/gcc-4.3.2
--with-gmp=/usr/local --with-mpfr=/usr/local Thread model: posix gcc
version 4.3.2 (GCC)

[sudan at grad1: space2]$ psrinfo -v
Status of virtual processor 0 as of: 02/23/2009 15:48:54
  on-line since 12/08/2008 10:47:54.
  The sparcv9 processor operates at 750 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 02/23/2009 15:48:54
  on-line since 12/08/2008 10:47:56.
  The sparcv9 processor operates at 750 MHz,
        and has a sparcv9 floating point processor.

[sudan at grad1: space2]$ uname -a
SunOS grad1.emcb.utah.edu 5.10 Generic_118833-33 sun4u sparc
SUNW,Sun-Blade-1000 Solaris

configure switches for llvm-gcc
-------------------------------------------------
../llvm-gcc-4.2/configure
--prefix=/local/space2/llvm_toolchain/llvm-gcc4.2-2.5-install
--enable-languages=c,c++,fortran --disable-checking
--enable-llvm=/local/space2n/llvm-2.5-objects --disable-bootstrap
--disable-multilib

************************************
Compiling gcc-4.2-2.5 with llvm-2.5
************************************
g++ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic
-Wno-long-long -Wno-variadic-macros -Wmissing-format-attribute
-DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"sparc-sun-solaris2.10\"
-DNDEBUG -I. -I. -I../../llvm-gcc-4.2/gcc -I../../llvm-gcc-4.2/gcc/.
-I../../llvm-gcc-4.2/gcc/../include
-I../../llvm-gcc-4.2/gcc/../libcpp/include
-I../../llvm-gcc-4.2/gcc/../libdecnumber -I../libdecnumber
-I/local/space2/llvm_toolchain/llvm-2.5-objects/include
-I/local/space2/llvm_toolchain/llvm-2.5/include -DENABLE_LLVM
-I/local/space2/llvm_toolchain/llvm-2.5-objects/../llvm-2.5/include
-D_DEBUG -include llvm/System/Solaris.h -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I.
-I../../llvm-gcc-4.2/gcc -I../../llvm-gcc-4.2/gcc/.
-I../../llvm-gcc-4.2/gcc/../include
-I../../llvm-gcc-4.2/gcc/../libcpp/include
-I../../llvm-gcc-4.2/gcc/../libdecnumber -I../libdecnumber
-I/local/space2/llvm_toolchain/llvm-2.5-objects/include
-I/local/space2/llvm_toolchain/llvm-2.5/include
../../llvm-gcc-4.2/gcc/llvm-convert.cpp -o llvm-convert.o
../../llvm-gcc-4.2/gcc/llvm-convert.cpp: In member function 'bool
TreeToLLVM::EmitBuiltinCall(tree_node*, tree_node*, const MemRef*,
llvm::Value*&)':

../../llvm-gcc-4.2/gcc/llvm-convert.cpp:4387: error:
'getIntrinsicForGCCBuiltin' is not a member of 'llvm::Intrinsic'

make[2]: *** [llvm-convert.o] Error 1
make[2]: Leaving directory
`/local/space2/llvm_toolchain/llvm-gcc4.2-2.5-objects/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/local/space2/llvm_toolchain/llvm-gcc4.2-2.5-objects'
make: *** [all] Error 2

************************************
Compiling llvm-gcc from svn rev. 65263, with llvm compiled from svn rev. 65253:
************************************
gcc -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition
-Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I.
-I../../llvm-gcc-4.2/gcc -I../../llvm-gcc-4.2/gcc/.
-I../../llvm-gcc-4.2/gcc/../include
-I../../llvm-gcc-4.2/gcc/../libcpp/include
-I../../llvm-gcc-4.2/gcc/../libdecnumber -I../libdecnumber
-I/local/space2/llvm_toolchain/llvm-objects/include
-I/local/space2/llvm_toolchain/llvm/include -DENABLE_LLVM
-I/local/space2/llvm_toolchain/llvm-objects/../llvm/include -D_DEBUG
-include llvm/System/Solaris.h -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"2.4"'
../../llvm-gcc-4.2/gcc/dfp.c -o dfp.o

In file included from ../../llvm-gcc-4.2/gcc/../libdecnumber/decNumber.h:39,
                 from ../../llvm-gcc-4.2/gcc/../libdecnumber/decimal128.h:59,
                 from ../../llvm-gcc-4.2/gcc/dfp.c:34:

../../llvm-gcc-4.2/gcc/../libdecnumber/decContext.h:52:50: error:
gstdint.h: No such file or directory
make[3]: *** [dfp.o] Error 1
make[3]: Leaving directory `/local/space2/llvm_toolchain/llvm-gcc-objects/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/local/space2/llvm_toolchain/llvm-gcc-objects'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/local/space2/llvm_toolchain/llvm-gcc-objects'
make: *** [all] Error 2

************************************
Compiling llvm-gcc-4.2-2.5 with llvm from svn, I get the following error:
************************************
c++ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic
-Wno-long-long -Wno-variadic-macros -Wmissing-format-attribute
-DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"sparc-sun-solaris2.10\"
-DNDEBUG -I. -I. -I../../llvm-gcc4.2-2.5.source/gcc
-I../../llvm-gcc4.2-2.5.source/gcc/.
-I../../llvm-gcc4.2-2.5.source/gcc/../include
-I../../llvm-gcc4.2-2.5.source/gcc/../libcpp/include
-I../../llvm-gcc4.2-2.5.source/gcc/../libdecnumber -I../libdecnumber
-I/local/space2/llvm_toolchain/llvm-objects/include
-I/local/space2/llvm_toolchain/llvm/include -DENABLE_LLVM
-I/local/space2/llvm_toolchain/llvm-objects/../llvm/include -D_DEBUG
-include llvm/System/Solaris.h -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"svn"' -I. -I.
-I../../llvm-gcc4.2-2.5.source/gcc
-I../../llvm-gcc4.2-2.5.source/gcc/.
-I../../llvm-gcc4.2-2.5.source/gcc/../include
-I../../llvm-gcc4.2-2.5.source/gcc/../libcpp/include
-I../../llvm-gcc4.2-2.5.source/gcc/../libdecnumber -I../libdecnumber
-I/local/space2/llvm_toolchain/llvm-objects/include
-I/local/space2/llvm_toolchain/llvm/include
../../llvm-gcc4.2-2.5.source/gcc/llvm-convert.cpp -o llvm-convert.o

In file included from
../../llvm-gcc4.2-2.5.source/gcc/llvm-convert.cpp:4553:
/local/space2/llvm_toolchain/llvm-objects/include/llvm/Intrinsics.gen:
In member function 'bool TreeToLLVM::EmitBuiltinCall(tree_node*,
tree_node*, const MemRef*, llvm::Value*&)':
/local/space2/llvm_toolchain/llvm-objects/include/llvm/Intrinsics.gen:6469:
error: a function-definition is not allowed here before '{' token
../../llvm-gcc4.2-2.5.source/gcc/llvm-convert.cpp:7456: error:
expected `}' at end of input
../../llvm-gcc4.2-2.5.source/gcc/llvm-convert.cpp:7456: error:
expected `}' at end of input
../../llvm-gcc4.2-2.5.source/gcc/llvm-convert.cpp:7456: error:
expected `}' at end of input

make[2]: *** [llvm-convert.o] Error 1
make[2]: Leaving directory
`/local/space2/llvm_toolchain/llvm-gcc4.2-2.5-objects/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/local/space2/llvm_toolchain/llvm-gcc4.2-2.5-objects'
make: *** [all] Error 2



More information about the llvm-dev mailing list