opencontainers / runc

CLI tool for spawning and running containers according to the OCI specification
https://www.opencontainers.org/
Apache License 2.0
11.74k stars 2.09k forks source link

mismatched types C.uint and C.uint32_t #256

Closed meihuabo closed 9 years ago

meihuabo commented 9 years ago
go build -o runc .
#   github.com/seccomp/libseccomp-golang
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:298: invalid operation: in.toNative() == *_Cvar_C_ARCH_BAD (mismatched types C.uint32_t and C.uint)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:328: invalid case *_Cvar_C_ARCH_X86 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:330: invalid case *_Cvar_C_ARCH_X86_64 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:332: invalid case *_Cvar_C_ARCH_X32 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:334: invalid case *_Cvar_C_ARCH_ARM in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:336: invalid case *_Cvar_C_ARCH_NATIVE in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:338: invalid case *_Cvar_C_ARCH_AARCH64 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:340: invalid case *_Cvar_C_ARCH_MIPS in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:342: invalid case *_Cvar_C_ARCH_MIPS64 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:344: invalid case *_Cvar_C_ARCH_MIPS64N32 in switch on a (mismatched types C.uint and C.uint32_t)
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp_internal.go:344: too many errors
make: *** [all] Error 2
mheon commented 9 years ago

This looks like a bug in one of the dependent libraries (libseccomp-golang, https://github.com/seccomp/libseccomp-golang) which I maintain. Can you give details on your environment - OS release, etc? Never seen this before, curious what might be causing it.

meihuabo commented 9 years ago
Ubuntu 12.04.5 LTS \n \l

Linux meihuabo 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 

go version go1.4.1    linux/amd64
meihuabo commented 9 years ago

resolve it: https://github.com/golang/go/issues/12599 my C complier gcc(4.6.3) is too old