v8dotnet icon indicating copy to clipboard operation
v8dotnet copied to clipboard

Attempting a Linux Build...

Open tombatron opened this issue 4 years ago • 2 comments

So I'm seriously out of my depth here, but I figured I'd take take a stab at getting the V8 proxy to compile under Linux (WSL 2 - Ubuntu to be exact).

The approach I'm taking is more or less to try and port the vcxproj to a CMakeLists.txt.

I'm able to get the build kicked off but it fails with...

/mnt/c/Projects/v8dotnet/Source/V8.NET-Proxy/ContextProxy.cpp:22:69: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
                        auto globalObject = _Context->Global()->GetPrototype()->ToObject(_EngineProxy->Isolate());
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~
/home/tom/v8/v8/include/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for
      1st argument
class Local {
      ^
/home/tom/v8/v8/include/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st
      argument
/home/tom/v8/v8/include/v8.h:193:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
            ^
/home/tom/v8/v8/include/v8.h:2775:22: note: passing argument to parameter 'context' here
      Local<Context> context) const;

I'm not exactly sure what I'm looking at here, any ideas?

tombatron avatar Nov 25 '19 18:11 tombatron

Here is my hacky CMakeList.txt: https://gist.github.com/tombatron/4c5b120cc60d0ba52d0a817b131b7094

tombatron avatar Nov 25 '19 18:11 tombatron

Hi, not sure why I didn't get an email about your post. It seems Github sends out notices when it feels like it half the time. :/ I've been head-deep into a big project at my job and was preoccupied for a few months (but now the software is live and I can breath a bit! ;)).

One of these days I will have to try this also. That is failing on a conversion from a pointer to an isolate object, to a local stack value of type Local<Context>. That seems very bizarre given the code above. I'd have to see more, or try it myself. It could be the source you're building from is too old, or too new. ;)

Hopefully in the near future I can give WSL a try for compiling this: https://docs.microsoft.com/en-us/windows/wsl/about

rjamesnw avatar Mar 10 '20 22:03 rjamesnw