Closed nddao closed 6 years ago
A similar issue was raised as https://github.com/watson-intu/self/issues/33. Please try the followings and see what will happen.
Use the latest code. We've eliminated a large plugin which might cause CPU overhead while build process. You can check the version by the following command.
$ git --no-pager log -1
commit 90797cc3d35a621c9370a92542fe239dacc5fefd (HEAD -> develop, origin/develop, origin/HEAD)
Author: Takao Moriyama <moriyama@jp.ibm.com>
Date: Wed Sep 20 13:51:23 2017 +0900
Incorporate recent changes in self plugins (#30)
* Incorporate recent changes in self plugins including support for Pepper's tablet and fix for build break in PCL
* Incorporate fix in plugins for issue #31
* Incorporate pull request #5 of self-plugins
* Add change for pull request #7 from watson-intu/pcl_removed
Reduce the number of cores to be used while build process. Change the line 33 of script/builds.sh from
qibuild $ACTION -c "$TC_NAME" -j 4
to
qibuild $ACTION -c "$TC_NAME" -j 2
. Please consider -j 1
if -j 2
is not enough.
Put a heatsink on the CPU chip of your RaspberryPi as in the picture.
dpkg -l openssl ||/ Name Version Architecture Description +++-==============-============-============-================================= ii openssl 1.1.0f-3 armhf Secure Sockets Layer
After getting the changed Crypt.ccp (from https://github.com/watson-intu/cpp-sdk/pull/3/files/6fd2af755431f7767561462dc5b95c42dab041cd )
And follow the steps in https://github.com/watson-intu/self/issues/37 , I am able to compile it successfully. Note that compiling on Raspberry uses up 100% CPU resources at some points.
@nddao I'm glad to hear that you've successfully built Intu for RasPi, and I'm curious about how you handled link error which I mentioned in https://github.com/watson-intu/self/issues/37#issuecomment-338113521. Did you use new ABI by disabling use of "add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)" in self/CMakeLists.txt as described in the link above ?
Also I'd like to know which version of opencv-objdetect is installed on your environment. You can check it by the following command.
$ dpkg -l "libopencv-objdetect*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================-==================-==================-==========================================================
ii libopencv-objdetect-dev:ar 2.4.9.1+dfsg1-2 armhf development files for libopencv-objdetect
un libopencv-objdetect2.4 <none> <none> (no description available)
ii libopencv-objdetect2.4v5:a 2.4.9.1+dfsg1-2 armhf computer vision Object Detection library
First, the main reason that it seems to be hang when compiling Intu on Rasbery PI is the "qibuild $ACTION -c "$TC_NAME" -j 4". With this statement, the build process could produce up to 4 processes at a time, and each process, at some point, consumes 100% CPU and 25% memory. After running for about 18 hours, the build terminsted with error "c++: internal compiler error: Killed (program cc1plus)". So using ""qibuild $ACTION -c "$TC_NAME" -j 2" works ( at least for me).
pi@raspberrypi:~/self $ dpkg -l "libopencv-objdetect*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii libopencv-objd 2.4.9.1+dfsg armhf development files for libopencv-o
un libopencv-objd
@nddao Thanks for posting. It is quite interesting for me because you are using old-ABI (-D_GLIBCXX_USE_CXX11_ABI=0) and opencv-objdump is v2.4.9.1, which is same as mine, and no linking error. In my case, the following like error occurs.
[ 70%] Linking CXX executable sdk/bin/self_instance
sdk/lib/libself.so: undefined reference to `cv::CascadeClassifier::load(std::string const&)'
collect2: error: ld returned 1 exit status
I think all issues were resolved. I also changed the number of compiler processes to two in script/build.sh for Raspi. The latest code is included in PR https://github.com/watson-intu/self/pull/39. Thanks for your help!
I Tried to build self on Raspberry PI 3, but it hangs at line [16%] Build CXX object lib/cpp-sdk/src/CMakeFiles/utils.dir/utils/Config.cpp.o
Raspberry is frozen and clock stops working, but still can ping its IP. Tried to reboot, tc_clean.sh, and build again, but it always stops at this line. #39
[ 16%] Built target sqlite [ 16%] Building CXX object lib/cpp-sdk/src/CMakeFiles/utils.dir/utils/Config.cpp.o c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. lib/cpp-sdk/src/CMakeFiles/utils.dir/build.make:86: recipe for target 'lib/cpp-sdk/src/CMakeFiles/utils.dir/services/Graph/Graph.cpp.o' failed make[2]: [lib/cpp-sdk/src/CMakeFiles/utils.dir/services/Graph/Graph.cpp.o] Error 4 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:550: recipe for target 'lib/cpp-sdk/src/CMakeFiles/utils.dir/all' failed make[1]: [lib/cpp-sdk/src/CMakeFiles/utils.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2 [ERROR]: BuildFailed Error occurred when building project self pi@raspberrypi:~/self $