Bug 5247

Summary: build.sh fails to build from the Kepler Yocto Eclipse plugin Git repository
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Scott Rifenbark <srifenbark>
Component: eclipse-pluginAssignee: Beth Flanagan <elizabeth.flanagan>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Undecided CC: elizabeth.flanagan, ioanax.grigoropol, srifenbark, yp.ep.watcher, yp.watcher
Version: 1.5   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
URL: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=cfd2b88717a709049155a8ff15134b617fc6e172
Whiteboard: 26 September 2013
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Scott Rifenbark 2013-09-20 22:47:35 UTC
Working through the steps to build the Yocto Eclipse plugin (kepler) from scratch (http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html/#zip-file-method) step 7 fails with the following:

<snip>

/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/TerminalHandler.java
(at line 120)
    [javac]     TerminalElement element = TerminalServiceHelper
    [javac]                         .createTerminalElement(tab,
terminalSubSystem);
    [javac]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] Discouraged access: The method
createTerminalElement(CTabItem, ITerminalServiceSubSystem) from the
type TerminalServiceHelper is not accessible due to restriction on
classpath entry
/home/scott-lenovo/yocto-eclipse/scripts/eclipse-4.3-linux-gtk-x86_64/eclipse/plugins/org.eclipse.rse.terminals.ui_1.2.100.201305201712.jar
    [javac] ----------
    [javac] 64 problems (1 error, 63 warnings)
    [javac] Compilation failed. Compiler errors are available in
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/plugins/org.yocto.remote.utils/@dot.log

BUILD FAILED
/home/scott-lenovo/yocto-eclipse/scripts/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/build.xml:36:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/build.xml:105:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/src/features/org.yocto.bc.headless.build/customTargets.xml:12:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/eclipse-4.3-linux-gtk-x86_64/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/templates/headless-build/allElements.xml:16:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/eclipse-4.3-linux-gtk-x86_64/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/genericTargets.xml:118:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/eclipse-4.3-linux-gtk-x86_64/eclipse/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts/genericTargets.xml:123:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/features/org.yocto.bc/build.xml:32:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/features/org.yocto.bc/build.xml:14:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/plugins/org.yocto.remote.utils/build.xml:252:
The following error occurred while executing this line:
/home/scott-lenovo/yocto-eclipse/scripts/master_build_201309192154/build/plugins/org.yocto.remote.utils/build.xml:213:
Compile failed; see the compiler error output for details.

Total time: 3 seconds
An error has occurred. See the log file
/home/scott-lenovo/workspace/.metadata/.log.
./build.sh: 22: shift: can't shift that many
scott-lenovo@scott-lenovo:~/yocto-eclipse/scripts [dora]
$ ls
build.sh  eclipse-4.3-linux-gtk-x86_64  generate-doc.sh            readme.txt
eclipse   find-version                  master_build_201309192154  setup.sh
scott-lenovo@scott-lenovo:~/yocto-eclipse/scripts [dora]
$ ECLIPSE_HOME=/home/scott
Comment 1 Scott Rifenbark 2013-09-20 22:48:20 UTC
Re-assigned to Beth per Beth's request.
Comment 2 Beth Flanagan 2013-09-20 23:15:42 UTC
This is because OpenJDK is broken for the plugin. Solution.:

We must use Oracle JDK. This is for ALL distros.

You get that from:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

You will want jdk-7u40-linux-x64.tar.gz

You save and extract it somewhere (Here we'll assume in ~):

cd ~; tar xzvf jdk-7u40-linux-x64.tar.gz;
export PATH=~/jdk-7u40-linux-x64/bin:$PATH

Now, you have the correct java and can run build.sh

So, we need to add these steps to the documentation.
Comment 3 Scott Rifenbark 2013-09-24 15:17:13 UTC
Still failing on my Ubuntu 12.04 box.  

Scott
Comment 4 Beth Flanagan 2013-09-24 16:46:14 UTC
This is without a doubt a java issue. This works fine on the autobuilders and on my home machine with the correct java installed.
Comment 5 Scott Rifenbark 2013-09-26 20:47:50 UTC
Beth, 

The docs have been updated to note the Oracle Java requirement and some other issues dealt with in there.  The section can be seen at http://www.yoctoproject.org/docs/1.5/dev-manual/dev-manual.html#adt-eclipse.

I marked the doc requirement as "done"

Scott