Kshitij Sudan
2009-Feb-24 01:28 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
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
Chris Lattner
2009-Feb-24 01:55 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
On Feb 23, 2009, at 5:28 PM, Kshitij Sudan wrote:> 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 don't have access to a Solaris10 machine, can you propose a patch that fixes it for you? -Chris
Anton Korobeynikov
2009-Feb-24 08:09 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
> 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.That's correct. There was a bug fixed after 2.4 release.> 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.afair solaris always had a special gcc build procedure. I can confirm, however, that sometime between 2.4 and 2.5 I built cross llvm-gcc for sparc-elf (with newlib) and at least it was bult successfully. In any case, result of codegen is not fully ABI-compliant.> ../../llvm-gcc-4.2/gcc/llvm-convert.cpp:4387: error: > 'getIntrinsicForGCCBuiltin' is not a member of 'llvm::Intrinsic'That's something strange. Are you sure you didn't mixed sources from release and some older / newer version? What is gcc version on your box? --- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Török Edwin
2009-Feb-24 08:09 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
On 2009-02-24 03:28, Kshitij Sudan wrote:> 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!).You can install dejagnu, and run 'make check' in the llvm objdir. All tests except one pass for me on Solaris10/x86 (LLVMHello.so is not copied to the correct location for some reason, so that test fails), it would be interesting to see what happens on Sparc.> 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) > >Wow, where did you get a 4.3.x compiler for Solaris? Latest I've seen packaged are 3.4.x and 4.0.x.> [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 >I tried building on Solaris10/x86, and I had to use something like --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld. However it failed with an undefined reference to 'copysignl'. Best regards, --Edwin
Kshitij Sudan
2009-Feb-24 22:16 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
On Tue, Feb 24, 2009 at 1:09 AM, Anton Korobeynikov <anton at korobeynikov.info> wrote:>> 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. > afair solaris always had a special gcc build procedure. I can confirm, > however, that sometime between 2.4 and 2.5 I built cross llvm-gcc for > sparc-elf (with newlib) and at least it was bult successfully. In any > case, result of codegen is not fully ABI-compliant. >hmm ... that's disheartening to hear. I intend to use the code generated by LLVM to run on a full system simulator, so now I don't know how that will pan-out. I don't want to loose out on LLVM's strengths in static analysis just because I'm tied to a particular ISA! Let's see how it goes ....>> ../../llvm-gcc-4.2/gcc/llvm-convert.cpp:4387: error: >> 'getIntrinsicForGCCBuiltin' is not a member of 'llvm::Intrinsic' > That's something strange. Are you sure you didn't mixed sources from > release and some older / newer version? What is gcc version on your box? >I compiled gcc from sources and here's the config>> 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) and I'm pretty sure I did not mix any sources. also, are there any instructions you have about cross compiling llvm-gcc? I plan to use an x86_64-linux box as host and a sparc-solaris10 box as target (I can get all the platform specific headers and libs fro my host target easily). also, since I want to compile llvm-gcc front-end, would I need to compile binutils etc. for my target? where there any specific issues that you faced? how did you test your front-end? My other option is to compile llvm and llvm-gcc on a sparc-linux box (I currently have a sparc64-linux box, but LLVM doesn't support that target). Have you heard of any success story for llvm-gcc on sparc-linux? I am a bit hesitant on that coz the llvm docs page does not mention if this config has been tested. -Kshitij
Kshitij Sudan
2009-Feb-24 22:25 UTC
[LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
>> 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!). > > You can install dejagnu, and run 'make check' in the llvm objdir. > All tests except one pass for me on Solaris10/x86 (LLVMHello.so is not > copied to the correct location for some reason, so that test fails), > it would be interesting to see what happens on Sparc. >I am totally inexperienced with testing using dejagnu, but here's the output summary that's dumped on my screen >> === Summary == # of expected passes 1774 # of unexpected failures 69 # of unexpected successes 2 # of expected failures 13 I see a lot of "FAIL:" messages, and they are somehow always related to -march=x86 flag for llc. Following is an example of these kind of errors>> FAIL: /local/space2/llvm_toolchain/llvm/test/Transforms/TailDup/if-tail-dup.ll Failed with exit(1) at line 1 while running: llvm-as < /local/space2/llvm_toolchain/llvm/test/Transforms/TailDup/if-tail-\ dup.ll | opt -tailduplicate | llc -march=x86 -o if-tail-dup.ll.tmp -f llc: for the -march option: : Cannot find option named 'x86'! I'm not really sure what's going on! It'd be great if soemone can provide some insight into this for me.>> 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) >> >> > > Wow, where did you get a 4.3.x compiler for Solaris? Latest I've seen > packaged are 3.4.x and 4.0.x. >I compiled gcc-4.3 from sources. -Kshitij
Reasonably Related Threads
- [LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
- [LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
- [LLVMdev] llvm-gcc (pre-release and svn sources) fails to compile on Solaris10/SPARC
- [LLVMdev] llvm-gcc fails to build libgcc when built with itself
- [LLVMdev] LLVM build freezes in scratchbox, ARM target