Skip to content
This repository was archived by the owner on Feb 21, 2024. It is now read-only.
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Build fails on Windows #2059

@Hydrocharged

Description

@Hydrocharged

What's going wrong?

I attempted to run the tests on Windows, and the following is the output:

$ go test ./... --count=1
# github.com/pilosa/pilosa/syswrap
syswrap\mmap.go:53:14: undefined: syscall.Mmap
syswrap\mmap.go:63:8: undefined: syscall.Munmap
FAIL    github.com/pilosa/pilosa [build failed]
FAIL    github.com/pilosa/pilosa/cmd [build failed]
FAIL    github.com/pilosa/pilosa/ctl [build failed]
FAIL    github.com/pilosa/pilosa/gopsutil [build failed]
FAIL    github.com/pilosa/pilosa/http [build failed]
FAIL    github.com/pilosa/pilosa/inmem [build failed]
FAIL    github.com/pilosa/pilosa/internal/clustertests [build failed]
ok      github.com/pilosa/pilosa/internal/test  0.268s
FAIL    github.com/pilosa/pilosa/pql [build failed]
ok      github.com/pilosa/pilosa/prometheus     0.314s
FAIL    github.com/pilosa/pilosa/roaring [build failed]
FAIL    github.com/pilosa/pilosa/server [build failed]
FAIL    github.com/pilosa/pilosa/stats [build failed]
FAIL    github.com/pilosa/pilosa/statsd [build failed]
FAIL    github.com/pilosa/pilosa/test [build failed]

Steps to reproduce the behavior

Navigate to the base folder and run go test ./... on a Windows machine. --count=1 is not required for the reproduction of the issue.

Information about your environment (OS/architecture, CPU, RAM, cluster/solo, configuration, etc.)

Windows 10 Pro 64-bit
go version go1.12.1 windows/amd64

Additional Information

It looks like the syscall.Mmap and syscall.Munmap calls have been deprecated, and are Unix-specific calls. They're available on both Linux and MacOS platforms:

https://golang.org/pkg/syscall/?GOOS=linux#Mmap
https://golang.org/pkg/syscall/?GOOS=darwin#Mmap

But the function cannot be found on Windows:

https://golang.org/pkg/syscall/?GOOS=windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions