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
512 stars 152 forks source link

Failed to build master. #58

Closed astlin closed 7 years ago

astlin commented 7 years ago

I'm trying to build macchina from current master:

git clone https://github.com/macchina-io/macchina.io.git
cd macchina.io
git checkout master
make -s -j8 DEFAULT_TARGET=shared_release

And something goes wrong:

Building V8 for arch x64 with flags: library=shared i18nsupport=off werror=no snapshot=on 
  ACTION tools_gyp_v8_gyp_v8_snapshot_target_run_mksnapshot /home/astlin/soft/Poco/macchina.io/platform/JS/V8/v8-3.28.4/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc
Segmentation fault (core dumped)
tools/gyp/v8_snapshot.target.x64.release.mk:13: recipe for target '/home/astlin/soft/Poco/macchina.io/platform/JS/V8/v8-3.28.4/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc' failed
make[4]: *** [/home/astlin/soft/Poco/macchina.io/platform/JS/V8/v8-3.28.4/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139
Makefile:280: recipe for target 'x64.release' failed
make[3]: *** [x64.release] Error 2
cp: cannot stat 'v8-3.28.4/out/x64.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
Makefile:80: recipe for target 'clean' failed
make: *** [clean] Error 2

My system:

root@astlin:~/soft/Poco/macchina.io# lsb_release -a
LSB Version:    core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty
obiltschnig commented 7 years ago

There seems to be an issue with the Ubuntu 17.04 toolchain. As a workaround, try disabling V8 snapshots by passing V8_NOSNAPSHOT=1 to make:

make -s -j8 DEFAULT_TARGET=shared_release V8_NOSNAPSHOT=1
astlin commented 7 years ago

Thank you, that worked. I also tried to build feature-v8-5.2 branch for something less outdated:

make -s -j8 DEFAULT_TARGET=shared_release V8_NOSNAPSHOT=1

with no success, seems there are no rules to build v8 platform because I got:

** Compiling src/ClientHelperGenerator.cpp (release, shared)
Makefile:440: recipe for target 'out/Makefile.x64.release' failed
make[3]: *** [out/Makefile.x64.release] Error 1
** Compiling src/ProxyGenerator.cpp (release, shared)
** Compiling src/Bundle.cpp (release, shared)
** Building shared library (release) /home/astlin/soft/Poco/macchina.io-feature-v8-5.2/platform/lib/Linux/x86_64/libPocoJSCore.so.1
/usr/bin/ld: cannot find -lv8
/usr/bin/ld: cannot find -lv8_libplatform
/usr/bin/ld: cannot find -lv8_libbase
collect2: error: ld returned 1 exit status
/home/astlin/soft/Poco/macchina.io-feature-v8-5.2/platform/build/rules/lib:81: recipe for target '/home/astlin/soft/Poco/macchina.io-feature-v8-5.2/platform/lib/Linux/x86_64/libPocoJSCore.so.1' failed
make[2]: *** [/home/astlin/soft/Poco/macchina.io-feature-v8-5.2/platform/lib/Linux/x86_64/libPocoJSCore.so.1] Error 1
Makefile:277: recipe for target 'JS/Core-libexec' failed
make[1]: *** [JS/Core-libexec] Error 2
obiltschnig commented 7 years ago

Yes, Google has complete changed the V8 build process. We plan to use the node.js build system to build libv8.