Closed thezoggy closed 9 years ago
looking at line #62
data, err := syscall.Mmap(int(file.Fd()), 0, (size+4095) & ^4095, syscall.PROT_READ, syscall.MAP_SHARED)
its because PROT_READ and MAP_SHARED are missing for windows...
C:\Go\src\pkg\syscall>grep PROT_READ *.go
zerrors_darwin_386.go: PROT_READ = 0x1
zerrors_darwin_amd64.go: PROT_READ = 0x1
zerrors_dragonfly_386.go: PROT_READ = 0x1
zerrors_dragonfly_amd64.go: PROT_READ = 0x1
zerrors_freebsd_386.go: PROT_READ = 0x1
zerrors_freebsd_amd64.go: PROT_READ = 0x1
zerrors_freebsd_arm.go: PROT_READ = 0x1
zerrors_linux_386.go: PROT_READ = 0x1
zerrors_linux_amd64.go: PROT_READ = 0x1
zerrors_linux_arm.go: PROT_READ = 0x1
zerrors_netbsd_386.go: PROT_READ = 0x1
zerrors_netbsd_amd64.go: PROT_READ = 0x1
zerrors_netbsd_arm.go: PROT_READ = 0x1
zerrors_openbsd_386.go: PROT_READ = 0x1
zerrors_openbsd_amd64.go: PROT_READ = 0x1
zerrors_solaris_amd64.go: PROT_READ = 0x1
other apps have ran into this problem, one solution: https://github.com/HouzuoGuo/tiedot/issues/7
this is my first time trying go..so not sure how i'm suppose to install mmap-go to see if this fixes the issue.
tried this but no change:
D:\_apps\go>go get github.com/edsrzf/mmap-go
D:\_apps\go>go install github.com/edsrzf/mmap-go
I'm curious as to why you'd try running this on Windows - I was under the impression it already had halfway decent binary posting apps, never even thought to test it :cow:
The proper solution to this is probably to make a separate 'simple' file opener (open file, read from file vs mmap file into memory) and default to using that.
I kind of got sidetracked by finishing my degree - did you close this because it's no longer a problem? I still have vague plans about fixing it properly.
I gave up on trying to get this to work, I ended up just modifying newsmangler for my purposes.
trying to get this going on windows 7. fresh copy of GO installed. gopath set.