macchina-io / macchina.io

macchina.io EDGE is a powerful C++ and JavaScript SDK for edge devices, multi-service IoT gateways and connected embedded systems.
https://macchina.io
GNU General Public License v3.0
516 stars 154 forks source link

compliedirectly issue on raspberry 3 #77

Closed KieranYu closed 6 years ago

KieranYu commented 6 years ago

I have met a complle issue on raspberry 3, showing as follow: the same with upper, can this issue fixed yet ? looking forward to get help

=================================================== root@raspberrypi:/home/kieran/macchina/macchina.io# make -s -j8 DEFAULT_TARGET= shared_release Building V8 for arch arm with flags: library=shared i18nsupport=off werror=no sn apshot=on arm_version=7 ACTION tools_gyp_v8_gyp_v8_snapshot_target_run_mksnapshot /home/kieran/macchin a/macchina.io/platform/JS/V8/v8-3.28.4/out/arm.release/obj.target/v8_snapshot/ge ni/snapshot.cc Compiling src/SQLiteBundleActivator.cpp (release, shared) Segmentation fault tools/gyp/v8_snapshot.target.arm.release.mk:13: recipe for target '/home/kieran/ macchina/macchina.io/platform/JS/V8/v8-3.28.4/out/arm.release/obj.target/v8_snap shot/geni/snapshot.cc' failed make[4]: ** [/home/kieran/macchina/macchina.io/platform/JS/V8/v8-3.28.4/out/arm .release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139 Makefile:280: recipe for target 'arm.release' failed make[3]: [arm.release] Error 2 cp: cannot stat 'v8-3.28.4/out/arm.release/lib.target/libv8.so': No such file or directory Makefile:102: recipe for target 'v8install' failed make[2]: [v8install] Error 1 Makefile:271: recipe for target 'JS/V8-libexec' failed make[1]: [JS/V8-libexec] Error 2 make[1]: * Waiting for unfinished jobs.... * Building dynamic library (release, shared) /home/kieran/macchina/macchina.io/platform/OSP/Data/SQLite/bin/Linux/armv7l/poco.data.sqlite.so Makefile:78: recipe for target 'clean' failed make: [clean] Error 2 root@raspberrypi:/home/kieran/macchina/macchina.io#

obiltschnig commented 6 years ago

You’re running out of memory.

Building with 8 parallel build processes (make -j8) on a Raspberry Pi is a bit too much. I’d go with -j2 at most.

KieranYu commented 6 years ago

i 'm suspecious of this, and i create a swapfile with 4G, still not enough ? so how many memory need for 8 parallel running ?

and another thing, if as you said, during complie, i used the command top and free -m, both shows there'are at least 30% memory free.

KieranYu commented 6 years ago

this thing happened again, even if i used j2, and during the complie, i keep my eye on checking "top" and "free -m", the memory is enough.

j1 has the same issue. after i tried

KieranYu commented 6 years ago

it's the snapshot should not be included in the complie, used as following command:( to skip sapshot) $ make -s -j2 V8_NOSNAPSHOT=1 DEFAULT_TARGET=shared_release

now it can complie all, but when i run the server, it shows up: can not find the xx.so, and also after complie it doesn't generate the codeCache folder, i manaul create the codeCache folder, and copy the lib from xx/macchina.io/lib/Linux/armv7l/.so and xx/macchina.io/platform/lib/Linux/armv7l/.so to codeCache foler, then it runs ok now

by the way, issued offered with title Building for Raspberry Pi 2 (armv7) on Ubuntu 17.04 fails #55 can also be helpful.

thanks for the help from the developers