Thanks to visit codestin.com
Credit goes to github.com

Skip to content

syscall build error on GOOS=darwin #1023

Closed
@gitloverr

Description

@gitloverr

Hi everyone,

when I import other than the gopherjs library to my go file, and when I ran the "gopherjs build" cmd, it throws errors likes those, but when I import only gopherjs it doesn't give me anything error:
/usr/local/opt/go/libexec/src/syscall/syscall_darwin.go:118:1: //go:linkname local symbol "libc_getfsstat" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/syscall_darwin.go:151:1: //go:linkname local symbol "libc_setattrlist" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/syscall_darwin.go:279:1: //go:linkname local symbol "libc_fdopendir" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/syscall_darwin_amd64.go:59:1: //go:linkname local symbol "libc_sendfile" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:23:1: //go:linkname local symbol "libc_getgroups" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:38:1: //go:linkname local symbol "libc_setgroups" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:54:1: //go:linkname local symbol "libc_wait4" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:70:1: //go:linkname local symbol "libc_accept" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:85:1: //go:linkname local symbol "libc_bind" is not found in the current source file /usr/local/opt/go/libexec/src/syscall/zsyscall_darwin_amd64.go:100:1: //go:linkname local symbol "libc_connect" is not found in the current source file :0:0: too many errors

My go file :

`

package main

import (
"github.com/ava-labs/avalanchego/utils/formatting"

"github.com/gopherjs/gopherjs/js"
)

func Try() string { return "hello world"}
 
func main() {
	js.Global.Get("module").Get("exports").Set("Try", Try)
}

`

why is this happening? how do I solve this error?

thank you

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