odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.55k stars 570 forks source link

Failed to execute command #282

Closed bogez57 closed 5 years ago

bogez57 commented 5 years ago

After trying to build latest release I get this error:

Failed to execute command: "C:\Users\UserName\Desktop\Odin-master\bin/opt" "C:\Users\UserName\Desktop\Odin-master\demo.ll" -o "C:\Users\Jason\Desktop\Odin-master\demo.bc" -memcpyopt -die

The compiler still builds but anytime I try and use it to build the same error will pop up.

vassvik commented 5 years ago

Do you have the LLVM binaries in Odin/bin?

gingerBill commented 5 years ago

https://github.com/odin-lang/Odin/wiki#getting-started-with-odin

bogez57 commented 5 years ago

Yes, still get the error. What I've done:

1.) downloaded latest master branch as zip 2.) unzipped into "Odin" folder on desktop 3.) Copied over latest release of LLVM bin folder (version 7.0) to Odin folder 4.) navigated to vcvarsall.bat and ran 'vcvarsall.bat x64' command 5.) navigated back to Odin folder in cmd prompt and ran build.bat

bogez57 commented 5 years ago

Trying to think of things. Should this line:

"C:\Users\UserName\Desktop\Odin-master\bin/opt"

say this instead:

"C:\Users\UserName\Desktop\Odin-master\bin" /opt

gingerBill commented 5 years ago

No. This is an interesting but serious issue I have never seen before. 🤔

bogez57 commented 5 years ago

Have tried with both VS 2017 and VS 2015 as well.

gingerBill commented 5 years ago

Sorry to be a pain but could you state what you are doing very precisely?

Are you calling vcvarsall.bat x64 in the same command window as the Odin call? Are you sure you have the bin directory in the same directory as odin.exe?

bogez57 commented 5 years ago

No, not at all. And yes. I've attached an image to try and show the process with the command window

odin_issue

gingerBill commented 5 years ago

And what is contained inside of bin?

bogez57 commented 5 years ago

I copied it straight from LLVM folder:

bandicam 2018-11-22 10-55-22-334

gingerBill commented 5 years ago

Ah... That is not what you are meant to do as opt is not always included with LLVM. I provide the required LLVM binaries here: https://github.com/odin-lang/Odin/archive/llvm-windows.zip

bogez57 commented 5 years ago

Ah, I see. If anyone else has this issue make sure you download his llvm binaries from this link:

https://github.com/odin-lang/Odin/releases/tag/llvm-windows