Pete,

I doubt you have the same problem. On Linux, the linkage will fail without
-fPIC compiler option (and it could be passed with build command or from
GYP-file). You are saying that you're getting segfault, that implies that
the linkage was successful.

--
Marat

On Thu, Jun 25, 2015 at 9:25 AM, Pete <germishuys.pie...@gmail.com> wrote:

> Anyone know what the solution to this is? I am experiencing the same
> issues statically linking v8 into a shared object and then consuming it.
> I'm getting a segmentation fault.
>
> On Monday, 2 July 2012 02:33:02 UTC+2, Charles Lowell wrote:
>>
>> Hi,
>>
>> I'm trying to build a shared object and link in the static v8 library.
>> This works fine for me on OSX, but on Linux I get the following error:
>>
>>     /usr/bin/ld:
>> /tmp/build_321giz8disep/vendor/v8/out/x64.release/obj.target/v8_base/src/api.o:
>> relocation R_X86_64_32S against `vtable for v8::ScriptData' can not be used
>> when making a shared object; recompile with -fPIC
>>
>>  
>> /tmp/build_321giz8disep/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a:
>> could not read symbols: Bad value
>>        collect2: ld returned 1 exit status
>>
>> Is there a way to tell GYP to build a static v8 library with -fPIC? Is
>> there a way to do this without patching one of the gypfiles?
>>
>> cheers,
>> Charles
>>
>  --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/1vva9qjvstE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to