我试图在tinyos中构建一个标准程序。 Makefile看起来像这样:
Bundle(for: self.classForCoder)
当我成功时,出现错误:
COMPONENT=TestSerialAppC
BUILD_EXTRA_DEPS += TestSerial.class
CLEAN_EXTRA = *.class TestSerialMsg.java
CFLAGS += -I$(TOSDIR)/lib/T2Hack
TestSerial.class: $(wildcard *.java) TestSerialMsg.java
javac -target 1.4 -source 1.4 *.java
TestSerialMsg.java:
mig java -target=null $(CFLAGS) -java-classname=TestSerialMsg
TestSerial.h test_serial_msg -o $@
include $(MAKERULES)
我不知道为什么会这样,以及我如何解决它。这是gcc的问题还是java的问题?
编辑:当我在命令行中执行这些命令时,我发现问题在于:
In file included from /usr/lib/ncc/deputy_nodeputy.h:4:
/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h:429: requested alignment
is not a power of 2
failed to parse message file TestSerial.h
Makefile:11: recipe for target 'TestSerialMsg.java' failed
make: *** [TestSerialMsg.java] Error 1
mig 是message interface generator for nesC。我认为这是因为我在调用mig时使用了错误版本的gcc。