# Arduino IDE



## dead_rabbit (Jul 3, 2011)

`$ uname -a`

```
FreeBSD hs1.VERBENA 8.2-STABLE FreeBSD 8.2-STABLE #0: Sun Jun 26 18:11:40 MST 2011  
axel@hs1.VERBENA:/usr/obj/usr/src/sys/AMDKERN  amd64
```

I compiled the Arduino IDE from the ports collection successfully. However, when I try to launch the IDE it fails and reports-
`$ arduino`

```
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname string [...]
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
```
Any ideas on how I could fix/work around this issue?


----------



## wblock@ (Jul 3, 2011)

It works here, 8.2-STABLE, i386.  Why readlink(1) is giving that error, I don't know.  Please show the output of this script.

```
#!/bin/sh

DIR=`pwd`
RLPATH=`which readlink`
RLOUT=`readlink -f -- "${0}"`
DIROUT=`dirname -- ${RLOUT}`

echo "dir: ${DIR}"
echo "path: ${PATH}"
echo "path to readlink: ${RLPATH}"
echo "readlink output: ${RLOUT}"
echo "dirname output: ${DIROUT}"
```


----------



## dead_rabbit (Jul 4, 2011)

Right, so I ran the script and got this 

```
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname string [...]
dir: /usr/home/axel
path: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/axel/bin:/usr/local/texlive/2010/bin/amd64-freebsd
path to readlink: /usr/bin/readlink
readlink output: 
dirname output:
```

I really don't understand why readlink takes issue with the -f argument.


----------



## wblock@ (Jul 4, 2011)

dead_rabbit said:
			
		

> I really dont understand why readlink takes issue with the -f argument.



Notice how yours doesn't show -f in the usage message.  That was added to stat(1) almost six months ago, according to CVS.  So update your source and it should be fine.  That's the right way to do this.

The wrong but quick alternative is to edit that script, /usr/local/arduino/arduino.  This should work.

```
APPDIR="$( pwd )"
```

I could add something similar as a patch for the port, but this is the first time I've heard of the problem.


----------



## dead_rabbit (Jul 6, 2011)

Thank you very much wblock! I upgraded my source and now the the IDE launches correctly.


----------



## wblock@ (Jul 12, 2011)

PR ports/158832 submitted with a more compatible fix.


----------

