CauldronDevelopmentLLC / CAMotics

Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
Other
602 stars 138 forks source link

Problem building CAMotics with dependencies for Flatpak #347

Closed tpimh closed 2 years ago

tpimh commented 2 years ago

I'm trying to build CAMotics 1.2.0 with C! 1.6.0 and embedded-v8.

I've run into multiple problems during the compilation:

  1. embedded-v8 compiles successfully, but I couldn't find a proper way to install it (there are no "install" targets in generated ninja files)
  2. C! is unable to locate V8, thus it's built without V8 support
  3. CAMotics build is not starting with the following error:
    SConsEnvironmentError: No module named config:
    File "/run/build/camotics/SConstruct", line 15:
    env.Tool('config', toolpath = [cbang])
    File "/app/lib/scons/SCons/Environment.py", line 1798:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
    File "/app/lib/scons/SCons/Tool/__init__.py", line 122:
    module = self._tool_module()
    File "/app/lib/scons/SCons/Tool/__init__.py", line 221:
    raise SCons.Errors.SConsEnvironmentError(error_string)

I'm using KDE SDK 5.15, additionally installing SCons 3.1.1 and Python Six 1.11.0.

jcoffland commented 2 years ago
  1. There's no need to install embedded-v8
  2. You have to set several environment variables for this to work correctly with C! See below.
  3. This error is caused by not having CBANG_HOME set correctly.

I've added a scripts/build to CAMotics which runs on Debian Linux. It installs all the required packages, builds embedded-v8 and C! and setups the environment variables. You can just clone CAMotics and run this script.

I also added a script embedded-v8/build.sh which scripts/build calls. It builds embedded-v8 and then moves the library so that C! has an easier time finding it.

I tested all of this on a fresh install of Debian bullseye as root like this:

apt-get update
apt-get install -y git sudo
git clone https://github.com/CauldronDevelopmentLLC/CAMotics
./CAMotics/scripts/build

If you're on an OS other than Debian Linux you can look at these scripts to see what you need to do. The main thing that's different for other OS is how you install the required packages.

tpimh commented 2 years ago

Thank you very much for publishing your build scripts, this helps a lot. I didn't find any references to V8_HOME in the C! source, so not sure where exactly this variable is being used. Are you sure that the script is using embedded_v8 headers and not system headers provided by libv8-dev package?

In order for C! config to find embedded-v8 I had to set V8_INCLUDE environment variable to $V8_HOME/include, then I got a huge number of errors (maybe this discussion should be moved to C! issues?):

