Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Java errors "requested alignment is not a power of 2" #438

Open
Callroy opened this issue Dec 28, 2019 · 0 comments
Open

Make Java errors "requested alignment is not a power of 2" #438

Callroy opened this issue Dec 28, 2019 · 0 comments

Comments

@Callroy
Copy link

Callroy commented Dec 28, 2019

Hello
I'm attempting to test the serial connection between my Iris mote and PC, when i used "Java TestSerial" I got the error

cal@cal-VirtualBox:~/tinyos-main/apps/TestSerial$ java TestSerial
Exception in thread "main" java.lang.NoClassDefFoundError: TestSerial
Caused by: java.lang.ClassNotFoundException: TestSerial
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: TestSerial. Program will exit.

To see if my java was set up correct I used "make" in "tinyos/support/sdk/java" and i get the below output where the errors are "Requested Alignment is not a power of 2"

cal@cal-VirtualBox:~/tinyos-main/support/sdk/java$ make
... /home/cal/tinyos-main/support/sdk/java
make[1]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net'
... /home/cal/tinyos-main/support/sdk/java/net
make[2]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/packet'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/packet
ncg -o Serial.java -java-classname=net.tinyos.packet.Serial java /home/cal/tinyos-main/tos/lib/serial/Serial.h Serial.h
In file included from /usr/lib/i386-linux-gnu/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 nesC file /home/cal/tinyos-main/tos/lib/serial/Serial.h
Makefile:12: recipe for target 'Serial.java' failed
make[3]: *** [Serial.java] Error 1
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/packet'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/message'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/message
mig -o SerialPacket.java -java-classname=net.tinyos.message.SerialPacket java /home/cal/tinyos-main/tos/lib/serial/Serial.h serial_packet -I/home/cal/tinyos-main/tos/types
In file included from /usr/lib/i386-linux-gnu/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 /home/cal/tinyos-main/tos/lib/serial/Serial.h
Makefile:12: recipe for target 'SerialPacket.java' failed
make[3]: *** [SerialPacket.java] Error 1
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/message'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/sf'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/sf
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/sf'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/tools'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/tools
mig java -java-classname=net.tinyos.tools.PrintfMsg /home/cal/tinyos-main/tos/lib/printf/printf.h printf_msg -o PrintfMsg.java
In file included from /usr/lib/i386-linux-gnu/ncc/deputy_nodeputy.h:4:
/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h:429: requested alignment is not a power of 2
/home/cal/tinyos-main/tos/lib/printf/printf.h:44:2: warning: #warning " *************************** PRINTF SEMANTICS HAVE CHANGED! ********************************************* Make sure you now include the following two components in your top level application file: PrintfC and SerialStartC. To supress this warning in the future, #define the variable NEW_PRINTF_SEMANTICS. Take a look at the updated tutorial application under apps/tutorials/printf for an example. ************************************************************************************"
failed to parse message file /home/cal/tinyos-main/tos/lib/printf/printf.h
Makefile:16: recipe for target 'PrintfMsg.java' failed
make[3]: *** [PrintfMsg.java] Error 1
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/tools'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/sim'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/sim
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/sim'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/util'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/util
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/util'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/comm'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/comm
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/comm'
make[3]: Entering directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/mviz'
... /home/cal/tinyos-main/support/sdk/java/net/tinyos/mviz
make[3]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos/mviz'
make[2]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net/tinyos'
make[1]: Leaving directory '/home/cal/tinyos-main/support/sdk/java/net'

Can anyone offer some guidance on what the issue here is or a potential resolution?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant