Elvis Dowson
2008-Dec-28 21:27 UTC
[LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
Hi, I'm new to LLVM and I want to setup the Trident Compiler system on Mac OS X. I downloaded the llvm-gcc-4.2-2.4.source.tar.gz package, created a build directory and ran the following command to configure $ ../src/configure --program-prefix=llvm- --disable-bootstrap --enable- checking --enable-languages=c,c++ $ make -j 2 Configure works fine, but I get the following error after running the make command: gcc -c -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 -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. - I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I./../ intl -I../../src/gcc/../libcpp/include -I../../src/gcc/../ libdecnumber -I../libdecnumber ../../src/gcc/tree-nested.c -o tree- nested.o ../../src/gcc/tree-nested.c: In function 'convert_tramp_reference': ../../src/gcc/tree-nested.c:1846: error: 'BUILT_IN_ADJUST_TRAMPOLINE' undeclared (first use in this function) ../../src/gcc/tree-nested.c:1846: error: (Each undeclared identifier is reported only once ../../src/gcc/tree-nested.c:1846: error: for each function it appears in.) make[2]: *** [tree-nested.o] Error 1 make[1]: *** [all-gcc] Error 2 make: *** [all] Error 2 How can I resolve this error? Best regards, Elvis Dowson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081229/99460c93/attachment.html>
Anton Korobeynikov
2008-Dec-28 22:43 UTC
[LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
Hello, Elvis> $ ../src/configure --program-prefix=llvm- --disable-bootstrap > --enable-checking --enable-languages=c,c++You haven't configured llvm-gcc properly. Please do read readme.llvm file. However, afair, Trident was LLVM 1.5-based, and it will require massive rewrite to use LLVM 2.x (bytecode format was also changed) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Elvis Dowson
2008-Dec-28 23:01 UTC
[LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
Thanks Anton, Yes, I just realized this. I am going through the steps now. So, you're saying that Trident will not work with llvm-2.4? If I have to use llvm-1.5, which is the corresponding C front end? I couldn't locate the C front end package on the Trident Compiler website. Best regards, Elvis Dowson On Dec 29, 2008, at 2:43 AM, Anton Korobeynikov wrote:> Hello, Elvis > >> $ ../src/configure --program-prefix=llvm- --disable-bootstrap >> --enable-checking --enable-languages=c,c++ > You haven't configured llvm-gcc properly. Please do read readme.llvm > file. > > However, afair, Trident was LLVM 1.5-based, and it will require > massive rewrite to use LLVM 2.x > (bytecode format was also changed) > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State > University > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081229/aef47be4/attachment.html>
Elvis Dowson
2008-Dec-28 23:20 UTC
[LLVMdev] Technote llvm-gcc4.2-2.4-001: How to build llvm-gcc4.2-2.4 for Mac OS X 10.5.
Hi, Here are the steps that I followed to create a successful build on Mac OS X 10.5.6. Best regards, Elvis Dowson Technote llvm-gcc4.2-2.4-001: How to build llvm-gcc4.2-2.4 for Mac OS X 10.5.6 Procedure Step 01: Configure, build and install llvm-2.4. Directory structure: llvm-2.4 / build / src The following commands will build a debug version of llvm. $ cd build $ ../src/configure $ make -j 2 ENABLE_OPTIMIZED=0 To build a release version of llvm, type the following command $ make ENABLE_OPTIMIZED=1 Step 02: Configure, build and install llvm-gcc4.2-2.4. When building the llvm-gcc front end with a debug version of llvm, ensure that the --enable-checking configure option is set. If building for Darwin/X86 (32-bit support): TARGETOPTIONS='--with-arch=nocona --with-tune=generic' In addition, you *must* specify the following options to configure: --with-gxx-include-dir=/usr/include/c++/4.0.0 With these options, llvm-gcc will build the same way as Apple's system GCC. Directory structure: llvm-gcc4.2-2.4 / build / install / src Type the following commands to build a debug version of llvm-gcc $ cd build $ export TARGETOPTIONS='--with-arch=nocona --with-tune=generic' $ export TRIPLE=i386-apple-darwin9.6.0 $ export BUILDOPTIONS=LLVM_VERSION_INFO=2.4 $ ../src/configure --enable-checking --with-gxx-include-dir=/usr/ include/c++/4.0.0 --prefix=`pwd`/../install --program-prefix=llvm- -- enable-llvm=$LLVM_HOME/build --enable-languages=c,c++$EXTRALANGS $TARGETOPTIONS --disable-bootstrap --disable-multilib $ make $BUILDOPTIONS -j 2 ENABLE_OPTIMIZED=0 $ make install Step 03: Update PATH environment variable export LLVM_HOME=$HOME/Tool/llvm-2.4 export LLVM_GCC_HOME=$HOME/Tool/llvm-gcc4.2-2.4 export PATH=$PATH:$LLVM_HOME/build/Debug/bin:$LLVM_GCC_HOME/install/bin Step 04: Verify the installation $ llvm-gcc -v $ gcc version 4.2.1 (Based on Apple Inc. build 5623) (LLVM build 2.4) If the -v line above doesn't include "LLVM", you probably mistyped the --enable-llvm=xxx line and have a normal gcc, not an llvm-gcc. Related Topics 01. Nabble - LLVM - Dev - llvm-gcc compilation error: BUILT_IN_ADJUST_TRAMPOLINE undeclared Related Links 01. http://www.llvm.org/ 02. Building the LLVM GCC Front-End -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081229/1f14648b/attachment.html>
Seemingly Similar Threads
- [LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
- [LLVMdev] Error when attempting to build llvm-gcc-1.5 on Mac OS X 10.5.6
- [LLVMdev] Error when attempting to build llvm-gcc-1.5 on Mac OS X 10.5.6
- [LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
- [LLVMdev] Enhancing the Trident compiler