In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘virtual bool cb::gv8::Value::toBoolean() const’:
src/cbang/js/v8/Value.h:87:75: error: no matching function for call to ‘v8::Value::BooleanValue()’
   87 |       bool toBoolean() const {assertDefined(); return value->BooleanValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3055:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 3055 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3055:8: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘virtual double cb::gv8::Value::toNumber() const’:
src/cbang/js/v8/Value.h:93:75: error: no matching function for call to ‘v8::Value::NumberValue()’
   93 |       double toNumber() const {assertDefined(); return value->NumberValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3058:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 3058 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
embedded-v8/include/v8.h:3058:39: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘virtual int cb::gv8::Value::toInteger() const’:
src/cbang/js/v8/Value.h:94:74: error: no matching function for call to ‘v8::Value::IntegerValue()’
   94 |       int toInteger() const {assertDefined(); return value->IntegerValue();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3060:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
 3060 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
      |                                        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3060:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘int32_t cb::gv8::Value::toInt32() const’:
src/cbang/js/v8/Value.h:100:74: error: no matching function for call to ‘v8::Value::Int32Value()’
  100 |       int32_t toInt32() const {assertDefined(); return value->Int32Value();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3066:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
 3066 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      |                                        ^~~~~~~~~~
embedded-v8/include/v8.h:3066:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘uint32_t cb::gv8::Value::toUint32() const’:
src/cbang/js/v8/Value.h:106:77: error: no matching function for call to ‘v8::Value::Uint32Value()’
  106 |       uint32_t toUint32() const {assertDefined(); return value->Uint32Value();}
      |                                                                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3063:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 3063 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
embedded-v8/include/v8.h:3063:41: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
src/cbang/js/v8/Value.h: In member function ‘int cb::gv8::Value::utf8Length() const’:
src/cbang/js/v8/Value.h:117:75: error: no matching function for call to ‘v8::String::Utf8Length()’
  117 |       int utf8Length() const {return v8::String::Cast(*value)->Utf8Length();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/Javascript.cpp:40:
embedded-v8/include/v8.h:3176:7: note: candidate: ‘int v8::String::Utf8Length(v8::Isolate*) const’
 3176 |   int Utf8Length(Isolate* isolate) const;
      |       ^~~~~~~~~~
embedded-v8/include/v8.h:3176:7: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual bool cb::gv8::Value::toBoolean() const’:
src/cbang/js/v8/Value.h:87:75: error: no matching function for call to ‘v8::Value::BooleanValue()’
   87 |       bool toBoolean() const {assertDefined(); return value->BooleanValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3055:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 3055 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3055:8: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual double cb::gv8::Value::toNumber() const’:
src/cbang/js/v8/Value.h:93:75: error: no matching function for call to ‘v8::Value::NumberValue()’
   93 |       double toNumber() const {assertDefined(); return value->NumberValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3058:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 3058 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
embedded-v8/include/v8.h:3058:39: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual int cb::gv8::Value::toInteger() const’:
src/cbang/js/v8/Value.h:94:74: error: no matching function for call to ‘v8::Value::IntegerValue()’
   94 |       int toInteger() const {assertDefined(); return value->IntegerValue();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3060:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
 3060 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
      |                                        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3060:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int32_t cb::gv8::Value::toInt32() const’:
src/cbang/js/v8/Value.h:100:74: error: no matching function for call to ‘v8::Value::Int32Value()’
  100 |       int32_t toInt32() const {assertDefined(); return value->Int32Value();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3066:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
 3066 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      |                                        ^~~~~~~~~~
embedded-v8/include/v8.h:3066:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘uint32_t cb::gv8::Value::toUint32() const’:
src/cbang/js/v8/Value.h:106:77: error: no matching function for call to ‘v8::Value::Uint32Value()’
  106 |       uint32_t toUint32() const {assertDefined(); return value->Uint32Value();}
      |                                                                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3063:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 3063 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
embedded-v8/include/v8.h:3063:41: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int cb::gv8::Value::utf8Length() const’:
src/cbang/js/v8/Value.h:117:75: error: no matching function for call to ‘v8::String::Utf8Length()’
  117 |       int utf8Length() const {return v8::String::Cast(*value)->Utf8Length();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Factory.h:35,
                 from src/cbang/js/v8/Factory.cpp:33:
embedded-v8/include/v8.h:3176:7: note: candidate: ‘int v8::String::Utf8Length(v8::Isolate*) const’
 3176 |   int Utf8Length(Isolate* isolate) const;
      |       ^~~~~~~~~~
embedded-v8/include/v8.h:3176:7: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual bool cb::gv8::Value::toBoolean() const’:
src/cbang/js/v8/Value.h:87:75: error: no matching function for call to ‘v8::Value::BooleanValue()’
   87 |       bool toBoolean() const {assertDefined(); return value->BooleanValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3055:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 3055 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3055:8: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual double cb::gv8::Value::toNumber() const’:
src/cbang/js/v8/Value.h:93:75: error: no matching function for call to ‘v8::Value::NumberValue()’
   93 |       double toNumber() const {assertDefined(); return value->NumberValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3058:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 3058 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
embedded-v8/include/v8.h:3058:39: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual int cb::gv8::Value::toInteger() const’:
src/cbang/js/v8/Value.h:94:74: error: no matching function for call to ‘v8::Value::IntegerValue()’
   94 |       int toInteger() const {assertDefined(); return value->IntegerValue();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3060:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
 3060 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
      |                                        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3060:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int32_t cb::gv8::Value::toInt32() const’:
src/cbang/js/v8/Value.h:100:74: error: no matching function for call to ‘v8::Value::Int32Value()’
  100 |       int32_t toInt32() const {assertDefined(); return value->Int32Value();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3066:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
 3066 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      |                                        ^~~~~~~~~~
embedded-v8/include/v8.h:3066:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘uint32_t cb::gv8::Value::toUint32() const’:
src/cbang/js/v8/Value.h:106:77: error: no matching function for call to ‘v8::Value::Uint32Value()’
  106 |       uint32_t toUint32() const {assertDefined(); return value->Uint32Value();}
      |                                                                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3063:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 3063 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
embedded-v8/include/v8.h:3063:41: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int cb::gv8::Value::utf8Length() const’:
src/cbang/js/v8/Value.h:117:75: error: no matching function for call to ‘v8::String::Utf8Length()’
  117 |       int utf8Length() const {return v8::String::Cast(*value)->Utf8Length();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:3176:7: note: candidate: ‘int v8::String::Utf8Length(v8::Isolate*) const’
 3176 |   int Utf8Length(Isolate* isolate) const;
      |       ^~~~~~~~~~
embedded-v8/include/v8.h:3176:7: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Context.cpp: In member function ‘cb::gv8::Value cb::gv8::Context::eval(const cb::InputSource&)’:
src/cbang/js/v8/Context.cpp:59:54: error: conversion from ‘v8::MaybeLocal<v8::Script>’ to non-scalar type ‘v8::Handle<v8::Script>’ {aka ‘v8::Local<v8::Script>’} requested
   59 |   v8::Handle<v8::Script> script = v8::Script::Compile(source, origin);
      |                                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
src/cbang/js/v8/Context.cpp:63:43: error: no matching function for call to ‘v8::Script::Run()’
   63 |   v8::Handle<v8::Value> ret = script->Run();
      |                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:1781:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Script::Run(v8::Local<v8::Context>)’
 1781 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Run(Local<Context> context);
      |                                           ^~~
embedded-v8/include/v8.h:1781:43: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Context.cpp: In static member function ‘static void cb::gv8::Context::translateException(const v8::TryCatch&, bool)’:
src/cbang/js/v8/Context.cpp:74:40: error: no matching function for call to ‘v8::TryCatch::StackTrace() const’
   74 |   if (useStack && !tryCatch.StackTrace().IsEmpty())
      |                                        ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:10328:50: note: candidate: ‘static v8::MaybeLocal<v8::Value> v8::TryCatch::StackTrace(v8::Local<v8::Context>, v8::Local<v8::Value>)’
10328 |   V8_WARN_UNUSED_RESULT static MaybeLocal<Value> StackTrace(
      |                                                  ^~~~~~~~~~
embedded-v8/include/v8.h:10328:50: note:   candidate expects 2 arguments, 0 provided
embedded-v8/include/v8.h:10336:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::TryCatch::StackTrace(v8::Local<v8::Context>) const’
10336 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> StackTrace(
      |                                           ^~~~~~~~~~
embedded-v8/include/v8.h:10336:43: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Context.cpp:75:47: error: no matching function for call to ‘v8::TryCatch::StackTrace() const’
   75 |     throw Exception(Value(tryCatch.StackTrace()).toString());
      |                                               ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:10328:50: note: candidate: ‘static v8::MaybeLocal<v8::Value> v8::TryCatch::StackTrace(v8::Local<v8::Context>, v8::Local<v8::Value>)’
10328 |   V8_WARN_UNUSED_RESULT static MaybeLocal<Value> StackTrace(
      |                                                  ^~~~~~~~~~
embedded-v8/include/v8.h:10328:50: note:   candidate expects 2 arguments, 0 provided
embedded-v8/include/v8.h:10336:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::TryCatch::StackTrace(v8::Local<v8::Context>) const’
10336 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> StackTrace(
      |                                           ^~~~~~~~~~
embedded-v8/include/v8.h:10336:43: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Context.cpp:85:37: error: no matching function for call to ‘v8::Message::GetLineNumber()’
   85 |   int line = message->GetLineNumber();
      |                                     ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Context.h:35,
                 from src/cbang/js/v8/Context.cpp:33:
embedded-v8/include/v8.h:2189:36: note: candidate: ‘v8::Maybe<int> v8::Message::GetLineNumber(v8::Local<v8::Context>) const’
 2189 |   V8_WARN_UNUSED_RESULT Maybe<int> GetLineNumber(Local<Context> context) const;
      |                                    ^~~~~~~~~~~~~
embedded-v8/include/v8.h:2189:36: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual bool cb::gv8::Value::toBoolean() const’:
src/cbang/js/v8/Value.h:87:75: error: no matching function for call to ‘v8::Value::BooleanValue()’
   87 |       bool toBoolean() const {assertDefined(); return value->BooleanValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3055:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 3055 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3055:8: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual double cb::gv8::Value::toNumber() const’:
src/cbang/js/v8/Value.h:93:75: error: no matching function for call to ‘v8::Value::NumberValue()’
   93 |       double toNumber() const {assertDefined(); return value->NumberValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3058:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 3058 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
embedded-v8/include/v8.h:3058:39: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual int cb::gv8::Value::toInteger() const’:
src/cbang/js/v8/Value.h:94:74: error: no matching function for call to ‘v8::Value::IntegerValue()’
   94 |       int toInteger() const {assertDefined(); return value->IntegerValue();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3060:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
 3060 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
      |                                        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3060:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int32_t cb::gv8::Value::toInt32() const’:
src/cbang/js/v8/Value.h:100:74: error: no matching function for call to ‘v8::Value::Int32Value()’
  100 |       int32_t toInt32() const {assertDefined(); return value->Int32Value();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3066:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
 3066 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      |                                        ^~~~~~~~~~
embedded-v8/include/v8.h:3066:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘uint32_t cb::gv8::Value::toUint32() const’:
src/cbang/js/v8/Value.h:106:77: error: no matching function for call to ‘v8::Value::Uint32Value()’
  106 |       uint32_t toUint32() const {assertDefined(); return value->Uint32Value();}
      |                                                                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3063:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 3063 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
embedded-v8/include/v8.h:3063:41: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int cb::gv8::Value::utf8Length() const’:
src/cbang/js/v8/Value.h:117:75: error: no matching function for call to ‘v8::String::Utf8Length()’
  117 |       int utf8Length() const {return v8::String::Cast(*value)->Utf8Length();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/ValueRef.h:35,
                 from src/cbang/js/v8/JSImpl.h:35,
                 from src/cbang/js/v8/JSImpl.cpp:33:
embedded-v8/include/v8.h:3176:7: note: candidate: ‘int v8::String::Utf8Length(v8::Isolate*) const’
 3176 |   int Utf8Length(Isolate* isolate) const;
      |       ^~~~~~~~~~
embedded-v8/include/v8.h:3176:7: note:   candidate expects 1 argument, 0 provided
embedded-v8/include/v8.h: In instantiation of ‘v8::Local<T>::Local(v8::Local<S>) [with S = v8::String; T = v8::Context]’:
src/cbang/js/v8/Context.cpp:59:69:   required from here
embedded-v8/include/v8.h:211:42: error: static assertion failed: type check
  211 |     static_assert(std::is_base_of<T, S>::value, "type check");
      |                                          ^~~~~
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual bool cb::gv8::Value::toBoolean() const’:
src/cbang/js/v8/Value.h:87:75: error: no matching function for call to ‘v8::Value::BooleanValue()’
   87 |       bool toBoolean() const {assertDefined(); return value->BooleanValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3055:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
 3055 |   bool BooleanValue(Isolate* isolate) const;
      |        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3055:8: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual double cb::gv8::Value::toNumber() const’:
src/cbang/js/v8/Value.h:93:75: error: no matching function for call to ‘v8::Value::NumberValue()’
   93 |       double toNumber() const {assertDefined(); return value->NumberValue();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3058:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
 3058 |   V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
      |                                       ^~~~~~~~~~~
embedded-v8/include/v8.h:3058:39: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘virtual int cb::gv8::Value::toInteger() const’:
src/cbang/js/v8/Value.h:94:74: error: no matching function for call to ‘v8::Value::IntegerValue()’
   94 |       int toInteger() const {assertDefined(); return value->IntegerValue();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3060:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
 3060 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
      |                                        ^~~~~~~~~~~~
embedded-v8/include/v8.h:3060:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int32_t cb::gv8::Value::toInt32() const’:
src/cbang/js/v8/Value.h:100:74: error: no matching function for call to ‘v8::Value::Int32Value()’
  100 |       int32_t toInt32() const {assertDefined(); return value->Int32Value();}
      |                                                                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3066:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
 3066 |   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      |                                        ^~~~~~~~~~
embedded-v8/include/v8.h:3066:40: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘uint32_t cb::gv8::Value::toUint32() const’:
src/cbang/js/v8/Value.h:106:77: error: no matching function for call to ‘v8::Value::Uint32Value()’
  106 |       uint32_t toUint32() const {assertDefined(); return value->Uint32Value();}
      |                                                                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3063:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
 3063 |   V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
      |                                         ^~~~~~~~~~~
embedded-v8/include/v8.h:3063:41: note:   candidate expects 1 argument, 0 provided
In file included from src/cbang/js/v8/Value.cpp:33:
src/cbang/js/v8/Value.h: In member function ‘int cb::gv8::Value::utf8Length() const’:
src/cbang/js/v8/Value.h:117:75: error: no matching function for call to ‘v8::String::Utf8Length()’
  117 |       int utf8Length() const {return v8::String::Cast(*value)->Utf8Length();}
      |                                                                           ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3176:7: note: candidate: ‘int v8::String::Utf8Length(v8::Isolate*) const’
 3176 |   int Utf8Length(Isolate* isolate) const;
      |       ^~~~~~~~~~
embedded-v8/include/v8.h:3176:7: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In constructor ‘cb::gv8::Value::Value(const cb::js::Function&)’:
src/cbang/js/v8/Value.cpp:87:29: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
   87 |   value = tmpl->GetFunction();
      |                             ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:6679:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
 6679 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      |                                              ^~~~~~~~~~~
embedded-v8/include/v8.h:6679:46: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual std::string cb::gv8::Value::toString() const’:
src/cbang/js/v8/Value.cpp:144:32: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Handle<v8::Value>&)’
  144 |   v8::String::Utf8Value s(value);
      |                                ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3486:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
 3486 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      |     ^~~~~~~~~
embedded-v8/include/v8.h:3486:5: note:   candidate expects 2 arguments, 1 provided
src/cbang/js/v8/Value.cpp: In member function ‘bool cb::gv8::Value::has(uint32_t) const’:
src/cbang/js/v8/Value.cpp:150:26: error: no matching function for call to ‘v8::Value::ToObject()’
  150 |   return value->ToObject()->Has(getCtx(), index).ToChecked();
      |                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual bool cb::gv8::Value::has(const string&) const’:
src/cbang/js/v8/Value.cpp:155:26: error: no matching function for call to ‘v8::Value::ToObject()’
  155 |   return value->ToObject()->Has(getCtx(), createString(key)).ToChecked();
      |                          ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual cb::SmartPointer<cb::js::Value> cb::gv8::Value::get(int) const’:
src/cbang/js/v8/Value.cpp:160:36: error: no matching function for call to ‘v8::Value::ToObject()’
  160 |   return new Value(value->ToObject()->Get(getCtx(), index));
      |                                    ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual cb::SmartPointer<cb::js::Value> cb::gv8::Value::get(const string&) const’:
src/cbang/js/v8/Value.cpp:165:36: error: no matching function for call to ‘v8::Value::ToObject()’
  165 |   return new Value(value->ToObject()->Get(getCtx(), createString(key)));
      |                                    ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual cb::SmartPointer<cb::js::Value> cb::gv8::Value::getOwnPropertyNames() const’:
src/cbang/js/v8/Value.cpp:170:36: error: no matching function for call to ‘v8::Value::ToObject()’
  170 |   return new Value(value->ToObject()->GetOwnPropertyNames(getCtx()));
      |                                    ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual void cb::gv8::Value::set(int, const cb::js::Value&)’:
src/cbang/js/v8/Value.cpp:175:47: error: no matching function for call to ‘v8::Value::ToObject()’
  175 |   v8::Maybe<bool> ret = this->value->ToObject()->
      |                                               ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘virtual void cb::gv8::Value::set(const string&, const cb::js::Value&)’:
src/cbang/js/v8/Value.cpp:183:47: error: no matching function for call to ‘v8::Value::ToObject()’
  183 |   v8::Maybe<bool> ret = this->value->ToObject()->
      |                                               ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/Value.cpp: In member function ‘cb::gv8::Value cb::gv8::Value::call(cb::gv8::Value, const std::vector<cb::gv8::Value>&) const’:
src/cbang/js/v8/Value.cpp:208:38: error: no matching function for call to ‘v8::Value::ToObject()’
  208 |     Call(arg0.getV8Value()->ToObject(), args.size(), argv.get());
      |                                      ^
In file included from src/cbang/js/v8/V8.h:43,
                 from src/cbang/js/v8/Value.h:35,
                 from src/cbang/js/v8/Value.cpp:33:
embedded-v8/include/v8.h:3019:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 3019 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
embedded-v8/include/v8.h:3019:44: note:   candidate expects 1 argument, 0 provided
src/cbang/js/v8/JSImpl.cpp: In static member function ‘static void cb::gv8::JSImpl::init(int*, char**)’:
src/cbang/js/v8/JSImpl.cpp:74:44: error: ‘CreateDefaultPlatform’ is not a member of ‘v8::platform’; did you mean ‘NewDefaultPlatform’?
   74 |   v8::V8::InitializePlatform(v8::platform::CreateDefaultPlatform());
      |                                            ^~~~~~~~~~~~~~~~~~~~~
      |                                            NewDefaultPlatform
jcoffland commented 2 years ago

You need to pull the latest version of C! yours is outdated. V8_HOME is accessed through this code: https://github.com/CauldronDevelopmentLLC/cbang/blob/master/config/__init__.py#L46

Also setting V8_HOME is the same as setting V8_INCLUDE=$V8_HOME/include and V8_LIBPATH=$V8_HOME/lib. Those are the default paths.

I recommend uninstalling libv8-dev if you're using embedded-v8.

tpimh commented 2 years ago

@jcoffland Thank you very much!

Using C! source from the master branch instead of the latest release resolved the compilation problem (time for a new release, maybe?), however SConsEnvironmentError: No module named config problem still persists. Do you have any suggestions what my install may be lacking?

tpimh commented 2 years ago

The problem was actually caused by C! source being removed from it original path. After restoring the source, the new error now looks like this (using SCons 4.2.0):

scons: Reading SConscript files ...
AttributeError: module 'SCons.Warnings' has no attribute 'Warning':
  File "/run/build/camotics/SConstruct", line 37:
    env.Tool('qt5', toolpath = ['./config'])
  File "/app/lib/python3.8/site-packages/SCons-4.2.0-py3.8.egg/SCons/Environment.py", line 1878:
    tool = SCons.Tool.Tool(tool, toolpath, **kwargs)
  File "/app/lib/python3.8/site-packages/SCons-4.2.0-py3.8.egg/SCons/Tool/__init__.py", line 120:
    module = self._tool_module()
  File "/app/lib/python3.8/site-packages/SCons-4.2.0-py3.8.egg/SCons/Tool/__init__.py", line 209:
    module = spec.loader.load_module(spec.name)
  File "<frozen importlib._bootstrap_external>", line 462:

  File "<frozen importlib._bootstrap_external>", line 962:

  File "<frozen importlib._bootstrap_external>", line 787:

  File "<frozen importlib._bootstrap>", line 265:

  File "<frozen importlib._bootstrap>", line 702:

  File "<frozen importlib._bootstrap>", line 671:

  File "<frozen importlib._bootstrap_external>", line 783:

  File "<frozen importlib._bootstrap>", line 219:

  File "/run/build/camotics/config/qt5/__init__.py", line 45:
    class ToolQt5Warning(SCons.Warnings.Warning): pass
jcoffland commented 2 years ago

Right, when ever you see SConsEnvironmentError: No module named config it most likely means CBANG_HOME is not set correctly.

The SCons.Warnings.Warning issue has already been fixed in the latest CAMotics. It is caused by a change in SCons.

tpimh commented 2 years ago

Thank you very much for your assistance! After downgrading SCons I still faced the issues described in #270, but using the master branch everything went smoothly. The build succeeded!

Do you remember what version of SCons did you use in order to build CAMotics 1.2.0?

I have published my Flatpak manifest here (related to #273). It's not finished yet, there are still a lot of improvements to be done. I will try to submit it to the Flathub repository, but probably only after C! 1.6.1 or 1.7.0 release that wouldn't require patching to be used with embedded-v8.

jcoffland commented 2 years ago

I'm using scons v4.0.1. I tagged CAMotics v1.2.2-rc1 and C! 1.6.1.