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
x/sys/unix: does not support building on Solaris with gccgo #49161
Comments
This doesn't seem to be a bug in gccgo itself. The build of golang.org/x/sys/unix is getting the warning because the C file isn't including the right header file; I guess it should be including |
Thank you for your response look like Reading symbols from ./bin/test3... (gdb) r Starting program: /export/home/oracle/test/bin/test3 [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] [New LWP 2 ] [New LWP 3 ] [New LWP 4 ] [New LWP 5 ] GOOS solaris GOARCH sparc64 [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached. [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) [New Thread 2 (LWP 2)] [New Thread 3 ] [New Thread 4 ] [New Thread 5 (LWP 5)] Thread 2 received signal SIGSYS, Bad system call. [Switching to Thread 1 (LWP 1)] 0xffffffff58de2d54 in syscall () from /lib/64/libc.so.1 (gdb) bt #0 0xffffffff58de2d54 in syscall () from /lib/64/libc.so.1 #1 0x00000001001f1b04 in golang_0org_1x_1sys_1unix.realSyscall (trap=16, a1=1, a2=21505, a3=824638662240, a4=0, a5=0, a6=0, a7=0, a8=0, a9=0) at ./vendor/golang.org/x/sys/unix/gccgo_c.c:34 #2 0x00000001001bc0a4 in golang_0org_1x_1sys_1unix.Syscall (trap=16, a1=1, a2=21505, a3=824638662240) at fdset.go:28 #3 0x00000001001d5ce8 in golang_0org_1x_1sys_1unix.ioctl (fd=1, req=21505, arg=824638662240) at zptrace_x86_linux.go:42 #4 0x00000001001bd544 in golang_0org_1x_1sys_1unix.IoctlGetTermios (fd=1, req=21505) at ifreq_linux.go:73 #5 0x00000001000425fc in github_0com_1mattn_1go_x2disatty.IsTerminal (fd=1) at ./vendor/github.com/mattn/go-isatty/doc.go:11 #6 0x000000010001a3f8 in github_0com_1gin_x2dgonic_1gin.LoggerWithConfig (conf=...) at gin.go:220 #7 0x0000000100019ef0 in github_0com_1gin_x2dgonic_1gin.Logger () at gin.go:184 #8 0x0000000100013800 in github_0com_1gin_x2dgonic_1gin.Default () at fs.go:183 #9 0x0000000100004368 in main.main () at ./cmd/test3/main.go:13 |
Something is wrong. A build for Solaris should not be running any code in zptrace_x86_linux.go. When you run your |
I got this after when compiled with I think
go env after
|
Setting What you've discovered is that golang.org/x/sys/unix does not support Solaris when using gccgo. That is a bug that needs to be addressed in golang.org/x/sys/unix. |
I looking forward to this bug to be fix Thanks |
hi, I experienced the same problem when I tried to use golang.org/x/sys under Solaris; is there any update on this bug? Thanks. ======= ========== golang.org/x/sys/unix../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201029020603-3518587229cd/unix/zsyscall_solaris_amd64.go:162:3: error: procAccess is not a function; ‘//go:linkname’ is only supported for functions $uname -m -o -p -i $gccgo --version $go env |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
latest gccgo is 11.2.0
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
using github.com/gin-gonic/gin
and cross compile with gccgo 11.2.0
What did you expect to see?
successfully compile without any warning or errors
What did you see instead?
and when run
and sometime i got this
The text was updated successfully, but these errors were encountered: