Open ZigiWalter opened 3 years ago
...I think this is the correct link for installing the RF24 dependency: https://nrf24.github.io/RF24/md_docs_linux_install.html
But I'm still not out of the woods :-( I hit many errors like the below, probably because I'm using the wrong compiler version. However, I'm not sure which is required, nor how to tell the build script to use it. AFAIK, the RPI image I use is updated to the most recent version. Help would be greatly appreciated.
>make all [ 37%] Built target util [ 50%] Building CXX object net/CMakeFiles/nerfnet.dir/nerfnet_main.o In file included from /home/pi/installs/nrfnet/nerfnet/net/primary_radio_interface.h:22, from /home/pi/installs/nrfnet/nerfnet/net/nerfnet_main.cc:30: /home/pi/installs/nrfnet/nerfnet/net/radio_interface.h:74:10: error: ‘optional’ in namespace ‘std’ does not name a template type std::optional<uint8_t> id; ^~~~~~~~ /home/pi/installs/nrfnet/nerfnet/net/radio_interface.h:74:5: note: ‘std::optional’ is only available from C++17 onwards std::optional<uint8_t> id; ^~~
OK, I got it to work on an RPI4!
For whoever may find it useful, here are the things I did, though I suspect there are easier ways:
sudo mv /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.org
sudo ln -s /opt/gcc-10.1.0/lib/libstdc++.so.6 /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
After all of the above, "NerfNet" works as expected. However, please post fixes/corrections you may have. BTW - I use it in conjunction with"sshuttle" in order to forward all TCP traffic, and also with "ssf" to forward selected UDP traffic - the combination seems to work just fine.
Hi,
I've hit several compilation issues. I was able to workaround those that required removing the relative paths in "#include" statements and a casting of a "const" parameter, but I'm quite lost about the below error. Did I do anything wrong/overlooked some installation phase?
Thanks.
Scanning dependencies of target nerfnet [ 50%] Building CXX object net/CMakeFiles/nerfnet.dir/nerfnet_main.o /home/pi/installs/nrfnet/nerfnet/net/nerfnet_main.cc:21:10: fatal error: RF24/RF24.h: No such file or directory #include <RF24/RF24.h> ^~~~~~~~~~~~~ compilation terminated. make[2]: *** [net/CMakeFiles/nerfnet.dir/build.make:63: net/CMakeFiles/nerfnet.dir/nerfnet_main.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:86: net/CMakeFiles/nerfnet.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
Hi, How did you solve "include" and "const" things?
Hi,
I've hit several compilation issues. I was able to workaround those that required removing the relative paths in "#include" statements and a casting of a "const" parameter, but I'm quite lost about the below error. Did I do anything wrong/overlooked some installation phase?
Thanks.