ubuntu 14.04编译安装xen4.4总结

时间:2021-09-12 17:58:15

1. 安装环境

操作系统:ubuntu14.04

xen版本:xen4.4

2. 依赖包的安装

在安装xen之前先进行依赖包的安装,在不停得尝试之后,总结出以下需要安装的依赖包。

sudo apt-get install gcc make binutils zlib1g-dev python-dev

sudo apt-get install libncurses5-dev libcurl4-openssl-dev libx11-dev

sudo apt-get install uuid-dev libyajl-dev libaio-dev libglib2.0-dev libpixman-1-dev

sudo apt-get install pkg-config bridge-utils iproute udev bison flex gettext

sudo apt-get install bin86 bcc iasl ocaml-nox ocaml-findlib cmake markdown figlet git libc6-dev-i386

sudo apt-get install texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra

sudo apt-get install texlive-fonts-recommended pciutils-dev mercurial

以上的依赖包主要是为了能够成功的编译安装xen4.4

3. xen源文件下载

xen4.4源文件地址http://www.xenproject.org/downloads-list/xen-archives/xen-44-series/xen-440.html

源文件下载后是一个tar包,该包可以先下到windows下然后用winscp拷贝到虚拟机中,也可以直接在虚拟机中进行下载。

注意:tar包的解压一定要在ubuntu中进行,如果是在windows中解压之后再拷贝到ubuntu中的话,其中文件的执行级别就被修改了,会导致编译出错。

4. xen源文件编译

源文件解压到某个目录下之后,cd到源文件所在目录,执行步骤按照源文件中README里面描述的步骤来执行。

# ./configure
# make world
# make install

但是在执行make world执行完之后,会发现提示一个如下所示的错误:

tpmback.c: In function ‘tpmif_change_state’:
tpmback.c:350:4: error: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘enum xenbus_state *’ [-Werror=format=]
    if(sscanf(value, "%d", &readst) != 1) {

在出现这个错误之后,源文件的编译后面无法执行了,在查找相关的资料之后,发现一段讨论:

From: Dushyant Behl <myselfdushyantbehl <at> gmail.com> Subject: Re: Compilation Error in extras/mini-os/tpmback.c Newsgroups: gmane.comp.emulators.xen.devel Date: 2014-07-18 10:01:50 GMT (2 weeks, 3 days, 2 hours and 27 minutes ago)

Sure, I'll be happy to do it.

On Fri, Jul 18, 2014 at 3:25 PM, Ian Campbell <Ian.Campbell <at> citrix.com> wrote:
> On Thu, 2014-07-17 at 20:21 +0200, Samuel Thibault wrote:
>> Ian Campbell, le Wed 16 Jul 2014 10:13:31 +0100, a écrit :
>> > On Wed, 2014-07-16 at 11:25 +0530, Dushyant Behl wrote:
>> > > I'm trying to compile xen from the source and i'm getting this
>> > > compilation error while running a make world.
>> > >
>> > > tpmback.c: In function ‘tpmif_change_state’:
>> > > tpmback.c:350:4: error: format ‘%d’ expects argument of type ‘int *’,
>> > > but argument 3 has type ‘enum xenbus_state *’ [-Werror=format=]
>> > > if(sscanf(value, "%d", &readst) != 1) {
>> > > ^
>> > > cc1: all warnings being treated as errors
>> > > make[3]: *** [/home/corvo/gsoc/code/xen/stubdom/mini-os-x86_64-vtpm/tpmback.o]
>> > > Error 1
>> > >
>> > > Could anyone explain that if this is just problem on my side or this
>> > > is not fixed in the git tree.
>> >
>> > It looks like a legitimate issue to me. I expect you are just the first
>> > person to use a compiler which picks up in this particular issue.
>> >
>> > I'm not sure what the correct fix is since C doesn't mandate very much
>> > about the storage size of an enum, so casting is probably not the right
>> > answer.
>>
>> Indeed, C99 apparently says “The choice of type is
>> implementation-defined”, so
>>
>> > Probably the value needs to be read into an actual int variable and then
>> > assigned to the enum.
>>
>> that seems like the proper solution.
>
> Great. Dushyant, are you able to rustle up a patch?
>
> http://wiki.xen.org/wiki/Submitting_Xen_Patches has some guidance on the
> procedure.
>
> Ian.
>

该讨论的地址为:http://thread.gmane.org/gmane.comp.emulators.xen.devel/207530/focus=207948

讨论的结果看起来应该是说这里是一个bug,需要加一个补丁。

Ian 这个人查了一下,应该是Hypervisor Project Team里面的一个成员。

5. 总结

至此,xen4.4版本的安装block住了,ubuntu下的安装应该是可以找到方法的,后面会继续进行测试。

ubuntu 14.04编译安装xen4.4总结的更多相关文章

  1. ubuntu 13&period;04编译安装xen4&period;4总结

    之前在ubuntu14.04上安装xen4.4失败,提示编译有问题,这次换了成了ubuntu13.04进行安装,成功完成xen4.4的安装 1. 安装环境 操作系统:ubuntu13.04 xen版本 ...

  2. Ubuntu 14&period;04 编译安装 boost 1&period;58

    简介 Boost is a set of libraries for the C++ programming language that provide support for tasks and s ...

  3. Ubuntu 14&period;04 编译安装 husky

    简介 Husky是一个大数据分布式开发框架,用C++开发,因为粗粒度(coarse-grained)平台(如Spark,Hadoop,Flink)MR耗时太大,然后细粒度(fine-grained)平 ...

  4. ubuntu 14&period;04 编译安装 nginx

    下载源码包 nginx 地址:http://nginx.org/en/download.html  下载nginx 1.4.7 编译前先安装两个包: 直接编译安装会碰到缺少pcre等问题,这时候只要到 ...

  5. 分布式进阶&lpar;二&rpar;Ubuntu 14&period;04下安装Dockr图文教程&lpar;一&rpar;

    当前,完全硬件虚拟化技术(KVM.Xen.Hyper-V 等)能在一个物理主机上很好地运行多个互相独立的操作系统,但这也带来一些问题:性能不佳,资源浪费,系统反应迟缓等.有时候对用户来说,完全的硬件虚 ...

  6. PHP7 学习笔记(一)Ubuntu 16&period;04 编译安装Nginx-1&period;10&period;3、 PHP7&period;0&period;9、Redis3&period;0 扩展、Phalcon3&period;1 扩展、Swoole1&period;9&period;8 扩展、ssh2扩展(全程编译安装)

    ==================== PHP 7.0 编译安装================== wget http://cn2.php.net/get/php-7.0.9.tar.bz2/fr ...

  7. Ubuntu 14&period;04 LTS 安装和配置Bochs

    Ubuntu 14.04 LTS 安装和配置Bochs       系统是:Ubuntu 14.04 LTS 64位 安装的是:bochs-2.6.8 Bochs 需要在 X11 环境下运行,因此你的 ...

  8. &lbrack;Ubuntu&rsqb; 14&period;04版本安装JDK8失败

    系统:Ubuntu 14.04 编译 Android 7.1 系统需要 JDK 8,但是安装时失败, $ -jdk Reading package lists... Done Building dep ...

  9. Ubuntu 14&period;04 中 安装elasticsearch2&period;&ast;&plus;logstash2&period;&ast;&plus;kibana

    在Ubuntu 14.04 上安装单机版ELK 2.*(脚本化) 1.判断是否为root权限 if [ "${UID}" -ne 0 ]; then echo "You ...

随机推荐

  1. windows 平台 php&lowbar;Imagick 拓展遇到的那些坑!

    我的php环境是使用了phpstudy 下载地址:http://www.phpstudy.net/a.php/211.html 最终并未解决问题 持续更新~ 1.首先到官网上 http://www.i ...

  2. c8051f320学习,单片机不外乎时钟、IO、串口、USB等外设用法

      时钟 IO(输入.输出,如何配置) IO   数字和模拟资源可以通过25个I/O 引脚(C805 1F3 2 0 ),每个端口引脚都可以被定义为 通用I/O(GPIO)或 0 模拟输入 所有端口I ...

  3. IOS 之 PJSIP 笔记(二) iPJSUA 的简单使用

    上一篇在编译完之后,就很不负责的结束了,本篇就对 PJSIP 库中提供的一个示例 iPJSUA 的使用,做一个简单的介绍.也能解除很多人对官方文档的一个困扰,起码我是被困扰过了. 首先,要确保你的 P ...

  4. C语言初学者代码中的常见错误与瑕疵&lpar;14&rpar;

    见:C语言初学者代码中的常见错误与瑕疵(14) 相关链接:http://www.anycodex.com/blog/?p=87

  5. bzoj 1800&colon; &lbrack;Ahoi2009&rsqb;fly 飞行棋 暴力

    1800: [Ahoi2009]fly 飞行棋 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline ...

  6. CI 笔记&lpar;1&rpar;

    1. 下载CI,官方网站,目前3.x版本已经更新,2.2.6版本为2.x版本的最后的一个版本.为了和视频教材一致,使用CI 2.x版本 2. 目录结构,从application里面的,controll ...

  7. 关于FIN&lowbar;WAIT1

    前些天,一堆人在 TCPCopy 社区里闲扯蛋,有人提了一个问题:FIN_WAIT1 能持续多久?引发了一场讨论,期间我得到斌哥和多位朋友的点化,受益良多. 让我们热热身,通过一张旧图来回忆一下 TC ...

  8. hdu5344 MZL&&num;39&semi;s xor&lpar;水题&rpar;

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud MZL's xor Time Limit: 2000/1000 MS (Java/ ...

  9. mongoDB常见的查询索引(三)

    1. _id索引     _id索引是绝大多数集合默认建立的索引     对于每个插入的数据,MongoDB会自动生成一条唯一的_id字段. 1 2 3 4 5 6 7 8 9 10 11 12 13 ...

  10. javascript 高级程序设计 五

    1.变量: ECMAScript中的基本类型都是值类型Boolean,Number,Null,Undefined和String,在这里JS和其他的语言有所不同,就是JS中的String是值类型 而不像 ...