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
Closed

cmd/cgo: CL 159258 breaks netbsd build #30918

mikioh opened this issue Mar 19, 2019 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-NetBSD release-blocker
Milestone

Comments

@mikioh
Copy link
Contributor

mikioh 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 ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 19, 2019
@ianlancetaylor
Copy link
Contributor

CC @phst

@ianlancetaylor
Copy link
Contributor

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
Copy link
Contributor

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

@gopherbot
Copy link

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

@ianlancetaylor
Copy link
Contributor

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

@krytarowski
Copy link
Contributor

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.

@golang golang locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-NetBSD release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants