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

Compiling challenges src/tools.cpp.o] Error #1

Closed
Dukat-Gul opened this issue Apr 9, 2021 · 3 comments
Closed

Compiling challenges src/tools.cpp.o] Error #1

Dukat-Gul opened this issue Apr 9, 2021 · 3 comments

Comments

@Dukat-Gul
Copy link

Heya.
Tried to compile the excellent project and after a very long pause at the 84% mark I get the following failure. Any suggestions?

loraftp/build $ make -j Scanning dependencies of target wirehair
Scanning dependencies of target zstd
[ 2%] Building CXX object wirehair/CMakeFiles/wirehair.dir/gf256.cpp.o
[ 4%] Building CXX object wirehair/CMakeFiles/wirehair.dir/WirehairTools.cpp.o
[ 6%] Building CXX object wirehair/CMakeFiles/wirehair.dir/wirehair.cpp.o
[ 8%] Building CXX object wirehair/CMakeFiles/wirehair.dir/WirehairCodec.cpp.o
[ 10%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/debug.c.o
[ 13%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/error_private.c.o
[ 15%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/entropy_common.c.o
[ 17%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/fse_compress.c.o
[ 19%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/xxhash.c.o
[ 21%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/threading.c.o
[ 23%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/fse_decompress.c.o
[ 26%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/zstd_common.c.o
[ 28%] Building C object CMakeFiles/zstd.dir/zstd_lib/common/pool.c.o
[ 30%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_compress_literals.c.o
[ 32%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/hist.c.o
[ 34%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/huf_compress.c.o
[ 36%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_compress_superblock.c.o
[ 39%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_compress_sequences.c.o
[ 43%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_double_fast.c.o
[ 45%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_fast.c.o
[ 45%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_compress.c.o[ 47%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_ldm.c.o
[ 50%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_lazy.c.o
[ 52%] Building C object CMakeFiles/zstd.dir/zstd_lib/dictBuilder/divsufsort.c.o[ 54%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstdmt_compress.c.o
[ 56%] Building C object CMakeFiles/zstd.dir/zstd_lib/compress/zstd_opt.c.o
[ 58%] Building C object CMakeFiles/zstd.dir/zstd_lib/decompress/huf_decompress.c.o
[ 63%] Building C object CMakeFiles/zstd.dir/zstd_lib/decompress/zstd_decompress_block.c.o
[ 65%] Building C object CMakeFiles/zstd.dir/zstd_lib/dictBuilder/fastcover.c.o
[ 67%] Building C object CMakeFiles/zstd.dir/zstd_lib/decompress/zstd_ddict.c.o
[ 60%] Building C object CMakeFiles/zstd.dir/zstd_lib/dictBuilder/cover.c.o
[ 69%] Building C object CMakeFiles/zstd.dir/zstd_lib/decompress/zstd_decompress.c.o
[ 71%] Building C object CMakeFiles/zstd.dir/zstd_lib/dictBuilder/zdict.c.o
/home/pi/LoRaFTP/loraftp/wirehair/WirehairCodec.cpp: In member function ‘void wirehair::Codec::BackSubstituteAboveDiagonal()’: /home/pi/LoRaFTP/loraftp/wirehair/WirehairCodec.cpp:2303:39: warning: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Wrestrict] gf256_div_mem(src, src, code_value, _block_bytes); ^~~ ~~~ /home/pi/LoRaFTP/loraftp/wirehair/WirehairCodec.cpp:2387:35: warning: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Wrestrict] gf256_div_mem(src, src, code_value, _block_bytes); ^~~ ~~~ /home/pi/LoRaFTP/loraftp/wirehair/WirehairCodec.cpp:2652:31: warning: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Wrestrict] gf256_div_mem(src, src, code_value, _block_bytes); ^~~ ~~~ [ 73%] Linking CXX static library libwirehair.a
[ 73%] Built target wirehair
[ 76%] Linking C static library libzstd.a
[ 76%] Built target zstd
Scanning dependencies of target loraftp
[ 82%] Building CXX object CMakeFiles/loraftp.dir/src/linux_serial.cpp.o
[ 82%] Building CXX object CMakeFiles/loraftp.dir/src/loraftp.cpp.o
[ 82%] Building CXX object CMakeFiles/loraftp.dir/src/waveshare.cpp.o
[ 84%] Building CXX object CMakeFiles/loraftp.dir/src/tools.cpp.o

c++: fatal error: Killed signal terminated program cc1plus compilation terminated.
make[2]: *** [CMakeFiles/loraftp.dir/build.make:102: CMakeFiles/loraftp.dir/src/tools.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:161: CMakeFiles/loraftp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@catid
Copy link
Owner

catid commented Apr 9, 2021

Try building with make -j4

I think you're running out of RAM

@Dukat-Gul
Copy link
Author

Thanks, yeah ran top in another Windows during the process and sure enough memory was being totally consumed....

Screenshot_20210410-084619_Termius

tried the make -j4 and still the same issue, I do note that I am using a Raspberry Pi 3 not the recommended rpi4.
Anyhow did some quick swap adjustments/increases;

Temporarily Stop Swap:
sudo dphys-swapfile swapoff
Modify the size of the swap
As root, edit the file /etc/dphys-swapfile and modify the variable CONF_SWAPSIZE to 1024:
sudo vi /etc/dphys-swapfile
Initialize Swap File
sudo dphys-swapfile setup
Start Swap
sudo dphys-swapfile swapon

Compile worked, I have successfully transmitted (& received) and example log file and an 11MB video file.

I did try to use the echo_test command with 0 on one side and -1 (listen) on the other but nothing seemed to happen.

@Dukat-Gul
Copy link
Author

Updated make -j4 along with some decent amount of swap enabled on my rpi3 allowed the compile to complete. Memory being exhausted was clearly the issue.

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

2 participants