1、之前为了在Centos7.2安装网易云音乐,而编译安装了GCC6.2.0,后来发现之前安装的VirtualBox却不能用了,按照提示在终端执行sudo /sbin/vboxconfig,错误提示:
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
2、查看/var/log/vbox-install.log ,提示重大错误:缺少include/linux/compiler-gcc6.h。后来度娘了之后发现可能是kernel和GCC6的更新造成的(http://blog.chinaunix.net/uid-20680966-id-5322921.html),查看系统内核目录include/linux下发现确实没有compiler-gcc6.h。然后在这里找到了compiler-gcc6.h的代码:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/04805.html
内容如下:
——————————————————————————————————————
#ifndef __LINUX_COMPILER_H
#error "Please don't include
#endif
#define __used __attribute__((__used__))
#define __must_check __attribute__((warn_unused_result))
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
/* Mark functions as cold. gcc will assume any path leading to a call
to them will be unlikely. This means a lot of manual unlikely()s
are unnecessary now for any paths leading to the usual suspects
like BUG(), printk(), panic() etc. [but let's keep them for now for
older compilers]
gcc also has a __attribute__((__hot__)) to move hot functions into
a special section, but I don't see any sense in this right now in
the kernel context */
#define __cold __attribute__((__cold__))
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
#ifndef __CHECKER__
# define __compiletime_warning(message) __attribute__((warning(message)))
# define __compiletime_error(message) __attribute__((error(message)))
#endif /* __CHECKER__ */
/*
* Mark a position in code as unreachable. This can be used to
* suppress control flow warnings after asm blocks that transfer
* control elsewhere.
*/
#define unreachable() __builtin_unreachable()
/* Mark a function definition as prohibited from being cloned. */
#define __noclone __attribute__((__noclone__))
/*
* Tell the optimizer that something else uses this function or variable.
*/
#define __visible __attribute__((externally_visible))
/*
* GCC 'asm goto' miscompiles certain code sequences:
*
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
*
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
*
* (asm goto is automatically volatile - the naming reflects this.)
*/
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
#define __HAVE_BUILTIN_BSWAP32__
#define __HAVE_BUILTIN_BSWAP64__
#define __HAVE_BUILTIN_BSWAP16__
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
#define KASAN_ABI_VERSION 4
————————————————————————————————
其实这个内容和compiler-gcc5.h几乎一样,你也可以将compiler-gcc5.h内容稍作修改后复制为compiler-gcc6.h。新建compiler-gcc6.h,然后复制到kernel的include/linux目录下,和compiler-gcc5.h在相同的目录。注意每更新一次kernel,就会多一个目录如:/usr/src/kernels/3.10.0-327.36.1.el7.x86_64/include/linux
3、添加了compiler-gcc6.h后,再执行命令 sudo /sbin/vboxconfig 就不会有错误提示了。
热血大作战 安卓最新版v2.1.166
下载凡尔赛法环免广告版 最新版v1.69.1
下载天煞异种 安卓版v1.0.21
下载十三月 (Undecember)最新官方中文版v3.26.0200
下载星露谷物语sve 安卓版v1.5.6.52
星露谷物语sve手机版是游戏的超大拓展Mod内容,全称Sta
动物园大亨 手机版v2.0
动物园大亨是一款模拟动物园经营的休闲放置游戏,采用了卡通画风
蜜蜂园林钞票不减反增版 v0.1.68
蜜蜂园林无限道具版是游戏的破解版本,在该版本中为玩家提供了足
幻想熔炉失落帝国的世界 安卓版v2.16.2
幻想熔炉失落帝国的世界是一款魔法卡通风格的城市模拟经营类游戏
我的女友是声优免广告 安卓版v1
我的女友是声优免广告是一款非常好玩的模拟经营类手游,玩家在游