How Do I Get Arduino Software To Build?

I'm getting confused in my efforts to set the classpath properly for Linux builds of the Arduino software. Here is the output of build/linux/make.sh:


[rlcl@deafeng2 linux]$ ./make.sh Setting up directories to build under Linux Unzipping reference... Copying shared and core files... Copying examples... Copying dist files... cp: cannot create regular file work/lib/.svn/entries': Permission denied cp: cannot create regular filework/lib/.svn/all-wcprops': Permission denied cp: cannot create regular file `work/lib/.svn/format': Permission denied Building antlr grammar code... ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com error: file StdCParser.g not found ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com error: file StdCParser.g not found ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com error: file WTreeParser.g not found ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com error: file WTreeParser.g not found Building the PDE...

Found 1 system error:

*** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" in: ../build/linux/work/classes ../build/linux/work/lib/antlr.jar ../build/linux/work/lib/oro.jar ../build/linux/work/lib/registry.jar ../build/linux/work/lib/RXTXcomm.jar ../build/linux/work/lib/mrj.jar . /usr/java/jdk1.6.0_04/bin .

tools/DiscourseFormat.java:6: warning: unmappable character for encoding UTF8 Copyright (c) 2005-06 Ignacio Manuel Gonz[ch65533]lez Moreta ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 warning

Done.

I'm building on the x86_64 arch of CentOS 5.1, using Sun's 64-bit version of jdk1.6.0_04 (which is in /usr/java/jdk1.6.0_04.)

How do I fix the "permission denied" messages? Are they a concern?

How do I fix the Classpath so that Jikes won't complain? Is there a separate download I am missing?

Also, how do I get rxtx to compile properly for a 64-bit Java implementation? Do I need to download and install a JavaComm library separately in order for librxtxSerial.so to compile properly?

Thanks

Bob Cochran

What distro? It all depends on that. Gentoo handles it all automagically. :)

CentOS 5.1 ( http://www.centos.org/ )

Things are becoming clearer. It looks like the subversion trunk for the arduino code is missing some needed files. First, we need to understand what files are being copied to the work directory and why. The copying code found at the start of build file make.sh can stand a lot of cleanup.

Secondly, we need to understand what the antlr software product is doing. You can read about the parser here http://www.antlr.org/

The version that seems to be packaged with the trunk code is 2.7.2. It grammar files which end in the extension .g. The arduino build file make.sh needs four grammar files specific to antlr which are not included in the trunk: StdCParser.g WParser.g WTreeParser.g WEmitter.g

which must be in $HOME/trunk/app/preproc

And which cause the generation of several output files.

I'm continuing my experiments...

Bob Cochran

It looks to me like the svn trunk for arduino is also missing a number of *.java files in $HOME/trunk/app/preproc. I downloaded those files from

http://www.koders.com/noncode/fid1819E2A06F45CAAF64A38D4F059470ACAE1AAE1D.aspx

and added them to the preproc directory. That finally gave me clean java compiles.

One does not need jikes if Sun's Java is installed. The sparse documentation seems to suggest you need jikes on Linux.

Finally, the various serial classes are importing from gnu.io.* but if your Java alternatives are pointing to Sun's java, you won't be able to find the gnu.io.* classes, right?

Thanks

Bob Cochran

I don't think you need to build Arduino itself. You should be able to download the Linux version and replace RXTX with a version you compile yourself. You'll probably also need to download the Arduino version of avrdude and compile that. But the main Arduino .jars should work without recompilation.

Also, I'm guessing you were trying to compile the subversion head, which isn't always stable. At the moment, there have been a few changes to the source code but I haven't updated the Linux build files accordingly (since I do development on a Mac). If you really want / need to build the whole source tree from scratch, you should try the 0010 tag.

Thanks, Mellis. You are right, I probably should have downloaded the 0010 tag...but I didn't realize it exists (which is also a good indicator of just how little I know about subversion). I think I did a checkout of "trunk". I'll experiment tonight with recompiling RXTX. Doing that on CentOS 5.1 64 bit, for the Sun 64 bit jdk1.6.0_04, has me a bit stumped. But I'm learning a lot from these many attempts to do java compiles.

Bob