<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta content="MSHTML 6.00.3790.4186" name="GENERATOR">
</head>
<body>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">Scott,</font></span></div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">did you try a simple</font></span></div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span class="843320607-05052009"> $ ../llvm-2.5/configure --prefix=/pkg/bin/llvm/ CC=/pkg/bin/gcc-4.2.4/bin/gcc CXX=/pkg/bin/gcc-4.2.4/bin/g++
</span></div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">This is how I use to configure for non-system gcc 4.3.2 and it works well. The right headers are included automatically</font></span></div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">from the correct directory, and besides that I think that none of the std libraries is linked statically I guess it would</font></span></div>
<div dir="ltr" align="left"><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">pick the right ones as well. Just make sure to load the right shared libs on runtime.</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div><span class="843320607-05052009"><font face="Arial" color="#0000ff" size="2">Regards, Christian</font></span></div>
<div class="Section1">
<p class="MsoNormal"><span lang="FR" style="FONT-FAMILY: Arial; mso-ansi-language: FR"> --
<?xml:namespace prefix 
= o ns = "urn:schemas-microsoft-com:office:office" />
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="FONT-FAMILY: Arial; mso-ansi-language: FR"><span style="mso-spacerun: yes"> 
</span>Christian SAYER<o:p></o:p></span></p>
</div>
<div> </div>
<br>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left">
<hr tabindex="-1">
<font face="Tahoma" size="2"><b>From:</b> llvmdev-bounces@cs.uiuc.edu [mailto:llvmdev-bounces@cs.uiuc.edu]
<b>On Behalf Of </b>Scott Ricketts<br>
<b>Sent:</b> Monday, May 04, 2009 7:40 PM<br>
<b>To:</b> llvmdev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end<br>
</font><br>
</div>
<div></div>
I am still having problems getting everything installed. I realized that the successful build of llvm-2.5 had in fact been configured to use the system gcc (4.1.2). However, I was unable to sucessfully build llvm-gcc with gcc 4.1.2.<br>
<br>
I went back and attempted to build llvm-2.5 with gcc-4.2.4 (installed in a separate directory from system gcc). However, I got the same build error as before.<br>
<br>
Then I went back again to attempt to build llvm-2.5 with the system gcc, and was unable to reproduce a successful build. So something is wrong with my recollection of history.<br>
<br>
I think I am just configuring incorrectly. I would like to use the installation of gcc-4.2.4, which is located in /pkg/bin/gcc-4.2.4. Perhaps someone has done something similar and can provide me a working example?<br>
<br>
Details:<br>
<br>
*** llvm-2.5 configured to use gcc-4.2.4:<br>
<br>
$ ../llvm-2.5/configure --prefix=/pkg/bin/llvm/ CC=/pkg/bin/gcc-4.2.4/bin/gcc CXX=/pkg/bin/gcc-4.2.4/bin/g++ CXXCPP=/pkg/bin/gcc-4.2.4/bin/cpp LDFLAGS=-L/pkg/bin/gcc-4.2.4/lib64/ CXXFLAGS=-I/pkg/bin/gcc-4.2.4/include/c++/4.2.4/ CPPFLAGS=-I/pkg/bin/gcc-4.2.4/include/<br>
<br>
llvm-2.5 build:<br>
<br>
$ make tools-only<br>
<br>
error:<br>
<br>
make[1]: Entering directory `/pkg/build/llvm/llvm-obj/lib/VMCore'<br>
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td<br>
/pkg/build/llvm/llvm-obj/Release/bin/tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /pkg/build/llvm/llvm-obj/Release/bin/tblgen)<br>
make[1]: *** [/pkg/build/llvm/llvm-obj/lib/VMCore/Release/Intrinsics.gen.tmp] Error 1<br>
make[1]: Leaving directory `/pkg/build/llvm/llvm-obj/lib/VMCore'<br>
make: *** [all] Error 1<br>
<br>
<br>
*** llvm-2.5 configured to use default gcc (4.1.2):<br>
<br>
$ ../llvm-2.5/configure --prefix=/pkg/bin/llvm/<br>
<br>
llvm-2.5 build:<br>
<br>
$ make tools-only<br>
<br>
error (something like):<br>
<br>
X86ISelDAGToDAG.cpp internal compiler error: Segmentation fault<br>
<br>
<div class="gmail_quote">On Fri, May 1, 2009 at 6:20 PM, Scott Ricketts <span dir="ltr">
<<a href="mailto:sricketts@maxentric.com">sricketts@maxentric.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
Ah, nevermind... just needed to make clean to clear out some of the junk I compiled with gcc-4.1.2. The build completed without error.
<div>
<div></div>
<div class="h5"><br>
<br>
<div class="gmail_quote">On Fri, May 1, 2009 at 2:14 PM, Scott Ricketts <span dir="ltr">
<<a href="mailto:sricketts@maxentric.com" target="_blank">sricketts@maxentric.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
I am attempting to install llvm on CentOS 5.3, which uses gcc-4.1.2 as its system compiler. Since this compiler has reported to behave poorly with llvm, I built gcc-4.2.4 in an insulated directory for use with my llvm installation.
<br>
<br>
However, I am not sure I am configuring properly. The gcc-4.2.4 installation is in /pkg/bin/gcc-4.2.4. Here is my config line:<br>
<br>
../llvm-2.5/configure --prefix=/pkg/bin/llvm/ CC=/pkg/bin/gcc-4.2.4/bin/gcc CXX=/pkg/bin/gcc-4.2.4/bin/g++ CXXCPP=/pkg/bin/gcc-4.2.4/bin/cpp LDFLAGS=-L /pkg/bin/gcc-4.2.4/lib64/  CXXFLAGS=-I/pkg/bin/gcc-4.2.4/include/c++/4.2.4/ CPPFLAGS=-I/pkg/bin/gcc-4.2.4/include/<br>
<br>
I am trying to specify all the appropriate environment variables for using the non-default gcc. However, it is likely that I have made an error or are ommitting some important variable(s).<br>
<br>
Then I do "gmake tools-only" (because I have yet to build the llvm-gcc front end). Here is the error:<br>
<br>
gmake[1]: Entering directory `/pkg/build/llvm/llvm-obj/lib/VMCore'<br>
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td<br>
/pkg/build/llvm/llvm-obj/Release/bin/tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /pkg/build/llvm/llvm-obj/Release/bin/tblgen)<br>
gmake[1]: *** [/pkg/build/llvm/llvm-obj/lib/VMCore/Release/Intrinsics.gen.tmp] Error 1<br>
gmake[1]: Leaving directory `/pkg/build/llvm/llvm-obj/lib/VMCore'<br>
gmake: *** [all] Error 1<br>
<br>
<br>
So it is looking in /usr/lib64/ for libstdc++.so.6, when in fact I want it to look in /pkg//bin/gcc-4.2.4/lib64/ (which I thought I had specified with the configuration).<br>
<br>
Any help would be appreciated.<br>
<br>
Thanks,<br>
<font color="#888888">Scott<br>
</font></blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<hr>
<font face="Arial" color="Gray" size="-2">CONFIDENTIAL NOTICE: The contents of this message, including any attachments, are confidential and are intended solely for the use of the person or entity to whom the message was addressed. If you are not the intended
 recipient of this message, please be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify the sender. Please also permanently delete all copies of
 the original message and any attached documentation. Thank you.<br>
</font>
</body>
</html>