Errors with Makefiles (Linux and JDK 1.5 do not play nice)

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

Errors with Makefiles (Linux and JDK 1.5 do not play nice)

Postby jon419 » Thu Feb 08, 2007 12:07 am

I just ran into a problem that took me about an hour to resolve. I thought I would post the results here in case anyone else runs into the same trouble.

When you run the make command to compile all the files for the Linux version of LeJOS RCX, you might run into the following error:

Code: Select all
javac: target release 1.1 conflicts with default source release 1.5


Resolution:

Open up the Makefiles and look for this line:
Code: Select all
JAVAC=javac -target 1.1


Change it to look like this:
Code: Select all
JAVAC=javac -source 1.3 -target 1.1


If I remember correctly, there are two Makefiles that will need to be changed. The first one is in the root directory of your download. The second one is in download_directory/rcxcomm/rcxclasses.


There is one final change that will need to be made.

Goto the file vmsrc/threads.c

Go to line 321 and this area looks like this:
Code: Select all
               }
         }
done_pi:
#endif  // PI_AVOIDANCE

          }


Change this block of code to look like this (a new line below done_pi with a semi-colon):
Code: Select all
               }
         }
done_pi:
            ;
#endif  // PI_AVOIDANCE

          }


Once these changes are done, run make again in your "root" lejos directory.[/code]
jon419
New User
 
Posts: 2
Joined: Thu Feb 08, 2007 12:00 am
Location: Holland, MI

Thanks, and update?

Postby eecharlie » Sat Apr 14, 2007 10:33 pm

Thanks for the concise fix information!

I'm using sun-jdk-1.5.0 on Debian etch, and found that just changing the javac arguments to

javac -target 1.5

in both places worked. I did get a good number of compiler warnings and don't know a ton about java, however.
eecharlie
New User
 
Posts: 1
Joined: Sat Apr 14, 2007 10:29 pm

Postby ravl » Fri Nov 16, 2007 1:58 am

Hello. I'm just starting out with Lejos and I have an error during compile.

Code: Select all
$ make
cd tools; make OSTYPE=linux
make[1]: Entering directory `~/programas/lejos_2_1_0/tools'
cd firmdl; make
make[2]: Entering directory `~/programas/lejos_2_1_0/tools/firmdl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `~/programas/lejos_2_1_0/tools/firmdl'
make[1]: Leaving directory `~/programas/lejos_2_1_0/tools'
javac -target 1.5 -classpath classes `find classes -name '*.java'`
/bin/sh: javac: command not found
make: *** [core_classes] Error 127


I have Java 5 from Sun, and I've done regular Java programs on my machine, using 'java' instead of 'javac'.

Any ideas are very appreciated.


This problem has been solved
ravl
New User
 
Posts: 3
Joined: Fri Nov 16, 2007 1:54 am


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron
more stuff