According to your description i should not use the system libstdc++ and i need to specify the OTHER compiler libstdc++. But i don't where the OTHER compiler libstdc++ is. Is the OTHER compiler libstdc++ contained in llvm-2.5.tar.gz? if not where can i get it? 2009/10/20, Duncan Sands <baldrick at free.fr>:> > Hi Heyu Zhu, > > Then then the error is: >> /tools/IUS611/tools/lib/libgcc_s.so.1: version `GCC_4.2.0' not found >> (required by /usr/lib/libstdc++.so.6) >> > > you can get this if you compile C++ code using a different compiler to > your system compiler. Based on the error message, your system compiler > is gcc-4.2 and the other compiler is probably gcc-4.3 or later. What > has happened is that LLVM has been linked using the system libstdc++, > which is from gcc-4.2, and which requires libgcc from the same version > of gcc, namely gcc-4.2. However it is getting libgcc from the other > compiler and complaining. What you need to do is to link with the > version of libstdc++ that came with the other compiler. > > Ciao, > > Duncan. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091020/235345dd/attachment.html>
Heyu Zhu <zhu.heyu at gmail.com> writes:> According to your description i should not use the system libstdc++ > and i need to specify the OTHER compiler libstdc++. But i don't where > the OTHER compiler libstdc++ is. Is the OTHER compiler libstdc++ > contained in llvm-2.5.tar.gz? if not where can i get it?g++ should use the right libstdc++ automatically. If it doesn't, most probable cause is a defective installation. Start by compiling a simple C++ program like this: #include <iostream> int main() { std::cout << "Hello!"; } (compile it with g++) If that fails with the same error, you need to fix your C++ setup. A forum or mailing list of gcc users is the right place for helping you on that. -- Óscar
Hi Heyu Zhu,> According to your description i should not use the system libstdc++ and > i need to > specify the OTHER compiler libstdc++. But i don't where the OTHER compiler > libstdc++ is. > Is the OTHER compiler libstdc++ contained in llvm-2.5.tar.gz? if not > where can i get it?this has nothing to do with llvm, you would have the same problem with any C++ code that uses the C++ standard library. As far as I can see you have installed a second compiler under /tools/IUS611/tools/. Try looking for libstdc++ in /tools/IUS611/tools/lib. Ciao, Duncan.
Thanks to Duncan and Óscar Fuentes. With your help i have known the reason. I do install another software/tool in tools/IUS611/tools/lib and unfortunately the tool's lirary file has the same name with gcc/g++'s, so error occurs. After i modify LD_LIBRARY_PATH, i build the llvm successfully 2009/10/20, Duncan Sands <baldrick at free.fr>:> > Hi Heyu Zhu, > > According to your description i should not use the system libstdc++ and i >> need to >> specify the OTHER compiler libstdc++. But i don't where the OTHER compiler >> libstdc++ is. >> Is the OTHER compiler libstdc++ contained in llvm-2.5.tar.gz? if not >> where can i get it? >> > > this has nothing to do with llvm, you would have the same problem with > any C++ code that uses the C++ standard library. As far as I can see > you have installed a second compiler under /tools/IUS611/tools/. Try > looking for libstdc++ in /tools/IUS611/tools/lib. > > Ciao, > > Duncan. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091020/1abcb2f1/attachment.html>