Hi, folks I am trying to build LLVM-GCC 4.2 on a Linux/PowerPC machine. Actually, the PowerPC is a PS3. The source was downloaded from http://llvm.org/releases/2.8/llvm-gcc-4.2-2.8.source.tgz Here is my system information and configuration options: ---------------------------------------------------------------------- $ uname -a Linux ps3 2.6.32-rc2-00995-g96ebbe6-dirty #2 SMP Fri Oct 2 15:12:28 CST 2009 ppc64 Cell Broadband Engine, altivec supported GNU/Linux $ gcc --version gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2 $ ../configure --prefix=/tmp/chenwj --enable-langugaes=c,c++ ----------------------------------------------------------------------- And here is the compiling error, ----------------------------------------------------------------------- In file included from /usr/include/features.h:354, from /usr/include/stdio.h:28, from ../../gcc/tsystem.h:90, from ../../gcc/crtstuff.c:68: /usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory make[3]: *** [crtbegin.o] Error 1 make[3]: Leaving directory `/tmp/chenwj/llvm-gcc-4.2-2.8.source/build/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/tmp/chenwj/llvm-gcc-4.2-2.8.source/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/tmp/chenwj/llvm-gcc-4.2-2.8.source/build' make: *** [all] Error 2 ----------------------------------------------------------------------- Any suggestion appreciated. Regards, chenwj -- Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Hi, On Thu, Dec 30, 2010 at 3:54 AM, 陳韋任 <chenwj...> wrote:> Hi, folks > > I am trying to build LLVM-GCC 4.2 on a Linux/PowerPC machine. > Actually, the PowerPC is a PS3.(snip)> And here is the compiling error, > > ----------------------------------------------------------------------- > In file included from /usr/include/features.h:354, > from /usr/include/stdio.h:28, > from ../../gcc/tsystem.h:90, > from ../../gcc/crtstuff.c:68: > /usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file orAdding -m64 to CFLAGS should help. CFLAGS=-m64 ../configure --prefix=/tmp/chenwj --enable-langugaes=c,c++ Also check that there isn't a -m32 amongst CFLAGS HTH, Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds
Hi, Csaba Thanks for the tip. My PS3 workstationn is installed a 32-bit OS. I will install a 64-bit OS soon and try what you said. Thanks again. Regards, chenwj -- Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Hi, folks I am "stll" trying to build LLVM-GCC 4.2 on a Linux/PS3 machine, which has a 64-bit OS. Here is my system information and configuration options: ----------------------------------------------------------------- $ uname -a Linux ps3 2.6.32-rc2-00995-g96ebbe6-dirty #2 SMP Fri Oct 2 15:12:28 CST 2009 ppc64 Cell Broadband Engine, altivec supported GNU/Linux $ gcc --version gcc (Gentoo 4.4.4-r2 p1.3, pie-0.4.5) 4.4.4 $ ../llvm-gcc-4.2-2.8.source/configure --prefix=/tmp/chenwj/install --disable-multilib --program-prefix=llvm- --enable-llvm=/tmp/chenwj/install --enable-languages=c,c++ ----------------------------------------------------------------- And here is the compiling error, ------------------------------------------------------------------ /tmp/chenwj/build/./prev-gcc/xgcc -B/tmp/chenwj/build/./prev-gcc/ -B/tmp/chenwj/install/powerpc64-unknown-linux-gnu/bin/ -g -O2 -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 -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o .././libiberty/libiberty.a build/genmodes -h > tmp-modes.h /bin/sh: line 1: 9623 Segmentation fault build/genmodes -h > tmp-modes.h make[3]: *** [s-modes-h] Error 139 make[3]: Leaving directory `/tmp/chenwj/build/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/tmp/chenwj/build' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/tmp/chenwj/build' make: *** [all] Error 2 ------------------------------------------------------------------ Any suggestion appreciated. Regards, chenwj -- Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Erik de Castro Lopo
2011-Jan-05 08:36 UTC
[LLVMdev] Building LLVM-GCC on Linux/PowerPC failed
陳韋任 wrote:> Linux ps3 2.6.32-rc2-00995-g96ebbe6-dirty #2 SMP Fri Oct 2 15:12:28 CST > 2009 ppc64 Cell Broadband Engine, altivec supported GNU/LinuxYes, the kenel is 64 bit, but you may still have a pure 32 bit userspace (thats what my dual G5 PowerMac running Linux has). Does your maching have directories like /lib64 and /usr/lib64? If you compile a program like: #include <stdio.h> int main (void) { printf ("sizeof (void*) : %zd\n", sizeof (void*)) ; return 0 ; } what is the size of a void pointer? Does this change if you add -m64 to the gcc command line? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Anton Korobeynikov
2011-Jan-05 11:14 UTC
[LLVMdev] Building LLVM-GCC on Linux/PowerPC failed
Hello> build/genmodes.o build/errors.o .././libiberty/libiberty.a > build/genmodes -h > tmp-modes.h > /bin/sh: line 1: 9623 Segmentation fault build/genmodes -h >Here genmodes is already built via llvm. Given that there is no proper ppc-linux/ppc64-linux codegen support, it's not unexpected that you're seeing a segfault here. Try to configure with --disable-bootstrap -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
On ons, 2011-01-05 at 15:23 +0800, ext 陳韋任 wrote:> Hi, folks > > I am "stll" trying to build LLVM-GCC 4.2 on a Linux/PS3 machine, which > has a 64-bit OS.Don't know if it helps, but clang at least builds nicely. Unfortunately I have a 32bit runtime installed and this seems to cause problems somewhere - clang defaults to 64bit assembly (if I understood the output correctly), and the assembly made from running 'clang --ccc-host-triple=powerpc-linux-gnu' is not accepted by the default system assembler. It might work better on a 64bit system. And I probably should file a bug. Is ppc32 still maintained? kalle -- "Modern computing machines are very complex objects" -von Neumann introducing the NORC, 1954
Anton Korobeynikov
2011-Jan-06 09:59 UTC
[LLVMdev] Building LLVM-GCC on Linux/PowerPC failed
Hello> The "--disable-bootstrap" give me no luck. Why you think that > "--disable-bootstrap" might help?Due to reasons I outlined in my prev. e-mail. Now you can notice that the build proceed much further. Try to add --disable-libmudflap as well. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hi, Anton Finally, I built LLVM-GCC 2.8 on a Linux/PS3 machine. I just put my configuration options here, --------------------------------------------------------------------------- ../llvm-gcc-4.2-2.8.source/configure -prefix=/tmp/chenwj/install --disable-bootstrap --disable-libmudflap --disable-multilib --disable-libgomp --program-prefix=llvm- --enable-llvm=/tmp/chenwj/install --enable-languages=c,c++ --------------------------------------------------------------------------- Hope this help others. :) Regards, chenwj -- Wei-Ren Chen (陳韋任) Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667