Re: [v8-users] Re: is_component_build=true, use_custom_libcxx=false on Windows

2024-01-29 Thread Ben Ernst
Chris I myself gave up on DLL version many years ago after many further years of significant pain. The DLL configuration is consistently broken. The team is very responsive, and problems are fixed quickly, but something else quickly breaks soon after. I migrated to the "monolith" build, and I

[v8-users] Re: [8.7] Compile errors with Visual Studio 2019

2021-02-01 Thread Ben Ernst
Unfortunately the DLL build under MSVC++ breaks constantly and requires smarter people than me to fix it. If you can rearchitect your app to permit static linking to V8, you'll have a much better experience. Ben. On Wednesday, 27 January 2021 at 19:17:20 UTC+10:30 quinte...@gmail.com wrote: >

Re: [v8-users] How to retrieve a class defined in a module?

2020-11-27 Thread Ben Ernst
essor "get >> numberOfLamingtons()"? >> Many thanks in advance, >> Ben >> >> >> export class DemonstrationClass { >> constructor(lamingtons) { >> this.lamingtons = lamingtons >> } >> get numberOfLamingtons() { >> return this.laming

Re: [v8-users] How to retrieve a class defined in a module?

2020-11-27 Thread Ben Ernst
s DemonstrationClass { constructor(lamingtons) { this.lamingtons = lamingtons } get numberOfLamingtons() { return this.lamingtons } lamingtonsIsUndefined(){ return this.lamingtons === undefined } } On Sunday, 22 November 2020 at 22:14:55 UTC+10:30 Ben Ernst wrote: > Thanks for the advice, th

Re: [v8-users] How to retrieve a class defined in a module?

2020-11-22 Thread Ben Ernst
. Thanks again, Ben On Tuesday, 17 November 2020 at 21:21:25 UTC+10:30 Ben Ernst wrote: > Thank you for the advice Camillo, the test you referred me to is very > helpful. I will prepare a good code sample and come back to this > conversation. > > Regards, > Ben > > > O

Re: [v8-users] How to retrieve a class defined in a module?

2020-11-17 Thread Ben Ernst
t-api.cc> > . > > Could you provide some more example code for the error you get > with persistent handles? > > cheers, > Camillo > > On Tue, 17 Nov 2020 at 01:11, Ben Ernst wrote: > >> I am migrating my V8 code from using "plain scripts" to using

[v8-users] Re: Link failed with error " undefined reference to 'std::__1::__.... "

2020-11-16 Thread Ben Ernst
This may not be very helpful, I work on Windows, but you may find that if you "use_custom_libcxx = false", you also have to "use_clang=false". This seems to be the case on Windows. Ben On Sunday, 15 November 2020 at 02:17:34 UTC+10:30 tie.s...@gmail.com wrote: > Version: <8.0> > OS: >

[v8-users] How to retrieve a class defined in a module?

2020-11-16 Thread Ben Ernst
I am migrating my V8 code from using "plain scripts" to using "ES6 Modules". There are a few concepts that I am struggling with. First, how might I retrieve a class definition defined in a module? Previously I would have used the "global" object on the "context" (i.e. context->Global()), and

Re: [v8-users] v8::ScriptOrigin line/column offset

2020-11-12 Thread Ben Ernst
Yes that's right, when a debugger or an error message says you're on line X and column Y, it deducts the values you specify in the offsets. So if you transform user's code in some form, the error messages can be adjusted to still have the right line numbers and column numbers. On Fri, 13 Nov

Re: [v8-users] Re: Upgrading v8 from 7.4 to 8.5

2020-11-02 Thread Ben Ernst
Vinayaka, the answer is here in your console output. # Fatal error in HandleScope::HandleScope # Entering the V8 API without proper locking in place # You want to use v8::Locker consistently, pretty much wherever you have a HandleScope you need to instantiate a v8::Locker immediately before.

Re: [v8-users] Enable pointer compression V8 8.6

2020-10-24 Thread Ben Ernst
your compile flags. > > > > > On Sat, Oct 24, 2020, 7:06 PM Ben Ernst wrote: > >> Hey all, thank you in advance for any advice here. How does one enable >> pointer compression? I'm updating from v7.1 to v8.6, and I get this error >> message (below) at runtime. It is probab

[v8-users] Enable pointer compression V8 8.6

2020-10-24 Thread Ben Ernst
Hey all, thank you in advance for any advice here. How does one enable pointer compression? I'm updating from v7.1 to v8.6, and I get this error message (below) at runtime. It is probably something minor I overlooked in the code samples. # # Fatal error in ../../src/api/api.cc, line 5696 #

Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-23 Thread Ben Ernst
I work with embedded V8, not with node, so some of that is french to me :) I tried storing FunctionTemplate in a Value and encountered the same error. If you're keeping the persistent handles in a global collection in any case, you might consider taking a raw pointer to the Persistent, and

[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-10-22 Thread Ben Ernst
Thanks, that'll be helpful. On Friday, 23 October 2020 at 06:46:47 UTC+10:30 Rodrigo Hernandez wrote: > I almost forgot, I created this repo for my own sanity: > > https://github.com/AeonGames/v8-builder > > it has bash scripts to make generating patches for new versions easier... > or at least

Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-21 Thread Ben Ernst
Rodrigo, you should be able to trivially cast a v8::Function or v8::Object to v8::Value is that what you're trying to do? In that case you don't need to put them in a v8::External. You can pass those objects to data->SetInternalField safely I would think. Ben On Tuesday, 20 October 2020 at

[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-10-21 Thread Ben Ernst
What version of V8 did this change go into? I built 8.6 yesterday, but still get the below error at linking, I thought I might try going back to whatever version you successfully used. 1>platform.obj : error LNK2019: unresolved external symbol "class std::unique_ptr > __cdecl

Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-16 Thread Ben Ernst
Rodrigo, what's your project? I tried and failed to fix this build, I'd happily throw a few hundred dollars in gratitude at anyone able to get it working stably. I wonder if there might be other users out there in the same boat. Ben On Fri, 17 Jul 2020 at 03:40, Rodrigo Hernandez <

Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-13 Thread Ben Ernst
Rodrigo, you might have more luck with the latest 8.1 tag (rather than 8.3), I recall that 8.1 is building OK with MSVC. If you're writing a vcpkg port, settling for a clang build might not be ideal, since MSVC programs won't be able to reliably link to it. Ben On Mon, 13 Jul 2020, 2:17 am

Re: [v8-users] Re: Building v8 shared library on windows

2020-01-13 Thread Ben Ernst
Following with interest. Ben On Sat, 11 Jan 2020 at 19:26, Bill Ticehurst wrote: > Being that this wouldn't be a "high priority" issue, the chance of getting > it back-ported to older shipped branches is probably low. Sorry for those > of you stuck on older builds. (Good news is, with v8

Re: [v8-users] Re: Building v8 shared library on windows

2019-12-22 Thread Ben Ernst
Bill, Just wanted to say your work is appreciated. Anything interested parties can do to help keep msvc builds working? Willing to learn new skills to contribute, but could use pointing in a good direction. Ben On Sun, 22 Dec. 2019, 9:49 am Bill Ticehurst, wrote: > I spent a little more time on

Re: [v8-users] Re: Building v8 shared library on windows

2019-12-18 Thread Ben Ernst
Thank you for sharing that workaround Ivan, I believe I'm hitting the same problem, and your workaround might help me. On Thursday, 19 December 2019 05:28:41 UTC+10:30, Ivan Pizhenko wrote: > > That’s clear, the instruction under the link suggests to build V8 as > static library, which we

[v8-users] Does profiling not work for "component build"?

2019-11-20 Thread Ben Ernst
The documentation on profiling states "Make sure d8 used for analysis was not built with is_component_build!" Why? Is profiling unsupported in the component build? I'm using V8 7.1 component build on Ubuntu. Thanks in advance, Ben -- -- v8-users mailing list

[v8-users] Re: Alternate for GetCallingContext

2019-11-19 Thread Ben Ernst
Madan, I'm using GetCurrentContext() for where I have an isolate but I need a context. Have a look at the comments . Does that do what you need? Ben On Monday, 18 November 2019 22:28:09 UTC+8, madana gopal wrote: > > Hi, > > We have

Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-15 Thread Ben Ernst
gt; changes and resync. > > On Fri, 15 Nov 2019 at 13:56, Ben Ernst > > wrote: > >> Dan, >> My build on "master" (8.0) failed, but probably for reasons unrelated to >> your changes. >> I did my best to merge your changes to 7.9, I think I merged

Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-14 Thread Ben Ernst
tils/utils.h > @@ -12,7 +12,6 @@ > #include > #include > > -#include "include/v8.h" > #include "src/base/bits.h" > #include "src/base/compiler-specific.h" > #include "src/base/logging.h" > > Please try that and see if it

Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-13 Thread Ben Ernst
ic: __cdecl v8::EscapableHandleScope::~EscapableHandleScope(void)" (??1EscapableHandleScope@v8@@QEAA@XZ) What could I be doing wrong? Any suggestions appreciated. On Wednesday, 6 November 2019 21:30:10 UTC+10:30, Ben Ernst wrote: > > Thanks Hans, I'm sure I tried that before, but I'll give

Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-06 Thread Ben Ernst
" to be able to link it with my > own program. > > > Am Sonntag, 3. November 2019 12:43:57 UTC+1 schrieb Ben Ernst: >> >> Of note, the sample utilities "d8" and "v8_hello_world" build fine, and >> they don't get this same linker error. I can't s

Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-03 Thread Ben Ernst
Of note, the sample utilities "d8" and "v8_hello_world" build fine, and they don't get this same linker error. I can't see anything I'm doing differently, however. On Sunday, 3 November 2019 22:08:27 UTC+10:30, Ben Ernst wrote: > > Thanks Jakob, is there by any chanc

Re: [v8-users] How can I resolve or workaround this undefined symbol, building V8 on Windows 10, MSVC++2017?

2019-11-03 Thread Ben Ernst
able_i18n_support = false. > > If that theory is correct, then for a quick workaround, you can change any > of those four ingredients to the situation. (E.g. if all you need is a DLL > to link your embedding application against, simply don't build cctests.exe.) > > > On Wed, O

Re: [v8-users] What do these unresolved external symbols mean when building against V8 7.8 "monolithic"?

2019-11-01 Thread Ben Ernst
Simon, Thank you, I'm not completely out of the weeds yet, but most of my libraries are now building with your tip "use_custom_libcxx=false". Cheers, Ben On Wednesday, 30 October 2019 23:35:50 UTC+10:30, Ben Ernst wrote: > > Simon > Thank you, I will try that so

[v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-10-31 Thread Ben Ernst
Is the idea of a "component build", where you specify "is_component_build=true" in the arguments to GN, actually supposed to work at all in V8 (v7.8)? In particular, I am getting this unresolved external symbol: 1>ezv8_platform.obj : error LNK2019: unresolved external symbol

Re: [v8-users] NewDefaultPlatform() unresolved external symbol

2019-10-31 Thread Ben Ernst
Joe, I have the same problem. Static build, dynamic build, debug build, release build, I get unresolved external symbols with every build. On Monday, 30 September 2019 19:24:43 UTC+9:30, Joe Smack wrote: > > That just gives me other errors. I've looked at the >

[v8-users] How can I resolve or workaround this undefined symbol, building V8 on Windows 10, MSVC++2017?

2019-10-30 Thread Ben Ernst
I am building V8 7.8 (Windows 10, MSVC++ 2017) . My arguments to "GN" are as follows: treat_warnings_as_errors=false is_component_build=true v8_enable_i18n_support=false v8_use_snapshot=true I invoke ninja as follows. ninja -C out.gn/x64.release I encounter the below error toward the end of

Re: [v8-users] What do these unresolved external symbols mean when building against V8 7.8 "monolithic"?

2019-10-30 Thread Ben Ernst
> standard library of Visual Studio. > > There is a GN option for this, try "use_custom_libcxx = false", which will > build V8 with the system C++ standard library. > > On Wed, Oct 30, 2019 at 8:02 AM Ben Ernst > > wrote: > >> My platform is Windows

Re: [v8-users] Is "monolithic" build of v8 for static linking incompatible with "v8_use_snapshot=true"?

2019-10-29 Thread Ben Ernst
al snapshots would not work in monolithic builds. The assert is > likely guarding the fact that the build produces exactly one single file. > > On Tue, Oct 29, 2019 at 7:07 AM Ben Ernst wrote: > >> Following some frustrations with dynamic linking to V8, I thought I'd try >>

[v8-users] Is "monolithic" build of v8 for static linking incompatible with "v8_use_snapshot=true"?

2019-10-29 Thread Ben Ernst
Following some frustrations with dynamic linking to V8, I thought I'd try the static linked build. My platform is VS2017, Windows 10. My arguments to "gn" (via "v8gen") are as follows: treat_warnings_as_errors=false is_component_build=false v8_enable_i18n_support=false v8_use_snapshot=true

[v8-users] Linker errors upgrading from V8 7.1 to 7.8

2019-10-28 Thread Ben Ernst
Hello. I have been trying to upgrade my code from V8 v7.1 to 7.8. I'm using V8 version 7.8.279, which I'm picking from git branch 7.8.279 (please tell me if this is the wrong way to do it!). I'm using v8gen.py to perform the build, and passing these arguments (via v8gen) to "gn"