On Mon, Dec 30, 2019 at 10:06 AM Dominik Inführ <
dinf...@chromium.org> wrote:
>
> I suppose this is because pointer compression was recently enabled by default. So either you disable pointer compression when compiling V8 (v8_enable_pointer_compression = false in your
args.gn) or you need to compile your example program with -DV8_COMPRESS_POINTERS. This fixed the issue for me at least. Hope that helps!
Thanks! This indeed fixes the example program, so your diagnosis seems
correct. However this does not provide a general solution for
applications that link against a system distributed version of v8.
So if I understand it correctly, the application is supposed to be
built with V8_COMPRESS_POINTERS that matches what v8 itself was built
with, but there is no way of knowing the value for
v8_enable_pointer_compression in a preinstalled v8? Most other C++
libraries would ship a config.h file that gets included with v8.h
which contains such macros.
The R bindings that I maintain should work against any system provided
libv8, on recent versions of Debian, Fedora, MacOS, etc. If I don't
control the v8 version on those systems, is there anything the
bindings' configure script can query to know the appropriate
V8_COMPRESS_POINTERS config?