named-data-iot/ndn-lite-test-over-riot

Build error in 'interest' test on 'native' port

Closed this issue · 6 comments

Environment: Ubuntu 16.04 ARMv7, gcc 5.4
Code revision: 1b9da9c

RIOT example works:

sunny@pimate:~/code/ndn-lite-test-over-riot/RIOT/examples/hello-world$ make all term
Building application "hello-world" for "native" with MCU "native".

"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/boards/native
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/boards/native/drivers
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/core
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native/periph
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native/vfs
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/drivers
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/drivers/periph_common
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/sys
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/sys/auto_init
   text	   data	    bss	    dec	    hex	filename
  18134	    392	  48364	  66890	  1054a	/home/sunny/code/ndn-lite-test-over-riot/RIOT/examples/hello-world/bin/native/hello-world.elf
/home/sunny/code/ndn-lite-test-over-riot/RIOT/examples/hello-world/bin/native/hello-world.elf  
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2018.10-RC1-732-gbc8f3-HEAD)
Hello World!
You are running RIOT on a(n) native board.
This board features a(n) native MCU.
^C
native: exiting

interest test does not compile:

sunny@pimate:~/code/ndn-lite-test-over-riot/ndn-riot-tests/interest$ make all term
Building application "interest_test" for "native" with MCU "native".

rm -Rf /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite
mkdir -p $(dirname /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite)
cp -a /home/sunny/code/ndn-lite-test-over-riot/RIOT/../ndn-lite /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite
touch /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/.prepared
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/pkg/ndn-lite
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite -f /home/sunny/code/ndn-lite-test-over-riot/RIOT/pkg/ndn-lite/Makefile.ndn-lite
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/app-support
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/encode
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/face
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/forwarder
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/security
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/security/detail/default-backend
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/security/detail/default-backend/sec-lib/micro-ecc
"make" -C /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/pkg/native/ndn-lite/security/detail/default-backend/sec-lib/tinycrypt
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/boards/native
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/boards/native/drivers
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/core
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native/periph
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/cpu/native/vfs
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/drivers
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/drivers/periph_common
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/sys
"make" -C /home/sunny/code/ndn-lite-test-over-riot/RIOT/sys/auto_init
gcc: error: /home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/native/ndn-security-detail.a: No such file or directory
/home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/../../RIOT/Makefile.include:452: recipe for target '/home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/native/interest_test.elf' failed
make: *** [/home/sunny/code/ndn-lite-test-over-riot/ndn-riot-tests/interest/bin/native/interest_test.elf] Error 1

I also tried random and sign-verify tests because they appear to have newer "fix" patches. They fail with the same error.

Problem persists as of 8f29f39

This bug actually comes from RIOT. Since we have updated RIOT version number recently, could you try again to see if the same problem persists?

As of 266d832, the error changes to:

/home/sunny/code/LITE/ndn-riot-tests/interest/main.c: In function ‘test_ecdsa_signed_interest’:
/home/sunny/code/LITE/ndn-riot-tests/interest/main.c:91:3: error: implicit declaration of function ‘ndn_signed_interest_ecdsa_sign’ [-Werror=implicit-function-declaration]
   ndn_signed_interest_ecdsa_sign(&interest, identity, &prv_key);
   ^
/home/sunny/code/LITE/ndn-riot-tests/interest/main.c: In function ‘test_hmac_signed_interest’:
/home/sunny/code/LITE/ndn-riot-tests/interest/main.c:130:3: error: implicit declaration of function ‘ndn_signed_interest_hmac_sign’ [-Werror=implicit-function-declaration]
   ndn_signed_interest_hmac_sign(&interest, identity, &hmac_key);
   ^
/home/sunny/code/LITE/ndn-riot-tests/interest/main.c: In function ‘test_digest_signed_interest’:
/home/sunny/code/LITE/ndn-riot-tests/interest/main.c:164:3: error: implicit declaration of function ‘ndn_signed_interest_digest_sign’ [-Werror=implicit-function-declaration]
   ndn_signed_interest_digest_sign(&interest);
   ^
cc1: all warnings being treated as errors
/home/sunny/code/LITE/RIOT/Makefile.base:83: recipe for target '/home/sunny/code/LITE/ndn-riot-tests/interest/bin/native/application_interest_test/main.o' failed

We refactored ndn-riot-tests recently. If you update all submodules and directly use make all term under ndn-riot-tests folder (See updated instructions in readme), all tests should pass.

As of 1fdcc6f, following the instructions of executing make all term in ndn-riot-tests folder, build still fails:

"make" -C /home/sunny/code/LITE/ndn-riot-tests/encoder-decoder
/home/sunny/code/LITE/ndn-riot-tests/encoder-decoder/encoder-decoder-tests.c: In function ‘_run_encoder_decoder_test’:
/home/sunny/code/LITE/ndn-riot-tests/encoder-decoder/encoder-decoder-tests.c:111:12: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Werror=format=]
     printf("In _run_encoder_decoder_test, got wrong length after enoding and de
            ^
cc1: all warnings being treated as errors
/home/sunny/code/LITE/RIOT/Makefile.base:83: recipe for target '/home/sunny/code/LITE/ndn-riot-tests/bin/native/encoder-decoder-tests/encoder-decoder-tests.o' failed

The latest commit fixed the issue.