0

Following this question, I'm now trying to compile the pybind11 test cases as instructed here on a Raspberry Pi. What I have done so far:

  • installed Raspbian Raspbian Buster Lite from the official page
  • updated/upgraded all packages
  • updated/upgraded python packages following the instructions here
  • compiled and installed pybind11 following the instructions here

my environment is:

  • Raspbian buster version 10
  • python 3.7.3
  • pip 20.0.2
  • gcc 8.3.0

Then running the command make check -j 4 the compiler stops at:

[ 68%] Building CXX object CmakeFiles/pybind11_tests.dir/test_numpy_dtypes.cpp.o

and the errors are:

c++: fatal error: Killed signal terminated program cplusplus

compilation terminated.

make[3]: *** [CMakeFiles/pybind11_tests.dir/build.make:297: CMakeFiles/pybind11_tests.dir/test_local_bindings.cpp.o] Error 1

make[3]: *** waiting for unfinished jobs...

make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/pybind11_tests.dir/all] Error 2

make[1]: *** [CMakeFiles/Makefile2:191: CMakeFile/check.dir/rule] Error 2

make: *** [Makefile:157: check] Error 2

I would appreciate it if you could help me understand what is the problem and how I can solve it.

Community
  • 1
  • 1
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193

2 Answers2

1

Doing more research and using the right keyword query, it seems this issue has nothing to do with bypynd11 or Raspbian for that matter. The issue seems to be with memory overflow as described in numerous posts before (including here and here). The solution might be to use fewer parallel processes -j <n> where n < 4, or do not use it at all as suggested here. For example, I tested the

make check -j 3

and it works. Or alternatively to create a swape file as described here.

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
0

Yes you have to create first swap file. After that you can do it. Acctually swap file will increase yor ram memory. It will use rom space for ram performance.

Please go through with below link it would help you.

https://youtu.be/Cr5mDFxvsb0

Puneet
  • 29
  • 9