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
install error on Solaris #96
Comments
Hi @lhoward, thanks for reaching out! I've logged this item to provide support for solaris. |
Re-reading that patch, and with about 1% more Go knowledge than when I filed the report, it should not mix the syscall and unix packages (so, remove import syscall and s/syscall/unix/). |
I think we can just add the solaris build tag to the existing file right? Opened a PR to do so 👍 |
No, it's a new file that uses // +build solaris
package azblob
import (
"os"
"golang.org/x/sys/unix"
)
type mmf []byte
func newMMF(file *os.File, writable bool, offset int64, length int) (mmf, error) {
prot, flags := unix.PROT_READ, unix.MAP_SHARED // Assume read-only
if writable {
prot, flags = unix.PROT_READ|unix.PROT_WRITE, unix.MAP_SHARED
}
addr, err := unix.Mmap(int(file.Fd()), offset, length, prot, flags)
return mmf(addr), err
}
func (m *mmf) unmap() {
err := unix.Munmap(*m)
*m = nil
if err != nil {
panic("if we are unable to unmap the memory-mapped file, there is serious concern for memory corruption")
}
} |
(Above goes in zc_mmf_solaris.go.) |
Yep, I just realised that after the build failed. IIRC syscall is now frozen so switching to the |
I just hit this on an illumos system while trying to build Hugo, the static site generator. In the upcoming Go 1.13, there will be an Does it make sense to just use |
The problem is that for whatever reasons the Go Solaris calls for |
Support for Solaris has been released in v0.10.0. |
Thanks! |
Similar issue to #23 on Solaris. Worked around by creating
azblob/zc_mmf_solaris.go
with following contents (from some searching/copy/pasting – I don't know Go).The text was updated successfully, but these errors were encountered: