简体   繁体   English

在Ubuntu 12.04上构建桉树时遇到困难

[英]Faing difficulty in building eucalyptus on ubuntu 12.04

I installed Ubuntu 12.04(precise)64-bit alongside MacBookPro OS which its processor :Intel® Core™ i5-3210M CPU @ 2.50GHz × 4. Then I am trying for several days to install eucalyptus 3.2.0 by following this guide . 我在MacBookPro操作系统及其处理器:Intel®Core™i5-3210M CPU @ 2.50GHz×4的旁边安装了64位Ubuntu 12.04(精确)。然后,按照本指南,我尝试了几天安装eucalyptus 3.2.0。

When I reached the build phase, it failed due to this issue : 当我进入构建阶段时,由于此问题而失败:

 BUILD FAILED
/home/asma/eucalyptus-3.2.0/clc/build.xml:111: The following error occurred while executing this line:
java.lang.UnsupportedClassVersionError: org/codehaus/groovy/ant/Groovy : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
    at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at org.apache.tools.ant.AntTypeDefinition.innerGetTypeClass(AntTypeDefinition.java:194)
    at org.apache.tools.ant.AntTypeDefinition.getTypeClass(AntTypeDefinition.java:168)
    at org.apache.tools.ant.AntTypeDefinition.icreate(AntTypeDefinition.java:215)
    at org.apache.tools.ant.AntTypeDefinition.create(AntTypeDefinition.java:206)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:286)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:264)
    at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:417)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
    at org.apache.tools.ant.Task.perform(Task.java:347)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.Main.runBuild(Main.java:809)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds
make[1]: *** [build] Error 1
make[1]: Leaving directory `/home/asma/eucalyptus-3.2.0/clc'
make: *** [build] Error 2

Ff course I searched and googled, but all solutions state that make sure that java and javac versions are the same since this issue occurs when with java version of compile and run is conflicting. 如果我经过搜索和搜索,但是所有解决方案都指出要确保java和javac版本相同,因为当Java版本的编译和运行发生冲突时会发生此问题。 I have the same version for java and javac which is : 我具有与java和javac相同的版本,即:

asma@asma-MacBookPro:~$ java -version
java version "1.6.0_31"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1~0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
asma@asma-MacBookPro:~$ javac -version 
javac 1.6.0_31

Here is ant version : 这是ant版本:

asma@asma-MacBookPro:~$ ant -version 
Apache Ant(TM) version 1.8.2 compiled on December 3 2011

I have only openjdk-6-jdk installed on my Ubuntu right now and I removed java7. 我现在在Ubuntu上仅安装了openjdk-6-jdk,并删除了java7。 Also I tried to have only openjdk-7-jdk but the build still was not successful. 我也尝试只有openjdk-7-jdk,但是构建仍然没有成功。

What would be the reason for this error ? 此错误的原因是什么? Any thoughts or suggestions? 有什么想法或建议吗? May I need to alter build.xml? 我需要修改build.xml吗?

During the build process for Eucalyptus, it will perform a submodule checkout of github.com/euaclyptus/eucalyptus-cloud-libs which contains the jars necessary to build from source. 在Eucalyptus的构建过程中,它将执行github.com/euaclyptus/eucalyptus-cloud-libs的子模块检出,其中包含从源代码构建所需的jar。 When building older versions of Eucalyptus, it doesn't always checkout the correct tag/branch for cloud-libs. 在构建较旧版本的Eucalyptus时,它并不总是为云库签出正确的标签/分支。 If you go into eucalyptus/clc/lib and do a git status you should be able to see which branch is checked out. 如果您进入eucalyptus / clc / lib并执行git status您应该能够看到哪个分支已签出。 If it is #testing, then the build will not work because the dependencies have changed quite a bit since 3.2.0. 如果是#testing,则该构建将无法正常工作,因为自3.2.0版以来,依赖项已发生了很大变化。 I believe there is a tag for 3.2.2 that may work correctly. 我相信3.2.2的标签可能会正常工作。 Because of the way that the build process does the checkout on that folder, it may not be as easy as doing git checkout. 由于构建过程在该文件夹上执行检出的方式,它可能不像执行git checkout.那样容易git checkout. Instead, you may have to delete that folder and manually checkout the eucalyptus-cloud-libs repository which is a large-ish download. 相反,您可能必须删除该文件夹并手动签出eucalyptus-cloud-libs存储库,这是一个很大的下载。

Btw - while working on Eucalyptus, we use Java7, so you are better off installing it instead of 6. 顺便说一句-在使用Eucalyptus时,我们使用Java7,因此最好安装而不是6。

If you are building from source, I would suggest trying to build from #testing, rather than an older release. 如果您是从源代码构建的,我建议尝试从#testing而不是较早的发行版进行构建。 Although Ubuntu is not supported, I have built Eucalyptus and run it on Ubuntu in the past. 尽管不支持Ubuntu,但过去我已经构建了Eucalyptus并在Ubuntu上运行它。 That guide is as good as any, but be prepared to perform some hackery. 该指南与其他指南一样好,但是要做好一些黑客准备。 I vaguely remember commenting out some unit tests in Makefiles to make the build succeed. 我模糊地记得在Makefiles中注释掉一些单元测试以使构建成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM