源码编译安装runc碰到的一个小坑
来源:互联网 发布:怎样写淘宝客招募 编辑:程序博客网 时间:2024/05/17 16:46
运行runc碰到的坑
go build -o runc .# github.com/seccomp/libseccomp-golangGodeps/_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 errorsmake: *** [all] Error 2
编译runc时,报错,很明显,是runc的一个依赖库github.com/seccomp/libseccomp-golang的错误。
于是单独编译安装该库,同样抛出 mismatched types C.uint32_t and C.uint 这个错误。
查看源码 seccomp_internal.go:298 可以发现in.toNative()返回的是C.uint32_t类型的值
const uint32_t C_ARCH_BAD = ARCH_BAD;
从上面可以看出 C.C_ARCH_BAD 反射过来也应该是uint32_t 类型的值。不应该报错才对。
但是实践发现,在我的机器上C.C_ARCH_BAD被反射成uint类型的。
于是找到 golang/go 并提了个issue golang/go#12599 对方答复,是我的gcc版本太低了 -_-!
于是只好把gcc从4.6.3升级到了4.8.1,没问题了
runc上的原始的issue链接:
https://github.com/opencontainers/runc/issues/256
1 0
- 源码编译安装runc碰到的一个小坑
- MySQL 5.6源码编译碰到的一个问题
- spring boot 视图映射碰到的一个小坑
- RTC中断碰到的一个小问题
- 简记update碰到的一个小问题
- 安装iis碰到的小错误
- 安装mariadb碰到的一个问题
- pytorch学习笔记(十五):pytorch 源码编译碰到的坑总结
- 编译过程中碰到的几个小问题和解决方法
- 安装elasticsearch碰到的坑
- 安装caffe碰到的坑
- 从c++转到python项目碰到的坑--论动态语言的一个小坑
- 设定CentOS的网络时碰到的一个小问题
- oracle的分页查询碰到的一个小问题
- Eclipse下新建Android项目碰到的一个小问题
- 源码的编译安装
- 【runc 源码分析】runc create / start 流程分析
- 安装lamp碰到的小问题及解决办法
- 基本算法研究1-冒泡排序算法测试
- HTML属性是什么?
- jQuery全选功能
- python学习(一):环境安装及HelloWorld
- 机房收费系统开发进度月报
- 源码编译安装runc碰到的一个小坑
- Filter实现登录功能限制
- PAT(甲级)1047
- 安卓Button控件OnClickListener的三种实现方式
- C语言复习day2
- PAT(甲级)1048
- WPF 中图标路径问题
- jqery实现10X10的表格,双击消失
- 停课的沉淀反思(四)——任道重远