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

Build error #30

Closed palade closed 8 years ago

palade commented 8 years ago

I tried to build macchina.io by following the guidelines from http://macchina.io/docs/00150-MacchinaGettingStarted.html on a Linux Mint v17.1 and v17.3. However, every time I get the following error during build. Is there something I do wrong?

The steps to reproduce this are:

  1. clone the repo
  2. run sudo make -s -j8 (as described in the tutorial)

CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/cctest/test/cctest/test-cpu-x64.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/cctest/test/cctest/test-disasm-x64.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/cctest/test/cctest/test-macro-assembler-x64.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/cctest/test/cctest/test-log-stack-tracer.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/cctest/test/cctest/test-platform-linux.o SOLINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/tools/gyp/libv8.so LINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/cctest COPY /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/lib.target/libv8.so CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/shell/samples/shell.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/process/samples/process.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/lineprocessor/samples/lineprocessor.o CXX(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/d8/src/d8.o LINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/shell LINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/lineprocessor LINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/d8 LINK(target) /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/process TOUCH /home/andrei/environment/macchina.io/platform/JS/V8/v8-3.25.28.18/out/x64.debug/obj.target/build/All.stamp make: *\ [clean] Error 2

obiltschnig commented 8 years ago

No need to run make with sudo. Try to run make without -j8 to see where the build really fails.

palade commented 8 years ago

I build it again with/without sudo and without -j8. This fixed it: sudo apt-get install libssl-dev However, I believe it needs sudo when installed. Have a look below.

Here is the output with sudo:

* Compiling src/Cipher.cpp (release, shared) * Compiling src/CipherFactory.cpp (release, shared) In file included from include/Poco/Crypto/CipherKeyImpl.h:24:0, from include/Poco/Crypto/CipherKey.h:24, from src/CipherFactory.cpp:19: include/Poco/Crypto/OpenSSLInitializer.h:26:28: fatal error: openssl/crypto.h: No such file or directory

include <openssl/crypto.h>

Here is without sudo

\ Building shared library (release) /home/andrei/environment/macchina.io/platform/lib/Linux/x86_64/libPocoFoundation.so.30 mkdir: cannot create directory ‘/home/andrei/environment/macchina.io/platform/XML/obj/Linux/x86_64’: Permission denied make[2]: * [/home/andrei/environment/macchina.io/platform/XML/obj/Linux/x86_64/release_static] Error 1 make[1]: * [XML-libexec] Error 2 make: *\ [clean] Error 2

obiltschnig commented 8 years ago

If you've built it once with sudo, then the owner of the directories created while building will be root. Which explains the permission denied in subsequent non-sudo builds.

kenjiWuJian commented 6 years ago

Thank you palade and obiltschnig, I have the same issue and solved by install libssl-dev