The build process fails to link the LLVM tools. Specifically, the first tool to build is 'opt' which results in 700+ undefined symbols. I looked into the Makefiles and found that the "LINK_COMPONENTS" make variable does not get the correct set of libraries. In fact, at the top level Makefile.rules, the variable is set to "support system", however, these do not seem to make it to the 'opt' make context. The list of libraries for 'opt' is (from the g++ link command): ... -lLLVMipo -lLLVMScalarOpts -lLLVMInstrumentation -lLLVMAsmParser - lLLVMBitWriter -lLLVMBitReader ... It is missing at a minimum LLVMCore, which when added reduces the unresolved externals to 400+. Guidance about how to deal with the link process would be great. [Background] $ uname -a SunOS A64009 5.11 snv_111b i86pc i386 i86pc GCC-4.4.4, GMP-4.3.2, MPFR-2.4.2 $ gcc -v Using built-in specs. Target: i386-pc-solaris2.11 Configured with: ../gcc-4.4.4/configure --prefix=/opt/common/app/gcc/ current --with-mpfr=/opt/common/app/gcc/current --with-gmp=/opt/common/ app/gcc/current --enable-languages=c,c++ --enable-shared --enable- threads Thread model: posix gcc version 4.4.4 (GCC) LLVM 2.7 [Release]: ../llvm-2.7/configure --with-built-clang --prefix=/opt/common/app/gcc/ current --enable-targets=host,x86_64
On Jul 29, 2010, at 5:36 PM, Laszlo Kiss wrote:> The build process fails to link the LLVM tools. Specifically, the > first tool to build is 'opt' which results in 700+ undefined symbols. > > I looked into the Makefiles and found that the "LINK_COMPONENTS" make > variable does not get the correct set of libraries. In fact, at the > top level Makefile.rules, the variable is set to "support system", > however, these do not seem to make it to the 'opt' make context. > > The list of libraries for 'opt' is (from the g++ link command): > > ... -lLLVMipo -lLLVMScalarOpts -lLLVMInstrumentation -lLLVMAsmParser - > lLLVMBitWriter -lLLVMBitReader ... > > It is missing at a minimum LLVMCore, which when added reduces the > unresolved externals to 400+. > > Guidance about how to deal with the link process would be great. >It should work, however, none of us that I know of have access to solaris. At minimum you should file a bug (llvm.org/bugs) with your configure and make output. I'm also curious why you chose those configure options (not --prefix, the others). -eric
I'm interested in using LLVM for compiling to x86_64 native code (ELF64), so I selected 'x86_64' as the architecture. I added 'host' just-in-case... The '--with-built-clang' selection is for building the Clang LLVM C compiler instead of using a gcc front end. I placed the Clang distribution in './tools/clang'. On Jul 29, 2010, at 5:40 PM, Eric Christopher wrote:> > On Jul 29, 2010, at 5:36 PM, Laszlo Kiss wrote: > >> The build process fails to link the LLVM tools. Specifically, the >> first tool to build is 'opt' which results in 700+ undefined symbols. >> >> I looked into the Makefiles and found that the "LINK_COMPONENTS" make >> variable does not get the correct set of libraries. In fact, at the >> top level Makefile.rules, the variable is set to "support system", >> however, these do not seem to make it to the 'opt' make context. >> >> The list of libraries for 'opt' is (from the g++ link command): >> >> ... -lLLVMipo -lLLVMScalarOpts -lLLVMInstrumentation - >> lLLVMAsmParser - >> lLLVMBitWriter -lLLVMBitReader ... >> >> It is missing at a minimum LLVMCore, which when added reduces the >> unresolved externals to 400+. >> >> Guidance about how to deal with the link process would be great. >> > > It should work, however, none of us that I know of have access to > solaris. > > At minimum you should file a bug (llvm.org/bugs) with your configure > and > make output. > > I'm also curious why you chose those configure options (not -- > prefix, the > others). > > -eric >