Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it run on MS Windows. #505

Closed
haroonabbasi opened this Issue Feb 5, 2015 · 13 comments

Comments

Projects
None yet
7 participants
@haroonabbasi
Copy link

haroonabbasi commented Feb 5, 2015

i tried to make a build but i got error. image attached.
error_on_build

@haroonabbasi haroonabbasi changed the title How i can run it on windows environment. How i can run it on windows environment. [Question] Feb 5, 2015

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Feb 5, 2015

See #503 - in short, we haven't anticipated the different ways an architecture manifests in the Makefile vs. how the Go download addresses look like.

In different news, never has ever tried Prometheus on Windows. You'll probably run into other issues, too.

@beorn7 beorn7 added the duplicate label Feb 5, 2015

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Feb 5, 2015

Just one more Unix-specific thing I'm aware of that won't work on Windows at the moment: if you're using service discovery to discovery your targets (vs. statically configuring them), we currently hard-code /etc/resolv.conf as the resolver configuration: https://github.com/prometheus/prometheus/blob/master/retrieval/target_provider.go#L33

@beorn7 beorn7 changed the title How i can run it on windows environment. [Question] Make it run on MS Windows. Feb 5, 2015

@beorn7 beorn7 added feature-request and removed duplicate labels Feb 5, 2015

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Feb 5, 2015

Let's use this issue as a catch-all for things that need to be done for a Windows port.

(We are completely dependent on external contributors here, though. I don't think any Windows machines exist at SoundCloud...)

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Feb 5, 2015

@haroonabbasi Given that #503 was fixed now, it would be interesting to hear whether that also fixes the Go download step for you on Windows, and whether you encouter any more errors further down the line.

@etishor

This comment has been minimized.

Copy link

etishor commented May 14, 2015

👍 for having a timeseries db running on windows.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented May 14, 2015

@etishor please help us test it :)

@etishor

This comment has been minimized.

Copy link

etishor commented May 14, 2015

Working on it :) cloned and trying to build on windows. I'm familiar with windows & unix dev environments, but i'm not familiar with go. Also "make" on windows...

As a side note, i'm looking for a good place to store data from my Metrics project and I hope prometheus can be that place.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 14, 2015

As an aside, if you have a working Python environment on Windows if you could verify the fix in prometheus/client_python#28 that'd be great.

@smyrman

This comment has been minimized.

Copy link
Contributor

smyrman commented Jun 9, 2015

One thing that would make cross-platform easier, is if you got rid of the Makefile, as that would get rid of a lot of unneeded dependencies. You could keep it for internal usage of course, but It would be better for everyone if you cold simply install with:

 $ go get -u github.com/prometheus/prometheus/...

For commit db4df06, I tried to do some experiments with building prometheus on Windows:

make build fails on "hostname -s":

$ make build
sethostname: Use the Network Control Panel Applet to set hostname.
hostname -s is not supported.

This is the same result as:

$ HOSTNAME.EXE -s
sethostname: Use the Network Control Panel Applet to set hostname.
hostname -s is not supported.

I can set the hostname, and solve this buy editng Makefile.INCLUDE to call "hostname" without any parameters. However, ther are some aditional problems for me at lest, trying to use make:

"c:\ProgramData\chocolatey\lib\make\tools\bin\make.exe": Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)

I don't blame you for this, obviously if make was installed correctly, this should not have happened...

Anyway, I tried building without a Makefile, to see how much needed doing to get that working.

$ cd $GOPATH/src/github.com/bin
$ go get -u ./...
$ go install ./...
# github.com/prometheus/prometheus/util/flock
util\flock\flock_windows.go:22: undefined: windowsFileLock
# github.com/prometheus/prometheus/web/blob
web\blob\blob.go:30: undefined: files

For line 22, I presume you really meant to say "windowsLock"', so I change the code a bit.
For the error in blob line 30, I realized you used a shell-script to generate static files. Trying to run this through bash however, I discover that xxd is not present on windows, and I didn't find it as a package on "Chocolately" (some windows package manager I stumbled upon).

So as a next step, I wrote some go:generate code using https://github.com/jteeuwen/go-bindata instead of your shell scrip. Please see:

#782

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Sep 21, 2015

Anyone knows about the status of this – or has a system to test it? @juliusv

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Sep 22, 2015

I do have a Windows for games lying around, but haven't tested it yet. I can give it a try sometime...

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Sep 27, 2015

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.