I just found the same problem after I upgraded Ubuntu from 11.04 to 11.10. The problem is caused by new gcc 4.6 that introduces a space between the -D option marker and its parameter and breaks the nesc compiler (-DPLATFORM_IRIS becomes -D PLATFORM_IRIS and -DBOARD_MICASB becomes -D BOARD_MICASB).
To resolve the problem, I re-compiled an installed the nesC compiler (nescc) 1.3.2 with the following patch: http://sourceforge.net/tracker/download.php?group_id=56288&atid=480036&file_id=398080&aid=3153727 --------------------------------------------------------------------------------------------------------------------------- >From 4b17ec2dc4dc62d3d65a7b4899aed4291cb34abe Mon Sep 17 00:00:00 2001 From: Peter A. Bigot <[email protected]> Date: Sun, 9 Jan 2011 11:08:11 -0600 Subject: [PATCH] Work around gcc 4.6 behavior change. In development versions of gcc 4.6 past trunk commit r163770 spaces are introduced between the -D option marker and its parameter; i.e. "-DTEST" becomes two arguments "-D" "TEST" when passed to nesc-compile. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47236 --- src/nesc-compile | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/nesc-compile b/src/nesc-compile index cdcfe12..492bf7f 100755 --- a/src/nesc-compile +++ b/src/nesc-compile @@ -46,6 +46,11 @@ for ($i = 0; $i <= $#ARGV; $i++) { ($i, $idir) = &extractarg($i); push @nesc_args, "-I$idir"; } + elsif (/^-D/) { + ($i, $ddef) = &extractarg($i); + pop @nesc_args; + push @nesc_args, "-D$ddef"; + } elsif (/^-o/) { ($i, $objtarget) = &extractarg($i); } -- 1.7.2.3 --------------------------------------------------------------------------------------------------------------------------- Then, I used the new nescc and the tinyos compilation process works again. Hope it helps others who will experience the same problem. Supasate Choochaisri Chulalongkorn University References: 1) http://sourceforge.net/tracker/index.php?func=detail&aid=3153727&group_id=56288&atid=480036 2) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47236 On Wed, Sep 14, 2011 at 8:40 PM, < [email protected]> wrote: > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 13 Sep 2011 18:43:04 -0400 > From: Jude Allister <[email protected]> > Subject: [Tinyos-help] New TinyOS installation. Problems compiling > Blink sample... > To: [email protected] > Message-ID: > <CA+77wjm-2nCA=s-d8vuhrxs1woy-9yntyygxbnhtup1xkwy...@mail.gmail.com > > > Content-Type: text/plain; charset="iso-8859-1" > > Hello, I have recently installed TinyOS. I have gone through all of the > steps on the TinyOS installation page. > > I try to compile the Blink program using > > make iris > > and I receive this error: > mkdir -p build/iris > compiling BlinkAppC to a iris binary > ncc -o build/iris/main.exe -Os -fnesc-separator=__ -Wall -Wshadow > -Wnesc-all -target=iris -fnesc-cfile=build/iris/app.c -board=micasb > -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 > -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"jallister\" > -DIDENT_HOSTNAME=\"localhost.local\" -DIDENT_USERHASH=0x05da3744L > -DIDENT_TIMESTAMP=0x4e6fd6a3L -DIDENT_UIDHASH=0xa7f0193fL > -fnesc-dump=wiring > -fnesc-dump='interfaces(!abstract())' > -fnesc-dump='referenced(interfacedefs, > components)' -fnesc-dumpfile=build/iris/wiring-check.xml BlinkAppC.nc -lm > two source files specified (PLATFORM_IRIS and BOARD_MICASB) > make: *** [exe0] Error 1 > > The mote I am using requires the AVR tools. I installed them all using the > .RPMs on the TinyOS install site. Would having any of the other 2 sets > (iMote2 or TI MPS430) interfere? > > Thank you for your assistance. I will continue to search for an answer > while waiting for someone with more experience to reply! > > >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
