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

Compilation Error #39

Closed
thHube opened this issue Jun 18, 2011 · 3 comments
Closed

Compilation Error #39

thHube opened this issue Jun 18, 2011 · 3 comments

Comments

@thHube
Copy link

thHube commented Jun 18, 2011

OS: Ubutnu 10.10 amd64
COMPILER: 6g version release.r57.2 8306

I got this error

6g -o go.6 gocode.go autocompletefile.go package.go autocompletecontext.go server.go rpc.go decl.go apropos.go scope.go ripper.go config.go declcache.go os_posix.go
os_posix.go:14: undefined: os.Signal
os_posix.go:19: undefined: os.SIGINT
os_posix.go:19: undefined: os.SIGTERM
make: *** [go.6] Error 1

@thHube
Copy link
Author

thHube commented Jun 18, 2011

I've resolved it. Some types and constants has been moved around. I just changed in file os_posix.go the first lines as follows.

import (
    "flag"
    "os"
    "os/signal"
    "syscall"
    "path/filepath"
    "exec"
)

func CreateSockFlag(name, desc string) *string {
    return flag.String(name, "unix", desc)
}

func IsTerminationSignal(sig signal.Signal) bool {
    usig, ok := sig.(signal.UnixSignal)
    if !ok {
        return false
    }
    if usig == syscall.SIGINT || usig == syscall.SIGTERM {
        return true
    }
    return false
}

@thHube thHube closed this as completed Jun 18, 2011
@nsf
Copy link
Owner

nsf commented Jun 18, 2011

Your compiler:
COMPILER: 6g version release.r57.2 8306

My compiler:
8g version weekly.2011-06-09 8703

See the number. My weekly version was before release.r57.2 and yet it has higher revision number. Check out your install. The compiler prints an erorr because signals were moved to "os" package in weekly.2011-06-09. Should work with weekly.2011-06-09. I haven't checked the most recent version. But they should work I guess.

@nsf
Copy link
Owner

nsf commented Jun 18, 2011

I've just checked the latest weekly.2011-06-16. It works.

charlievieth pushed a commit to charlievieth/gocode that referenced this issue Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants