0

Error while building for java with Ubuntu

asked 2014-12-24 05:18:31 -0700

botsutoshi gravatar image

Hi,

I started All Joyn All Seen installation from here.

My machine: virtual box with ubuntu 14.04 LTS 64 bit

[Build tools and libs]

1) sudo apt-get install build-essential libgtk2.0-dev libssl-dev xsltproc ia32-libs libxml2-dev

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done build-essential is already the newest version. libgtk2.0-dev is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.]

2) - skip, I'm working on a 64 bit (virtual) machine

[Python v2.6/2.7]

1) which python

[out]

/usr/bin/python

python --version

[out]

Python 2.7.6

[SCons v2.0]

sudo apt-get install scons

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done scons is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

[openSSL]

sudo apt-get install libssl-dev

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done libssl-dev is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

[git v1.7]

sudo apt-get install git-core

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done git-core is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

[Repo]

skip

[Uncrustify v0.57]

download from http://packages.ubuntu.com/precise/uncrustify downloaded: uncrustify_0.57-1_amd64.deb sudo dpkg -i uncrustify_0.57-1_amd64.deb

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done git-core is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. toshi@toshi-VirtualBox:~/Desktop/sdk$ ^C toshi@toshi-VirtualBox:~/Desktop/sdk$ cd /home/toshi/Downloads/ toshi@toshi-VirtualBox:~/Downloads$ sudo dpkg -i uncrustify_0.57-1_amd64.deb (Reading database ... 241486 files and directories currently installed.) Preparing to unpack uncrustify_0.57-1_amd64.deb ... Unpacking uncrustify (0.57-1) over (0.57-1) ... Setting up uncrustify (0.57-1) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

[Doxygen]

sudo apt-get install doxygen

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done doxygen is already the newest version. The following packages were automatically installed and are no longer required: kde-l10n-engb kde-l10n-it Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

[Graphviz]

sudo apt-get install graphviz

[out]

Reading package lists... Done Building dependency tree
Reading state information... Done graphviz is already the newest version. The following packages were automatically installed and ... (more)

edit retag flag offensive close merge delete

Comments

Thank you for the detailed information. For some reason, the JUnit jar file could not be read by scons. Can you kindly provide the output of the commands: (a) ls -l /usr/share/java/junit-4.12.jar (b) unzip -l /usr/share/java/junit-4.12.jar

praveenb ( 2014-12-26 01:10:25 -0700 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-01-13 05:26:59 -0700

botsutoshi gravatar image

Ok, perfect, now it works properly. Basically, a brief recap: 1) sudo chmod +r /usr/share/java/junit-4.12.jar 2) ls -l /usr/share/java/junit-4.12.jar 3) unzip -l /usr/share/java/junit-4.12.jar 4) cd alljoyn/ 5) export JAVA_HOME="/usr/lib/jvm/jdk1.6.0_32" 6) export CLASSPATH="/usr/share/java/junit-4.12.jar" 7) scons CPU=x86_64 BINDINGS="cpp,java" WS="off" Everything works! Thank you very much for your support, I hope this thread could be helpful for someone else! Enjoy AllJoyn!

edit flag offensive delete publish link more
0

answered 2014-12-29 06:31:10 -0700

botsutoshi gravatar image

Hi,

here my output:

1) ls -l /usr/share/java/junit-4.12.jar

[out]

-rw-r----- 1 root root 314932 dic 24 11:23 /usr/share/java/junit-4.12.jar

2) unzip -l /usr/share/java/junit-4.12.jar

[out]

error: cannot open zipfile [ /usr/share/java/junit-4.12.jar ] Permission denied unzip: cannot find or open /usr/share/java/junit-4.12.jar, /usr/share/java/junit-4.12.jar.zip or /usr/share/java/junit-4.12.jar.ZIP.

2a) sudo unzip -l /usr/share/java/junit-4.12.jar

[out]

...

--------- ------- 611535 323 files

If I try to run scons with java binding I always get the same error:

scons: Reading SConscript files ... Building bindings: java Building services: BULLSEYE_BIN not specified GTEST_DIR not specified skipping common unit test build BULLSEYE_BIN not specified GTEST_DIR not specified skipping About Service unit test build GTEST_DIR not specified skipping alljoyn_core unit test build

scons: warning: Ignoring missing SConscript 'build/linux/x86_64/debug/obj/services/about/SConscript' File "/home/toshi/Desktop/sdk/alljoyn/alljoyn_core/samples/eventaction/SConscript", line 35, in <module> scons: done reading SConscript files. scons: Building targets ... [JAVAC] alljoyn_java/src/org/alljoyn/bus/AboutDataListener.java error: error reading /usr/share/java/junit-4.12.jar; error in opening zip file 1 error scons: * [build/linux/x86_64/debug/obj/alljoyn_java/classes/org/alljoyn/bus/AboutDataListener.class] Error 1 scons: building terminated because of errors.</module>

edit flag offensive delete publish link more

Comments

Thanks for providing this information. Based on the output, it looks like junit-4.12.jar was created by root and it not accessible to other regular non-root users. On my computer, here is how junit-4.12.jar looks like: -rw-r--r-- 1 root root 314932 Jan 12 14:59 /usr/share/java/junit-4.12.jar

praveenb ( 2015-01-12 15:02:00 -0700 )edit

One thing you can try to do is to run the command: sudo chmod +r /usr/share/java/junit-4.12.jar and see whether or not your junit4 looks similar to what I have.

praveenb ( 2015-01-12 15:03:03 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-12-24 05:18:31 -0700

Seen: 333 times

Last updated: Dec 29 '14