Rui Ueyama via llvm-dev
2019-Mar-02 00:42 UTC
[llvm-dev] error building LLVM opt tool under Cygwin
On Thu, Feb 28, 2019 at 3:15 PM Eli Friedman via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > -----Original Message----- > > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of s n via > llvm-dev > > Sent: Wednesday, February 27, 2019 9:31 PM > > To: llvm-dev at lists.llvm.org > > Subject: [EXT] [llvm-dev] error building LLVM opt tool under Cygwin > > > > Hello, I downloaded and built llvm-7.0.1 as per the instructions on the > > website docs. It seems that I can run many of the tools in build/bin (eg > > llvm-diff or count etc) with the exception of opt where I get "-bash: > > ./opt.exe: cannot execute binary file: Exec format error". I tried > > rebuilding just opt but still no luck. An ideas? > > "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. >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.) In general, Cygwin is not well tested; if you can, I'd recommend using> mingw or Visual Studio instead. > > > > > This is frustrating because opt is the tool I am most interested in, and > > the reason I built llvm at all instead of relying on the binary > > distribution. > > > > On a somewhat unrelated note, what does make install actually do. I ran > > "cmake -DMAKE_INSTALL_PREFIX=..../llvm-project/install -P > > cmake_Install.cmake" and it ran for a long time, but I couldn't tell > > what it actually did. eg I couldn't see any directory called > > ..../llvm=project/install" > > The correct option is "-DCMAKE_INSTALL_PREFIX=..."; like you would expect, > it's supposed to set the install prefix. > > -Eli > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190301/8e01808f/attachment.html>
s nedunuri via llvm-dev
2019-Mar-03 05:05 UTC
[llvm-dev] error building LLVM opt tool under Cygwin
On Fri, Mar 1, 2019 at 4:43 PM Rui Ueyama <ruiu at google.com> wrote:> On Thu, Feb 28, 2019 at 3:15 PM Eli Friedman via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> > -----Original Message----- >> > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of s n via >> llvm-dev >> > Sent: Wednesday, February 27, 2019 9:31 PM >> > To: llvm-dev at lists.llvm.org >> > Subject: [EXT] [llvm-dev] error building LLVM opt tool under Cygwin >> > >> > Hello, I downloaded and built llvm-7.0.1 as per the instructions on the >> > website docs. It seems that I can run many of the tools in build/bin (eg >> > llvm-diff or count etc) with the exception of opt where I get "-bash: >> > ./opt.exe: cannot execute binary file: Exec format error". I tried >> > rebuilding just opt but still no luck. An ideas? >> >> "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. >> > > 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.) >hi, no I'm pretty sure its not a problem with disk space - i have 139Gb free.> > In general, Cygwin is not well tested; if you can, I'd recommend using >> mingw or Visual Studio instead. >> > Its very odd because a random selection of other generated executablesseem 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?> >> > >> > This is frustrating because opt is the tool I am most interested in, and >> > the reason I built llvm at all instead of relying on the binary >> > distribution. >> > >> > On a somewhat unrelated note, what does make install actually do. I ran >> > "cmake -DMAKE_INSTALL_PREFIX=..../llvm-project/install -P >> > cmake_Install.cmake" and it ran for a long time, but I couldn't tell >> > what it actually did. eg I couldn't see any directory called >> > ..../llvm=project/install" >> >> The correct option is "-DCMAKE_INSTALL_PREFIX=..."; like you would >> expect, it's supposed to set the install prefix. >> > 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 thanks> >> -Eli >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190302/e285784d/attachment.html>
Eli Friedman via llvm-dev
2019-Mar-04 20:27 UTC
[llvm-dev] [EXT] Re: error building LLVM opt tool under Cygwin
(Comments inline.)> -----Original Message----- > From: s nedunuri <ss.nedunuri at gmail.com> > Sent: Saturday, March 2, 2019 9:06 PM > To: Rui Ueyama <ruiu at google.com> > Cc: Eli Friedman <efriedma at quicinc.com>; llvm-dev <llvm-dev at lists.llvm.org> > Subject: [EXT] Re: [llvm-dev] error building LLVM opt tool under Cygwin > > 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?The only difference I can think of is that opt is substantially bigger that FileCheck etc.; a debug build with full debug info is on the order of gigabytes in size. Maybe you're running into some implementation limit? For example, if your disk is formatted as FAT32, or you're using 32-bit Cygwin, it might be impossible to emit an executable greater than 4GB. You could try a release build instead as an experiment (-DCMAKE_BUILD_TYPE=Release).> 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 doesIt changes where "make install"/"ninja install" places the installed files. -Eli