<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 4:43 PM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Feb 28, 2019 at 3:15 PM Eli Friedman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> -----Original Message-----<br>
> From: llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> On Behalf Of s n via llvm-dev<br>
> Sent: Wednesday, February 27, 2019 9:31 PM<br>
> To: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> Subject: [EXT] [llvm-dev] error building LLVM opt tool under Cygwin<br>
> <br>
> Hello, I downloaded and built llvm-7.0.1 as per the instructions on the<br>
> website docs. It seems that I can run many of the tools in build/bin (eg<br>
> llvm-diff or count etc) with the exception of opt where I get "-bash:<br>
> ./opt.exe: cannot execute binary file: Exec format error". I tried<br>
> rebuilding just opt but still no luck. An ideas?<br>
<br>
"Exec format error" means the file is corrupted, or not an executable.  Not sure how you would get that result without the build producing some sort of error message.  You could try "file opt.exe" to rule out the possibility that it's something that isn't an executable.  Maybe try cleaning and rebuilding.  Also, use a verbose build ("make VERBOSE=1" or "ninja -v") to see the command that actually produces opt.exe.<br></blockquote><div><br></div><div>When the disk is almost full, some tools create broken executable. I don't know if this is the case though. (If that's the case, you need to delete files to fix it.) </div></div></div></blockquote><div>
hi, no I'm pretty sure its not a problem with disk space - i have 139Gb free.  

<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
In general, Cygwin is not well tested; if you can, I'd recommend using mingw or Visual Studio instead.<br></blockquote></div></div></blockquote><div>Its very odd because a random selection of other generated executables seem to run just fine.  What about opt could cause problems with cygwin? I am running the executable from llvm-project/build/bin - I assume that's fine?<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> <br>
> This is frustrating because opt is the tool I am most interested in, and<br>
> the reason I built llvm at all instead of relying on the binary<br>
> distribution.<br>
> <br>
> On a somewhat unrelated note, what does make install actually do. I ran<br>
> "cmake -DMAKE_INSTALL_PREFIX=..../llvm-project/install -P<br>
> cmake_Install.cmake" and it ran for a long time, but I couldn't tell<br>
> what it actually did. eg I couldn't see any directory called<br>
> ..../llvm=project/install"<br>
<br>
The correct option is "-DCMAKE_INSTALL_PREFIX=..."; like you would expect, it's supposed to set the install prefix.<br></blockquote></div></div></blockquote><div>sorry that was a typo in transcribing. The actual text I typed was  
"-DCMAKE_INSTALL_PREFIX=...". But I am still not clear what it actually does</div><div><br></div><div>thanks<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Eli<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>
</blockquote></div></div>