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

Example files compilation throws error #15

Open
tanim-ics opened this issue Dec 2, 2021 · 0 comments
Open

Example files compilation throws error #15

tanim-ics opened this issue Dec 2, 2021 · 0 comments

Comments

@tanim-ics
Copy link

I am following the ndn-iot-package-over-posix documentation. After cloning the repo, I have created a directory named "build",
and from the build folder I have executed the command cmake -DCMAKE_BUILD_TYPE=Release .. Everything was working ok.
but after this when I am executing make -j`nproc` it starts throwing error. It would be a great help if you could guide me in the right direction. I am sharing the output of my terminal.

root@1afe2012cd7e:~# git clone --recursive https://github.com/named-data-iot/ndn-iot-package-over-posix.git
Cloning into 'ndn-iot-package-over-posix'...
remote: Enumerating objects: 1353, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 1353 (delta 35), reused 34 (delta 15), pack-reused 1288
Receiving objects: 100% (1353/1353), 544.58 KiB | 2.62 MiB/s, done.
Resolving deltas: 100% (870/870), done.
Submodule 'ndn-lite' (https://github.com/named-data-iot/ndn-lite.git) registered for path 'ndn-lite'
Cloning into '/root/ndn-iot-package-over-posix/ndn-lite'...
remote: Enumerating objects: 5457, done.
remote: Counting objects: 100% (55/55), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 5457 (delta 24), reused 29 (delta 15), pack-reused 5402
Receiving objects: 100% (5457/5457), 1.87 MiB | 2.69 MiB/s, done.
Resolving deltas: 100% (3869/3869), done.
Submodule path 'ndn-lite': checked out '287909311e37baea2ee50b38678e5ff309c82a1f'
root@1afe2012cd7e:~# cd ndn-iot-package-over-posix/
root@1afe2012cd7e:~/ndn-iot-package-over-posix# ls
CMakeInputs     QR_encoder.py  adaptation  devices  examples     ndn-lite    tutorial_shared_info.txt
CMakeLists.txt  README.rst     benchmarks  docs     legacy-docs  ndn-lite.h  wrapper
root@1afe2012cd7e:~/ndn-iot-package-over-posix# mkdir build
root@1afe2012cd7e:~/ndn-iot-package-over-posix# cd build/
root@1afe2012cd7e:~/ndn-iot-package-over-posix/build# cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Documentation skipped
-- Configuring done
-- Generating done
-- Build files have been written to: /root/ndn-iot-package-over-posix/build
root@1afe2012cd7e:~/ndn-iot-package-over-posix/build# make -j`nproc`
Scanning dependencies of target ndn-lite
[  1%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/access-control.c.o
[  2%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/security-bootstrapping.c.o
[  5%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/ndn-sig-verifier.c.o
[  5%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/service-discovery.c.o
[  6%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/pub-sub.c.o
[  7%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/policy.c.o
[  9%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/repo.c.o
[ 10%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/app-support/ndn-trust-schema.c.o
[ 11%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/data.c.o
[ 13%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/encrypted-payload.c.o
[ 14%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/interest.c.o
[ 15%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/key-storage.c.o
[ 17%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/metainfo.c.o
[ 18%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/name-component.c.o
[ 19%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/name.c.o
[ 21%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/signature.c.o
[ 22%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/signed-interest.c.o
[ 23%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/forwarder-helper.c.o
[ 25%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/ndn-rule-storage.c.o
[ 26%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/wrapper-api.c.o
[ 27%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/trust-schema/ndn-trust-schema-pattern-component.c.o
[ 28%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/trust-schema/ndn-trust-schema-pattern.c.o
[ 30%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/encode/trust-schema/ndn-trust-schema-rule.c.o
[ 31%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/face/dummy-face.c.o
[ 32%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/forwarder/face-table.c.o
[ 34%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/forwarder/fib.c.o
[ 35%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/forwarder/forwarder.c.o
[ 36%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/forwarder/name-tree.c.o
[ 38%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/forwarder/pit.c.o
[ 39%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/util/memory-pool.c.o
[ 40%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/util/msg-queue.c.o
[ 42%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/util/re.c.o
[ 43%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-ecc.c.o
[ 44%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-aes.c.o
[ 46%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-hmac.c.o
[ 47%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-rng.c.o
[ 48%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-sec-config.c.o
[ 51%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-sec-utils.c.o
[ 51%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/ndn-lite-sha.c.o
[ 52%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/ndn-lite-default-aes-impl.c.o
[ 53%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/ndn-lite-default-ecc-impl.c.o
[ 55%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/ndn-lite-default-rng-impl.c.o
[ 56%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/ndn-lite-default-hmac-impl.c.o
[ 57%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/ndn-lite-default-sha-impl.c.o
[ 59%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/micro-ecc/uECC.c.o
[ 60%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_aes_decrypt.c.o
[ 61%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_aes_encrypt.c.o
[ 63%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_cbc_mode.c.o
[ 64%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ccm_mode.c.o
[ 65%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_cmac_mode.c.o
[ 67%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ctr_mode.c.o
[ 68%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ctr_prng.c.o
[ 69%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ecc_dh.c.o
[ 71%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ecc_dsa.c.o
[ 73%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ecc_platform_specific.c.o
[ 73%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_ecc.c.o
[ 75%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_hmac_prng.c.o
[ 76%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_hmac.c.o
[ 77%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_sha256.c.o
[ 78%] Building C object CMakeFiles/ndn-lite.dir/ndn-lite/security/default-backend/sec-lib/tinycrypt/tc_utils.c.o
[ 81%] Building C object CMakeFiles/ndn-lite.dir/adaptation/udp/udp-face.c.o
[ 81%] Building C object CMakeFiles/ndn-lite.dir/adaptation/uniform-time.c.o
[ 82%] Building C object CMakeFiles/ndn-lite.dir/adaptation/unix-socket/unix-face.c.o
[ 84%] Building C object CMakeFiles/ndn-lite.dir/adaptation/security/ndn-lite-rng-posix-crypto-impl.c.o
[ 85%] Building C object CMakeFiles/ndn-lite.dir/adaptation/ndn-lite.c.o
[ 86%] Linking C static library libndn-lite.a
[ 86%] Built target ndn-lite
Scanning dependencies of target tutorial-app-sub
Scanning dependencies of target test-repo
Scanning dependencies of target app-template
Scanning dependencies of target tutorial-app
[ 88%] Building C object CMakeFiles/tutorial-app-sub.dir/examples/tutorial-app-sub.c.o
[ 92%] Building C object CMakeFiles/test-repo.dir/examples/test-repo.c.o
[ 92%] Building C object CMakeFiles/tutorial-app.dir/examples/tutorial-app.c.o
[ 92%] Building C object CMakeFiles/app-template.dir/examples/app-template.c.o
/root/ndn-iot-package-over-posix/examples/tutorial-app-sub.c: In function 'load_bootstrapping_info':
/root/ndn-iot-package-over-posix/examples/tutorial-app-sub.c:73:5: error: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Werror=unused-result]
   73 |     fgets(buf, sizeof(buf), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ndn-iot-package-over-posix/examples/app-template.c: In function 'load_bootstrapping_info':
/root/ndn-iot-package-over-posix/examples/app-template.c:63:5: error: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Werror=unused-result]
   63 |     fgets(buf, sizeof(buf), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ndn-iot-package-over-posix/examples/tutorial-app.c: In function 'load_bootstrapping_info':
/root/ndn-iot-package-over-posix/examples/tutorial-app.c:66:5: error: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Werror=unused-result]
   66 |     fgets(buf, sizeof(buf), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ndn-iot-package-over-posix/examples/test-repo.c: In function 'load_bootstrapping_info':
/root/ndn-iot-package-over-posix/examples/test-repo.c:63:5: error: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Werror=unused-result]
   63 |     fgets(buf, sizeof(buf), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ndn-iot-package-over-posix/examples/app-template.c: At top level:
cc1: error: unrecognized command line option '-Wno-int-to-void-pointer-cast' [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/app-template.dir/build.make:63: CMakeFiles/app-template.dir/examples/app-template.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:113: CMakeFiles/app-template.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/root/ndn-iot-package-over-posix/examples/tutorial-app-sub.c: At top level:
cc1: error: unrecognized command line option '-Wno-int-to-void-pointer-cast' [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/tutorial-app-sub.dir/build.make:63: CMakeFiles/tutorial-app-sub.dir/examples/tutorial-app-sub.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/tutorial-app-sub.dir/all] Error 2
/root/ndn-iot-package-over-posix/examples/test-repo.c: At top level:
cc1: error: unrecognized command line option '-Wno-int-to-void-pointer-cast' [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/test-repo.dir/build.make:63: CMakeFiles/test-repo.dir/examples/test-repo.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/test-repo.dir/all] Error 2
/root/ndn-iot-package-over-posix/examples/tutorial-app.c: At top level:
cc1: error: unrecognized command line option '-Wno-int-to-void-pointer-cast' [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/tutorial-app.dir/build.make:63: CMakeFiles/tutorial-app.dir/examples/tutorial-app.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/tutorial-app.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
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