Need help to get the environment running on linux

Hello,

I am trying to get the arduino environment running on ubuntu-10.04 and opensuse-11.2

This is what I have done on ubuntu:

lsb_release -a | if grep -i ubuntu >/dev/null 2>&1 ; then
  sudo aptitude install ant gcc-avr avr-libc default-jdk librxtx-java 
fi

mkdir -p /var/tmp/builds
cd /var/tmp/builds && svn co link-to-googlecode-removed-to-make-forum-software-happy arduino

cd arduino/build && ant

This works so far. But when I try to “ant run”, I get

BUILD FAILED
/m/a/tmp/builds/arduino/build/build.xml:33: The following error occurred while executing this line:
/m/a/tmp/builds/arduino/build/build.xml:310: Execute failed: java.io.IOException: Cannot run program "linux/work/arduino" (in directory "/m/a/tmp/builds/arduino/build/linux/work"): java.io.IOException: error=2, No such file or directory

Unfortunately, there’s no hint which file could not be found. linux/work/arduino is where it is expected and has correct permissions, so something else must be missing here.

I tried to google for this error message, but found nothing of relevance.

Then I tried opensuse-11.2:

lsb_release -a | if grep -i suse >/dev/null 2>&1 ; then
  sudo zypper remove libgcj44-jar
  sudo zypper install avrdude avr-libc cross-avr-gcc cross-avr-binutils \
                      ant ant-apache-regexp java-1_6_0-sun
fi

mkdir -p /var/tmp/builds
cd /var/tmp/builds && svn co link-to-googlecode-removed-to-make-forum-software-happy arduino

cd arduino/build && ant

This tells me to fix the revision information. Turns out that the revision information is correct, but this line

        <replaceregex pattern="[^0-9]*" flags="g" replace=""/>

deletes the whole line (along with the digits). So I removed the revision check to get things compiled.

Now I end up with exactly the same error message as I showed above for the ubuntu install.

Any ideas? How do I find out which file is missing?

If you prefix

strace -o /tmp/file

before a command you run at the prompt, it will generate a (large) file with all the syscalls made and their results. Somewhere in there you can probably find the name of the 'missing' file.

Thanks for the hint, drhex! Turns out that r954 broke this. This patch fixes it:

Index: build/build.xml
===================================================================
--- build/build.xml     (Revision 1021)
+++ build/build.xml     (Arbeitskopie)
@@ -307,7 +305,7 @@

   <target name="linux-run" depends="linux-build"
          description="Run Linux version">
-    <exec executable="linux/work/arduino" dir="linux/work" spawn="false"/>
+    <exec executable="./arduino" dir="linux/work" spawn="false"/>
   </target>

   <target name="linux-dist" depends="linux-build"

Anybody out there with commit access?

But there’s still the problem with the revision check. Looks like the regex matcher don’t work on opensuse-11.2. Unfortunately, I’m new to java and to ant, so I have no idea where to start digging.

Next thing is this rxtx problem. I notice that arduino has checked in rxtx binaries. Why that? wouldn’t it make more sense to include the source? every machine would then build for the correct architecture…

Nobody with commit access out there to fix this minor typo?