This thing is pretty old but I still have the same problem.
Is there any fix?

I'm building a dynamic library and I'm statically linking V8 (version 
3.24.40) in it. On OSX everything is linking just fine, but on Linux I get:

/usr/bin/ld: 
out/Release/obj.target/deps/v8/tools/gyp/../../../../v8_base.x64/deps/v8/src/accessors.o:
 
relocation R_X86_64_32S against `vtable for v8::internal::StackFrame' can 
not be used when making a shared object; recompile with -fPIC

out/Release/obj.target/deps/v8/tools/gyp/../../../../v8_base.x64/deps/v8/src/accessors.o:
 
could not read symbols: Bad value

collect2: ld returned 1 exit status

So, I need a way to tell V8 to build static library with -fPIC. Or is there 
any other fix for this?

--
Marat

On Monday, July 2, 2012 4:33:02 AM UTC+4, 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
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to