Hi all, I can compile for micaz now, thanks to Abhishek.
The solution was to add /stow/repository/avr-tinyos/bin/../libexec/ gcc/avr/4.1.2/ to the PATH. After that, using $ avr-gcc -print-search-dirs I discovered that avr-gcc looks for the standard library in a directory which I don't have on my system: /stow/repository/avr-tinyos/avr/include/ I reinstalled avr-tools from the site of Kevin Klues, and now everything works fine. Hopefully this can help other Mac users. Cheers Zinaida On 03 Jun 2008, at 20:07, Abhishek Anand wrote: > Hi ma'm > > If somebody knows where avr-gcc searches for the files included in > <>, the problem can be solved > Nevertheless, you can still solve the problem if you replace <> by > " " with absolute paths in all the include directives of tos.h > for eg: line no. 15 of tos.h is > #include <math.h> > replace it by > #include "/stow/repository/avr-tinyos/avr/include/math.h" > > > Better write a small program which will automatically do this > replacement in all the files of /Users/zina/src/tinyos-2.x/tos/ > system/ directory. > > Regards, > Abhishek Anand > IIT Guwahati > alt email: [EMAIL PROTECTED] > http://abhishek.anand.iitg.googlepages.com/home > > > > On Tue, Jun 3, 2008 at 10:58 PM, Zinaida Benenson <[EMAIL PROTECTED] > mannheim.de> wrote: > Hi Abnishek, > > extending PATH really makes some difference. Unfortunately, I still > get errors: > > $ PATH=$PATH:/stow/repository/avr-tinyos/bin/../libexec/gcc/avr/4.1.2/ > > $ make micaz > mkdir -p build/micaz > compiling BlinkAppC to a micaz binary > ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all - > target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb - > DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 - > DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"zina\" - > DIDENT_HOSTNAME=\"spiderman.infor\" -DIDENT_USERHASH=0x9bf9b498L - > DIDENT_TIMESTAMP=0x48457befL -DIDENT_UIDHASH=0xf6a7aa25L -fnesc- > dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc- > dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/ > micaz/wiring-check.xml BlinkAppC.nc -lm > /stow/repository/nesc-1.2.9/lib/ncc/nesc_nx.h:16:22: error: > inttypes.h: No such file or directory > > <commandline>: failed to preprocess /stow/repository/nesc-1.2.9/lib/ > ncc/nesc_nx.h > /Users/zina/src/tinyos-2.x/tos/system/tos.h:5:22: error: > inttypes.h: No such file or directory > /Users/zina/src/tinyos-2.x/tos/system/tos.h:13:20: error: string.h: > No such file or directory > /Users/zina/src/tinyos-2.x/tos/system/tos.h:14:20: error: stdlib.h: > No such file or directory > /Users/zina/src/tinyos-2.x/tos/system/tos.h:15:18: error: math.h: > No such file or directory > ... > [very long list of simular errors omitted] > ... > In component `TimerMilliC': > /Users/zina/src/tinyos-2.x/tos/system/TimerMilliC.nc:44: too many > arguments > In component `BlinkAppC': > BlinkAppC.nc:51: cannot find `Boot' > make: *** [exe0] Error 1 > > It seems that I don't have some libraries? > > $ locate inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/2.95.2/ > inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/3.1/inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/3.3/inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/gcc/darwin/4.0/inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple- > darwin7/4.0.0/include/inttypes.h > /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple- > darwin7/4.0.1/include/inttypes.h > /Developer/SDKs/MacOSX10.4u.sdk/usr/include/inttypes.h > /Developer/SDKs/MacOSX10.4u.sdk/usr/include/xlocale/_inttypes.h > /Users/zina/src/tinyos-2.x/tos/chips/pxa27x/inttypes.h > /stow/repository/avr-tinyos/avr/include/inttypes.h > /stow/repository/msp430-tinyos/msp430/include/sys/inttypes.h > /usr/include/inttypes.h > /usr/include/xlocale/_inttypes.h > > I tried to add /stow/repository/avr-tinyos/avr/include/ to the > PATH, but it didn't make any difference. > > Cheers > Zinaida > > > > > On 03 Jun 2008, at 19:00, Abhishek Anand wrote: > > Hi ma'm, > > try adding the folder containing cc1 to your path > PATH=$PATH:/stow/repository/avr-tinyos/bin/../libexec/gcc/avr/4.1.2/ > > Regards, > Abhishek Anand > IIT Guwahati > alt email: [EMAIL PROTECTED] > http://abhishek.anand.iitg.googlepages.com/home > > On Tue, Jun 3, 2008 at 9:49 PM, Zinaida Benenson <[EMAIL PROTECTED] > mannheim.de> wrote: > Hi, > > I'm trying to compile for micaz on PPC Mac (Tiger), and I have the > standard problem which was already described here. Unforunately, I > couldn't find a satisfactory answer in this mailing list, and nowhere > else. > > I installed TinyOS using recent instructions by Kevin Klues with > precompiled binaries for msp430 (this works fine) and avr: > http://klueska.doesntexist.com/installing_tinyos2.html > > The famous error goes here: > > --------------- > spiderman:~/src/tinyos-2.x/apps/Blink zina$ make micaz > mkdir -p build/micaz > compiling BlinkAppC to a micaz binary > ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all - > target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb - > DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 - > DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"zina\" - > DIDENT_HOSTNAME=\"spiderman.infor\" -DIDENT_USERHASH=0x9bf9b498L - > DIDENT_TIMESTAMP=0x484569aeL -DIDENT_UIDHASH=0x1f02a009L -fnesc- > dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc- > dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/ > micaz/wiring-check.xml BlinkAppC.nc -lm > avr-gcc: error trying to exec 'cc1': execvp: No such file or directory > <commandline>: failed to preprocess /stow/repository/nesc-1.2.9/lib/ > ncc/nesc_nx.h > avr-gcc: error trying to exec 'cc1': execvp: No such file or directory > <commandline>: failed to preprocess /Users/zina/src/tinyos-2.x/tos/ > system/tos.h > avr-gcc: error trying to exec 'cc1': execvp: No such file or directory > <commandline>: failed to preprocess /Users/zina/src/tinyos-2.x/tos/ > system/TinySchedulerC.nc > <commandline>: Scheduler `TinySchedulerC' has no scheduling interface > named `TaskBasic' > avr-gcc: error trying to exec 'cc1': execvp: No such file or directory > <commandline>: failed to preprocess BlinkAppC.nc > make: *** [exe0] Error 1 > ----------------- > > I checked that I have only one avr-gcc on my system, then deleted it > and reinstalled (this is what Kevin recommended when this question > was posted previously). No effect. > > At first glance, avr-gcc cannot find the program called "cc1". > However: > > $ avr-gcc -print-prog-name=cc1 > /stow/repository/avr-tinyos/bin/../libexec/gcc/avr/4.1.2/cc1 > > To compare: > > $ msp430-gcc -print-prog-name=cc1 > /stow/bin/../lib/gcc-lib/msp430/3.2.3/cc1 > > It can be seen that msp430-gcc was built using gcc 3.2.3, but avr-gcc > uses gcc 4.1.2. > > The only solution I could think of was to try and build avr-gcc using > gcc 3.2.3. However, before I go to such trouble, I would like to hear > what you think of this idea, and probably you can suggest something > else (even if you are not a Mac user). > > Cheers > Zinaida > > -- > Zinaida Benenson > http://pi1.informatik.uni-mannheim.de > > University of Mannheim > A 5,6 > 68159 Mannheim > Germany > > Room B 138 > Phone +49 621 181 2556 > Fax +49 621 181 3577 > [EMAIL PROTECTED] > > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos- > help > > > -- > Zinaida Benenson > http://pi1.informatik.uni-mannheim.de > > University of Mannheim > A 5,6 > 68159 Mannheim > Germany > > Room B 138 > Phone +49 621 181 2556 > Fax +49 621 181 3577 > [EMAIL PROTECTED] > > > > -- Zinaida Benenson http://pi1.informatik.uni-mannheim.de University of Mannheim A 5,6 68159 Mannheim Germany Room B 138 Phone +49 621 181 2556 Fax +49 621 181 3577 [EMAIL PROTECTED] _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
