Issues Linking to v8 - Linux/g++ (6.4.388.40)

48 views
Skip to first unread message

Jerry Sievert

unread,
Feb 12, 2018, 3:29:12 PM2/12/18
to v8-users
Hello,

Apologies if this is the wrong place to post - I've also searched, and have been unable to find an answer.

I've been attempting to link to v8, with an environment that has worked fine in the past with older versions of v8 (make native, as opposed to ninja).  I've updated for any API changes, and have everything working well under macOS, but am having issues during the link phase on Linux:

std::__1::__shared_weak_count::~__shared_weak_count()

is missing after link, when I attempt to do any execution.  I'm having the same issue even compiling shell.cc

I'm hoping I'm just missing something at the linker step (using g++ as the linker passthrough).

Any help would be appreciated!

Ben Noordhuis

unread,
Feb 12, 2018, 3:52:08 PM2/12/18
to v8-users
That link error suggests you built V8 against llvm's libc++ but are
now trying to link it against GNU's libstdc++. What are the exact
steps you used to build libv8 and the shell executable? Can you
include build output?

Jerry Sievert

unread,
Feb 12, 2018, 3:57:33 PM2/12/18
to v8-users
Thanks Ben,

That's what I had been thinking as well, and moved to clang++-5.0 with llvm's libc++ as well.

libv8 is being built via:

tools/dev/v8gen.py x64.release -- is_component_build=false v8_static_library=true v8_use_snapshot=true v8_use_external_startup_data=false
ninja -C out.gn/x64.release d8

I dropped down to shell.cc to try to debug the issue (thus taking any of the code I'm maintaining, plv8, out of the loop):

g++ -I.. -I../include -L../out.gn/x64.output/obj -L../out.gn/x64.output/obj/third_party/icu -[allofthelibs that are needed that also work on macOS]

Jerry Sievert

unread,
Feb 12, 2018, 3:58:17 PM2/12/18
to v8-users
also forgot to add that I'm using -std=c++11 on compile

Jerry Sievert

unread,
Feb 12, 2018, 4:07:23 PM2/12/18
to v8-users
After following up (I've been hitting my head against this for a week at least), and updating ubuntu to another version, I've managed to get it to link and run by forcing -lc++ against libc++-dev and libc++-helper

thanks Ben, you can stand down :)

I appreciate the response, though.
Reply all
Reply to author
Forward
0 new messages