Óscar Fuentes
2009-Dec-08 19:31 UTC
[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
"Michael Ness" <mike at liquido2.com> writes:> Some additional information about the setup may be of interest: > > I'm using CMake to generate the make files for MSYS. All appears to go well > until the tools are compiled. > > The undefined references seem to be coming from the libraries that were just > compiled: > > ../../lib/libLLVMBitReader.a(BitcodeReader.cpp.obj):fake:(.rdata$linkonce_ZTVN4llvm8ConstantE+0x10): > undefined reference to `llvm::Value::dump() const' > > Apparently it's not being linked with libLLVMCore.a among other libs.What's the output of this command: bin/llvm-config --libs "bitreader asmparser bitwriter instrumentation scalaropts ipo" (executed from the root of your build directory) Does it mention libLLVMCore ? From your command line it seems that CMake was unable to determine the library dependencies. Either the dependencies are wrong (hence the llvm-config check above) or the CMake build is misinterpreting the output of llvm-config. I don't know how well the LLVM cmake build worked for 2.5. In theory, it should work the same way as for a unix host. In practice... -- Óscar
Michael Ness
2009-Dec-10 03:29 UTC
[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
Thanks Óscar, I decided to forget 2.5 and move on to 2.6 which built fine with CMake. However, I continue to have problems with llvm-config when using the following command: $ llvm-g++ out.s -o out `llvm-config --ldflags --libs core support system x86` I consistently get undefined reference errors that are from libraries that should've been linked already. The errors change depending on the order of the components. There is obviously dependency issues--references to libs that have already been linked. How do I resolve these dependency problems? Also, I'm unable to use "llvm-config --libs all" because I receive the error: "llvm-config: unknown component name: pic16codegen" llvm-config --components doesn't list pic16codegen, so I'm confused why it's included with --libs all. --Mike Ness -------------------------------------------------- From: "Óscar Fuentes" <ofv at wanadoo.es> Sent: Tuesday, December 08, 2009 1:31 PM To: <llvmdev at cs.uiuc.edu> Subject: Re: [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows> "Michael Ness" <mike at liquido2.com> writes: > >> Some additional information about the setup may be of interest: >> >> I'm using CMake to generate the make files for MSYS. All appears to go >> well >> until the tools are compiled. >> >> The undefined references seem to be coming from the libraries that were >> just >> compiled: >> >> ../../lib/libLLVMBitReader.a(BitcodeReader.cpp.obj):fake:(.rdata$linkonce_ZTVN4llvm8ConstantE+0x10): >> undefined reference to `llvm::Value::dump() const' >> >> Apparently it's not being linked with libLLVMCore.a among other libs. > > What's the output of this command: > > bin/llvm-config --libs "bitreader asmparser bitwriter instrumentation > scalaropts ipo" > > (executed from the root of your build directory) > > Does it mention libLLVMCore ? From your command line it seems that CMake > was unable to determine the library dependencies. Either the > dependencies are wrong (hence the llvm-config check above) or the CMake > build is misinterpreting the output of llvm-config. > > I don't know how well the LLVM cmake build worked for 2.5. In theory, it > should work the same way as for a unix host. In practice... > > -- > Óscar > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Óscar Fuentes
2009-Dec-10 04:02 UTC
[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
"Michael Ness" <mike at liquido2.com> writes:> I decided to forget 2.5 and move on to 2.6 which built fine with CMake. > However, I continue to have problems with llvm-config when using the > following command: > > $ llvm-g++ out.s -o out `llvm-config --ldflags --libs core support system > x86` > > I consistently get undefined reference errors that are from libraries that > should've been linked already. The errors change depending on the order of > the components. There is obviously dependency issues--references to libs > that have already been linked. How do I resolve these dependency problems?What's the output of llvm-config --libs x86 ? Take a look at the $LLVM_BUILD_ROOT/bin/llvm-deps script and see if the library dependencies listed at the end looks normal, i.e. every library depends on other libraries, with Support and System on almost every dependency list.> Also, I'm unable to use "llvm-config --libs all" because I receive the > error: "llvm-config: unknown component name: pic16codegen" > llvm-config --components doesn't list pic16codegen, so I'm confused why > it's included with --libs all.Maybe there is a bug on the generation of library dependencies. This may due to a faulty binutils or perl. Maybe there is a problem with the name of some components too, they changed names on the last months. What command line options do you pass to cmake? (variables, switches, etc). -- Óscar
Apparently Analagous Threads
- [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
- [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
- [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
- [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
- [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows