Closed jbflowers closed 8 years ago
Are you running make
in the msysgit console or in cmd.exe
? It will only work in the msysgit console. Adding SHELL=cmd.exe
will most certainly break it too as it will force make
itself to use the wrong console.
Can you try running make
from a directory path with no spaces? It looks from the first error it's running from c:\Program Files
and that might be where it is breaking up.
I'll do some more testing soon to check the guide still works.
Installed make to "C:\GnuWin32\bin" and cloned log-courier to "C:\". Changed my PATH to remove the old entry for "make" and added the new one. Followed the steps outlined in "Building for Windows". Getting this error now:
$ make c:\GnuWin32\bin\make.exe: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)
What version and architecture of Windows?
Windows 7 Ultimate x64
Just an update for anyone that needs a working Windows version, you can cross-compile relatively easily from Linux by:
export GOOS="windows"
and export GOARCH="amd64"
Then simply follow the normal building instructions and a "windows_amd64" directory will be generated in "log-courier/bin" containing the Windows builds.
These are the steps that I use for building Log Courier in Windows, assuming that you installed Go and msysgit already:
/c/mingw/bin/mingw32-make.exe
I found that there was no need to set the Go paths myself; the Go installer should have already done that for you.
I think the problem here is the bash requirement. That's why I specified msysGit. Removing dependency on Git (so you can download .zip and make
) is easy to be fair.
I think at this point rather than me trying to test and reproduce and find out if something msysgit has changed, I will put into the roadmap to just write Windows Shell or Powershell script counterparts for all the build utilities, so the only thing needed is GNU make and Git.
If anyone wants to help it's basically just making a Windows version of build/fix_version
and then removing all Linux syntax from Makefile
- mostly by dragging the bits out into external scripts in build
. Makefile
can detect Windows and run different scripts based on file extension (sh
vs bat
or ps1
). Only grey area would be the tag handling in Makefile
for the with=zmq
flag to make it save the flag for future make
runs without having to specify it again - but to be fair ZeroMQ is going in version 2 so I wouldn't mind losing that (think it's really only useful when I'm developing heh.)
I'm also looking into cross compiling possibilities so I can provide a EXE on the GitHub releases.
I've completely reworked how building works, now only relying on Golang itself to compile. Everything should be fairly clean. I have yet to test it but as it's in the works in master branch and the docs are updated there, once I've tested and ironed out this will be all resolved.
I was able to successfully build the 2.x Windows binaries using the instructions here: https://github.com/driskell/log-courier/blob/master/docs/BuildingFromSource.md#windows
The only additional step currently required is to run git checkout master
before running the go generate ./lc-admin ./lc-lib/core
command, since the 1.x branch is the repo default.
Thanks, that's as expected until I switch the main branch. Will close now!
Firstly, I don't believe mssysgit comes with "make" anymore. I had to install and add it to the path myself.
After installing, using mssysgit I get the following error after calling "make":
"c:\Program: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)
Added "SHELL=C:/Windows/System32/cmd.exe" to the top of the Makefile and got this error:
The system cannot find the path specified. build/fix_version "" 'build' is not recognized as an internal or external command, operable program or batch file. make: *\ [fix_version] Error 1