PDA

Visualizza Versione Completa : Problema cc1.



Barzi
31-05-08, 14:38
Ciao a tutti.
Ho questo problema. Sto compilando un programma con un compilatore per applicazioni embedded chiamato avr-gcc. Ho installato XCode (ver. 2.5 su tiger) e tutto il necessario per compilare.
In fase di compilazione ottengo questo errore:

-----cut here --------
compiling Blink to a mica2 binary
ncc -o build/mica2/main.exe -Os -board=micasb -target=mica2 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -finline-limit=100000 -fnesc-cfile=build/mica2/app.c Blink.nc -lm
avr-gcc: error trying to exec 'cc1': execvp: No such file or directory
<commandline>: failed to preprocess /opt/local/stow/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 /opt/local/tinyos-1.x/tos/system/tos.h
avr-gcc: error trying to exec 'cc1': execvp: No such file or directory
<commandline>: failed to preprocess Blink.nc
make: *** [build/mica2/main.exe] Error 1
------ cut here ------------

A quanto sembra non trova il cc1.
Facendo un mdfind da terminale ho trovato questi 2 percorsi:

/Developer/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1

/opt/local/stow/repository/avr-tinyos/libexec/gcc/avr/4.1.2/cc1

Inoltre facendo type cc1 mi dice che non trova nulla.
Come risolvo? E' un problema di versione di gcc?
Thanx :-)

Peterpan
31-05-08, 17:46
Non conosco il comando "type" su BSD, su AIX mi faceva una sorta di dump del contenuto del file, ma con la bash non mi funziona il comando.

Hai verificato che nel path ci sia la directory dove si trova cc1 ? (no such file or directory dice proprio che non lo trova...) Hai verificato che il file abbia i permessi per essere eseguito ?

Barzi
31-05-08, 20:20
Ho provato a inserire i percorsi nel path ma nada...

Inoltre c'è uno script chiamato toscheck che verifica se l'ambiente per far funzionare TinyOS è installato correttamente. Lo script verifica che siano installati tutti i componenti necessari. Ecco il log di toscheck env:



toscheck completed with errors:

--> WARNING: CLASSPATH may not include {TOSROOT}/tinyos-1.x/tools/java. Please add the {TOSROOT}/tinyos-1.x/tools/java directory to your CLASSPATH or you may experience configuration problems
--> WARNING: The ncc found by toscheck is not version 1.1. Please update your nesc version to 1.1 tinyos.
--> WARNING: The avr-gcc found by toscheck is not 3.3-tinyos. Please update your avr-gcc compiler to 3.3-tinyos.
--> WARNING: The JAVA version found first by toscheck may not be version 1.4 which is required by TOS. Please ensure that the located Java version is 1.4
--> WARNING: Could not find the javax.comm classes.
Please ensure the java Comm API is installed correctly.
--> WARNING: The uisp version found by toscheck is not '20030820tinyos'. Please update your uisp version. The source for uisp version 20030820tinyos can be found in the TinyOS 1.1.0 distribution.
--> WARNING: The graphviz (dot) version found by toscheck is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.
--> WARNING: The avr-as version found by toscheck is not 2.13.2.1 Please update your avr-as version by updating your avr-binutils package.--> WARNING: msp430-gcc not found. Won't be able to compile to any msp430 platforms (telos).

host455:~ Barzi$ ncc --version
ncc: 1.2.4
nescc: 1.2.9
avr-gcc: avr-gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Vi può tornate utile questo log?
Grazie :)