<html 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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        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;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.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>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black">Hi Justin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">The flang script reads from standard input if a source file is not provided on the command line.  It appears to hang, but it’s really just waiting for input.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Flang isn’t hooked up to a code generator yet, so instead, by default, flang generates another Fortran source file and tries to compile that file with a different compiler.  The default is pgf90, but you can set
 the environment variable F18_FC to be a different compiler, like gfortran.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">The flang script that you are running is just a throwaway driver until the real driver is ready.  That work is under development right now, but I don’t know when it will be ready.  Until then, we have this quirky
 script that lets us test flang semantics.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">- Steve<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">flang-dev <flang-dev-bounces@lists.llvm.org> on behalf of flang-dev <flang-dev@lists.llvm.org><br>
<b>Reply-To: </b>"Szaday, Justin Josef" <szaday2@illinois.edu><br>
<b>Date: </b>Wednesday, June 24, 2020 at 2:02 PM<br>
<b>To: </b>flang-dev <flang-dev@lists.llvm.org><br>
<b>Subject: </b>[flang-dev] Difficulties with In-Tree Build of Flang<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<table class="MsoNormalTable" border="1" cellpadding="0" style="margin-left:.5in;background:#FFEB9C">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">
</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">Hello all,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">I am having a very difficult time getting in-tree builds of Flang working. My build commands are as follows:<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">cmake -G Ninja -DLLVM_ENABLE_PROJECTS="flang" -DCMAKE_INSTALL_PREFIX=$(pwd) -DCMAKE_BUILD_TYPE=MinSizeRel ../llvm<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">cmake --build . --target check-flang<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">cmake --build . --target install<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">The build itself completes successfully, and all the Flang tests pass when using “check-flang”; however, “flang -v” and “flang -h” hang (it does not produce any output and has to be killed) and, when trying to compile
 a program, I get the error message “execvp(pgf90) failed: No such file or directory” (which fails even if I set F18_FC to gfortran or flang). I have tried building it on a few machines to no avail. I have tested both the Debug and MinSizeRel build types, used
 both Ninja and Unix Makefiles to build it, and tested a few different versions of GCC/G++, ultimately settling on v9.1.0. I am building from master of the llvm-project GitHub repository.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Any insights here would be appreciated, I am at a loss about what else to try here. Any other debugging suggestions or usage tips would be appreciated as well.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Justin<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
</div>
</body>
</html>