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

cmd/cgo: CL 159258 breaks netbsd build #30918

Closed
mikioh opened this issue Mar 19, 2019 · 6 comments

Comments

@mikioh
Copy link
Contributor

commented Mar 19, 2019

See https://build.golang.org/log/3f7798c6e6550ebbc90d6dedc51f9478cd5df2b2

##### ../misc/cgo/life
PASS

##### ../misc/cgo/test
# misc/cgo/test [misc/cgo/test.test]
./issue29878.go:16:6: cannot use _Cfunc_issue29878function(arg) (type _Ctype_short) as type int16 in assignment
./issue29878.go:16:38: cannot use arg (type uint32) as type _Ctype_uint in argument to _Cfunc_issue29878function
FAIL	misc/cgo/test [build failed]
2019/03/19 05:09:19 Failed: exit status 2
# misc/cgo/test [misc/cgo/test.test]
./issue29878.go:16:6: cannot use _Cfunc_issue29878function(arg) (type _Ctype_short) as type int16 in assignment
./issue29878.go:16:38: cannot use arg (type uint32) as type _Ctype_uint in argument to _Cfunc_issue29878function
FAIL	misc/cgo/test [build failed]
2019/03/19 05:09:20 Failed: exit status 2
# misc/cgo/test [misc/cgo/test.test]
./issue29878.go:16:6: cannot use _Cfunc_issue29878function(arg) (type _Ctype_short) as type int16 in assignment
./issue29878.go:16:38: cannot use arg (type uint32) as type _Ctype_uint in argument to _Cfunc_issue29878function
FAIL	misc/cgo/test [build failed]
2019/03/19 05:09:20 Failed: exit status 2
PASS
ok  	misc/cgo/testtls	0.006s
skipped due to earlier error
2019/03/19 05:09:23 FAILED

@mikioh mikioh added this to the Go1.13 milestone Mar 19, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

CC @phst

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

Odd. That is exactly what I would expect to see if the build were running cgo with the new test but without the new patch.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

This may be because the NetBSD <stdint.h> file defines uint8_t and friends using #define rather than typedef.

@gopherbot

This comment has been minimized.

Copy link

commented Mar 19, 2019

Change https://golang.org/cl/168337 mentions this issue: cmd/cgo: accept __uint8_t as the uint8_t type

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

CL 168337 may fix this problem, but we don't seem to have a working NetBSD gomote so I can't test it.

@gopherbot gopherbot closed this in 72954eb Mar 19, 2019

@krytarowski

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2019

This may be because the NetBSD <stdint.h> file defines uint8_t and friends using #define rather than typedef.

It's compliant solution... but we have switched it to a saner format now. It caused fallout in various code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.