tinyos / nesc

Master nesc repository
GNU General Public License v2.0
100 stars 53 forks source link

nesC: Internal error. #51

Closed aman4512 closed 5 years ago

aman4512 commented 5 years ago

OS: Ubuntu 18.10 Kernel: 4.18

This is the error I try when I try to build the example code found here

$ make micaz

mkdir -p build/micaz
    compiling SimpleAppC to a micaz binary
ncc -o build/micaz/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow -Wx22 -finline-limit=100000 -DIDENT_APPNAME=\"SimpleAppC\" -DIDENT_USERNc477c2aL -DIDENT_UIDHASH=0x3097c74bL -fnesc-dump=wiring -fnesc-dump='ibuild/micaz/wiring-check.xml SimpleAppC.nc -lm 
nesC: Internal error.
Please submit an issue to the GitHub repository at https://github.com/
make: *** [/usr/src/tinyos/support/make/avr/avr.rules:149: exe0] Error`
$ nescc -v
nescc: 1.3.5
NCDIR="/usr/lib/x86_64-linux-gnu/ncc"
NESCC_ARGS="-fnesc-include=nesc_nx"
NESCC_GCC="gcc"
gcc -specs=/usr/lib/x86_64-linux-gnu/ncc/tdspecs -I/usr/lib/x86_64-linux-gnu/ncc -v -DNESC=135
Using built-in specs.
Reading specs from /usr/lib/x86_64-linux-gnu/ncc/tdspecs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)
cire831 commented 5 years ago

can you add as an attachment the exact code you were using.

pointing at the tinyos example page isn't too useful.

On Tue, Jan 22, 2019 at 12:35 PM aman4512 notifications@github.com wrote:

OS: Ubuntu 18.10 Kernel: 4.18

This is the error I try when I try to build the example code found here http://tinyos.stanford.edu/tinyos-wiki/index.php/The_simplest_TinyOS_program

$ make micaz

mkdir -p build/micaz compiling SimpleAppC to a micaz binary ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wx22 -finline-limit=100000 -DIDENT_APPNAME=\"SimpleAppC\" -DIDENT_USERNc477c2aL -DIDENT_UIDHASH=0x3097c74bL -fnesc-dump=wiring -fnesc-dump='ibuild/micaz/wiring-check.xml SimpleAppC.nc -lm nesC: Internal error. Please submit an issue to the GitHub repository at https://github.com/ make: *** [/usr/src/tinyos/support/make/avr/avr.rules:149: exe0] Error`

$ nescc -v nescc: 1.3.5 NCDIR="/usr/lib/x86_64-linux-gnu/ncc" NESCC_ARGS="-fnesc-include=nesc_nx" NESCC_GCC="gcc" gcc -specs=/usr/lib/x86_64-linux-gnu/ncc/tdspecs -I/usr/lib/x86_64-linux-gnu/ncc -v -DNESC=135 Using built-in specs. Reading specs from /usr/lib/x86_64-linux-gnu/ncc/tdspecs COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tinyos/nesc/issues/51, or mute the thread https://github.com/notifications/unsubscribe-auth/AAY46TjTeBWuq87rFXtwcb_x9KGPlOaEks5vF3YLgaJpZM4aNeMU .

-- Eric B. Decker Senior (over 50 :-) Researcher

aman4512 commented 5 years ago

This zip contains the code and the Makefile.

TinyOS_Example.zip

Sorry for the delay in replying.

aman4512 commented 5 years ago

I tried with nesc 1.4.0 as well but got the same result.

aman4512 commented 5 years ago

Up until now I was using the tinos-tools and nesc packaged in the default ubuntu repositories. Using the ones packaged in the tinyprod repository doesn't cause the problem and builds all projects correctly. I guess the issue is with nesc packaged in the tinyos-tools packaged in the default repositories. Please look into this @cire831.

cire831 commented 5 years ago

I should have noticed you were using 1.3.5, but you also reported that 1.4.0 breaks as well. Weird. the tinyprod Can you try 1.4.0 with the tinyprod repository install.

The "default" repositories haven't been maintained for many years now. I don't have write permission to them so set up the tinyprod repositories.