2011/10/6 Michael Schwartz <[email protected]> > Try linking everything against libv8.so. Your main program should be able > to load v8 as a .so, and all your other .so should be able to find the > symbols. I think there's a special command line switch to gcc/ld that will > export all the symbols in your main program (and libv8.so) to the elf file. > > If I link everything to libv8.so, the whole project works without the need to hack (or explicitly export) anything :)
The original intention, lost in discussion, was to actually *evade* shared V8 completely. However, my recent experiments and googling lead me to conclusion that using a static V8 does not seem to be possible. O. > On Oct 6, 2011, at 9:29 AM, Stephan Beal wrote: > > On Thu, Oct 6, 2011 at 5:18 PM, Ondřej Žára <[email protected]> wrote: > >> Okay, will try this: link v8cgi with libv8.a; link my modules with >> libv8.so. V8 symbols will be available at runtime so the modules will be >> happy; libv8.a will be linked just to main binary. Sounds reasonable; will >> let you know about the outcome. >> > > i _think_ that runs the risk of the problem you and i discussed a few days > ago - a "split brain" (as it's known in clustering jargon). Some of v8's > file-local static (not exported) internals might be in the static bits and > some might be allocated again in the DLL. Might. Maybe. > > >> >>> Ideally you shouldn't have to static link with libv8.a at all. I bet >>> there are gcc/ld flags that would allow all to be .so. >>> >>> >> Yes, the shared solution works flawlessly. I am just trying an >> alternative, suggested by one of my users... >> > > But of course i've been known to be wrong ;). > > -- > ----- stephan beal > http://wanderinghorse.net/home/stephan/ > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
