Oleg Smolsky wrote:> I've just tried building CVS/HEAD of llvm using gcc 4.0.0 that I have > installed to /opt/gcc... then you should either add /opt/gcc/lib to /etc/ld.so.conf and rerun ldconfig, or add /opt/gcc/lib to your LD_LIBRARY_PATH . However, GCC 4.x definitely has issues building LLVM, at least on ia64. If you want to use LLVM in anger, I'd stick with 3.4 for now. Duraid
Hello Duraid, Duraid Madina wrote on Wednesday, 11 May 2005:>> I've just tried building CVS/HEAD of llvm using gcc 4.0.0 that I >> have installed to /opt/gcc > ... then you should either add /opt/gcc/lib to /etc/ld.so.conf and > rerun ldconfig, or add /opt/gcc/lib to your LD_LIBRARY_PATH . > However, GCC 4.x definitely has issues building LLVM, at least on > ia64.Oh, that helped, thanks. I wonder though, why could I build other smaller apps.... May be it's due to static libraries.....> If you want to use LLVM in anger, I'd stick with 3.4 for now.Yes, I'd like to, but debian's version segfaults on llvm..... Best regards, Oleg.
Oleg Smolsky wrote:>>If you want to use LLVM in anger, I'd stick with 3.4 for now. > > Yes, I'd like to, but debian's version segfaults on llvm.....You might like to try the following: 1) get a recent binutils CVS snapshot e.g.: http://strawberry.resnet.mtu.edu/pub/gcc/binutils/snapshots/binutils.tar.bz2 2) build it 3) get the GCC 3.4.3 release 4) configure it, being sure to add --with-as=/the/as/you/just/built and --with-ld=/the/ld/you/just/built 5) use the resulting gcc/g++ to build LLVM Doing this works fine on x86 and ia64, and using the recent binutils will cut your LLVM build time by 20% if you're doing a debug build.* If you're lazy like me and keep relinking large binaries because that's the easy thing to do, this can save you a fair bit of time. Unfortunately, the really fast way to build LLVM is to avoid GCC/GNU binutils completely. It's been a while since I did it last, but on a 4-way HP-UX system I could build LLVM in under 2 minutes. A comparable 2-way Linux system, on the other hand, takes about 10 minutes. This probably has a lot to do with the architecture in question, though. I'd be curious to know what build times with MSVC are like. Duraid P.S. For the GCC spies^Wgurus out there: At least on x86 and ia64, GCC often compiles C++ codes _quicker_ than other compilers, but this really doesn't seem to be the case with LLVM. Does anyone have any idea what it might be about LLVM that's tickling GCC the wrong way?
Oleg, I've been building LLVM successfully on Linux with 4.0.0 since it was released. However, I did run into exactly the same problem you were having. The problem is shared libraries. Somewhere in your system, you're attempting to mix and match a 3.4 compiled library with a 4.0 compiled library and that's not allowed so you get the runtime error. As Chris pointed out, and the error message states, the error is with the libstdc++.so .6 library. The system is trying to load libstdc++.so at runtime and its version is 4.0.0. However, when you compiled tblgen at least one of those files was compiled with 3.4 header files. You need to ensure that your INCLUDES (during configuration) points to the g++ 4.0.0 headers, not the system ones or the ones from your 3.4 bootstrap compiler. Reid. On Wed, 2005-05-11 at 17:21 +1200, Oleg Smolsky wrote:> Hello Duraid, > > Duraid Madina wrote on Wednesday, 11 May 2005: > >> I've just tried building CVS/HEAD of llvm using gcc 4.0.0 that I > >> have installed to /opt/gcc > > ... then you should either add /opt/gcc/lib to /etc/ld.so.conf and > > rerun ldconfig, or add /opt/gcc/lib to your LD_LIBRARY_PATH . > > However, GCC 4.x definitely has issues building LLVM, at least on > > ia64. > Oh, that helped, thanks. I wonder though, why could I build other > smaller apps.... May be it's due to static libraries..... > > > If you want to use LLVM in anger, I'd stick with 3.4 for now. > Yes, I'd like to, but debian's version segfaults on llvm..... > > Best regards, > Oleg. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050511/c771f2b4/attachment.sig>