<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I eventually found a solution to this problem, which I’ll post here in case anyone ever has the same trouble.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">The solution was to add the –rpath linker option as follows:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">../src/llvm-3.3/configure --enable-doxygen --enable-jit --prefix=`pwd` LDFLAGS=-Wl,-rpath=/depot/gcc-4.5.2/lib64<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I got the idea from <a href="http://stackoverflow.com/questions/1952146/glibcxx-3-4-9-not-found">
http://stackoverflow.com/questions/1952146/glibcxx-3-4-9-not-found</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Andy Jost
<br>
<b>Sent:</b> Monday, July 01, 2013 3:51 PM<br>
<b>To:</b> 'Hinton, Don'; 'Andy Jost'; LLVMdev@cs.uiuc.edu<br>
<b>Subject:</b> RE: Build problem with nonstandard lib directory<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks, Don. This change had no effect. Anything else I could try?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> 174 15:47 mkdir build<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> 175 15:47 cd build/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> 176 15:47 ../src/llvm-3.3/configure --enable-doxygen --enable-jit --prefix=`pwd` --with-gcc-toolchain=/depot/gcc-4.5.2/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> 177 15:49 gmake -j12<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Hinton, Don
<a href="mailto:[mailto:Don.Hinton@pimco.com]">[mailto:Don.Hinton@pimco.com]</a> <br>
<b>Sent:</b> Monday, July 01, 2013 12:22 PM<br>
<b>To:</b> 'Andy Jost'; <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><br>
<b>Subject:</b> RE: Build problem with nonstandard lib directory<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi Andy:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Please add this to your configure invocation:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> --with-gcc-toolchain=</span>/depot/gcc-4.5.2<span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">hth…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">don<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a> <a href="mailto:[mailto:llvmdev-bounces@cs.uiuc.edu]">
[mailto:llvmdev-bounces@cs.uiuc.edu]</a> <b>On Behalf Of </b>Andy Jost<br>
<b>Sent:</b> Sunday, June 30, 2013 6:12 PM<br>
<b>To:</b> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><br>
<b>Subject:</b> [LLVMdev] Build problem with nonstandard lib directory<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m having trouble building LLVM 3.3 on RHEL 2.6.9-89.ELlargesmp x86_64. This is most likely a problem with my not knowing the advanced usage of the configure script, but I’m stuck just the same. I hope this list is an appropriate place
for this question.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The system I’m working on is a bit unusual. It is a shared server not administered by me (I can’t change the configuration), and the “normal” system directories like /usr/include, /usr/lib and so on contain mostly very old and outdated
things. For instance, /usr/bin/g++ is gcc version 3.4.6. I access newer versions though a non-standard directory, e.g., /depot/gcc-4.5.2/bin/g++ is gcc version 4.5.2 (the version I want to use).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve checked out the LLVM 3.3 code, and I try to configure and build it like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">../src/llvm-3.3/configure --enable-doxygen --enable-jit --prefix=`pwd`/bin<o:p></o:p></p>
<p class="MsoNormal">gmake -j12<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After several step succeed, I eventually get the following error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><clip>/build/Debug+Asserts/bin/llvm-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.5' not found (required by <clip>/build/Debug+Asserts/bin/llvm-tblgen)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I know this error. It occurs when the default /usr/lib64 path is used for dynamic loading instead of the non-standard /depot/gcc-4.5.2/lib64. Normally, I need to set LD_LIBRARY_PATH on this system. I confirmed that with LD_LIBRARY_PATH
set, I can invoke llvm-tblgen, and the without that variable set, I get exactly the error shown. Also, LD_LIBRARY_PATH is correctly set when configure is called, and when gmake is called.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So how can I adjust the build process? I suspect there is an option I can pass to configure, but I haven’t been able to figure out what it would be. For example, I tried adding LD_LIBRARY_PATH=$LD_LIBRARY_PATH to the configure command
line to no avail.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any help would be greatly appreciated!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Andy<o:p></o:p></p>
</div>
<p><br>
This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender,
therefore, does not accept liability for any errors or omissions in the contents of this message which arise during or as a result of e-mail transmission. If verification is required, please request a hard-copy version. This message is provided for information
purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments in any jurisdiction.<o:p></o:p></p>
</div>
</body>
</html>