Patch to make leJOS compile with gcc4

When I was trying to build leJOS on Mac OS X Tiger 10.4.3 with gcc4 (from Xcode 2.2):

$ gcc_select
Current default compiler:
gcc version 4.0.1 (Apple Computer, Inc. build 5247)

I was getting this error:

====> Making leJOS Unix binaries (lejos, for emulation)
cd unix_impl; make OSTYPE=darwin
gcc -I../vmsrc -I. -Wall -Wno-unused -c ../vmsrc/threads.c
../vmsrc/threads.c: In function 'switch_thread':
../vmsrc/threads.c:326: error: label at end of compound statement
make[1]: *** [threads.o] Error 1
make: *** [tinyvm_emul] Error 2

This is simple to fix by applying this patch:

--- threads.c.orig      2006-01-07 08:37:40.000000000 -0800
+++ threads.c   2006-01-07 08:37:48.000000000 -0800
@@ -321,6 +321,7 @@
                }
             }
 done_pi:
+            ;
 #endif // PI_AVOIDANCE
          
           }

Lego announces new version of Mindstorms: Mindstorms NXT

Wouldn’t you know that right after I bought a Mindstorms IR tower off eBay, Lego announces at CES that they are releasing a next-generation Mindstorms product? Well, I can take consolation in the fact that it won’t be out until August.

From the press release:

LEGO MINDSTORMS NXT highlights include:

  • All-new NXT intelligent brick
  • 3 interactive servo motors feature inbuilt rotation sensors to align speed for precise control
  • New ultrasonic sensor makes robots “see” by responding to movement
  • New sound sensor enables robots to react to sound commands, including sound pattern and tone recognition
  • Improved light sensor detects different colors and light intensity
  • Improved touch sensor reacts to touch or release and allows robots to feel
  • 519 hand-selected, stylized elements from the LEGO TECHNIC® building system ensure robot creations will be sturdy and durable while also looking authentic
  • Opportunities for physical programming of robots and interaction with robots during programming
  • 18 building challenges with clear, step-by-step instructions help acclimate users to the new system to create robots ranging from humanoids and machinery to animals and vehicles
  • Digital wire interface allows for third-party developments
  • Information, inspiration, news, community programs and more at www.mindstorms.com

LEGO MINDSTORMS NXT will be available at most toy and discount merchandise retailers,
select consumer electronics retailers or online at www.LEGOshop.com in August 2006
and will have a suggested retail price of $249.99 (USD) and $ 379.99 (CAD).
A special version for school and institutional use is also releasing later this year.

In related news, LEGO Group also announced the launch of www.nxtbot.com,
a blog written by writer, gamer and robotics enthusiast Jeff James, focused
on the growing and fascinating world of consumer robotics. The company
also announced details for a Developer Program. Information can be found at www.mindstorms.com