driskell / log-courier

The Log Courier Suite is a set of lightweight tools created to ship and process log files speedily and securely, with low resource usage, to Elasticsearch or Logstash instances.
Other
419 stars 107 forks source link

Unable to build in windows - argument to word must be greater than 0. #223

Closed Pentom closed 8 years ago

Pentom commented 9 years ago

Makefile:3: *\ first argument to `word' function must be greater than 0. Stop.

Traced to line: MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

From error text, appears that '$(MAKEFILE_LIST)' is empty.

Data point - I was able to successfully run make in logstash-forwarder and successfully build with the go command there.

OS: Windows 7 Ultimate, SP1 Go Installed at c:\go

Any suggestions here?

driskell commented 9 years ago

What make version do you have? You'll need GNU make and it maybe you are using a different one.

Pentom commented 9 years ago

Very reasonable question, apologies on leaving that out: GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.

Via cygwin:

$ make --version GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i686-pc-cygwin Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Report bugs to bug-make@gnu.org.

Via git shell:

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i686-pc-cygwin Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Report bugs to bug-make@gnu.org.

Via mingw:

sh.exe"-3.1$ make --version GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i686-pc-cygwin Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Report bugs to bug-make@gnu.org.

sh.exe"-3.1$

driskell commented 9 years ago

Thanks. That's strange as MAKEFILE_LIST is supposed to contain the currently running makefile (it's GNU specific though)

So I've got all the information I can get before I start up a Windows VM and try to reproduce - can you let me know exactly how you are running make? Maybe a snapshot of the command line or something showing the pwd (current working directory) and what command is being run, and the output of that command (which will include the error of Makefile:3). Thanks.

Pentom commented 9 years ago

sh.exe"-3.1$ pwd /c/temp/log-courier-1.5/log-courier-1.5 sh.exe"-3.1$ make Makefile:3: *\ first argument to `word' function must be greater than 0. Stop.

sh.exe"-3.1$

driskell commented 9 years ago

I see your prompt is something I've never seen before. What kind of terminal is it?

Pentom commented 9 years ago

That was mingw but I have tried a few now.

cygwin: Pentom@PentomI7 /cygdrive/c/temp/log-courier-1.5/log-courier-1.5 $ pwd /cygdrive/c/temp/log-courier-1.5/log-courier-1.5

Pentom@PentomI7 /cygdrive/c/temp/log-courier-1.5/log-courier-1.5 $ make Makefile:3: *\ first argument to `word' function must be greater than 0. Stop.

Pentom@PentomI7 /cygdrive/c/temp/log-courier-1.5/log-courier-1.5


Git Shell: C:\temp\log-courier-1.5\log-courier-1.5> pwd

Path

C:\temp\log-courier-1.5\log-courier-1.5

C:\temp\log-courier-1.5\log-courier-1.5> make Makefile:3: *\ first argument to `word' function must be greater than 0. Stop.

C:\temp\log-courier-1.5\log-courier-1.5>

driskell commented 8 years ago

2.0 in master branch uses pure Go to build so should work much better. I've not yet managed to test it just yet though

driskell commented 8 years ago

Will close this in favour of tracking in #211 which I'll close once I've tested and confirmed working build on Windows