Thanks for the response! I actually realized I overlooked something pretty 
important - I needed a static library built with fPIC, not a shared 
library. Added -fPIC to uv.gyp and now it works (:

On Monday, February 19, 2018 at 2:21:10 PM UTC-8, Ben Noordhuis wrote:
>
> On Mon, Feb 19, 2018 at 10:02 PM, Yvonne Chen <iyam...@gmail.com 
> <javascript:>> wrote: 
> > Hi, 
> > 
> > Trying to link libuv.a into an existing project and getting errors all 
> > related to 
> > relocation R_X86_64_32 against `.rodata' can not be used when making a 
> > shared object; recompile with -fPIC 
> > 
> > I assume that means libuv needs to be rebuilt with -fPIC. However, I'm 
> > having trouble figuring out how to do this. 
> > I tried doing a gyp build, passing '-Duv_library=shared' to gyp_uv.py, 
> then 
> > using the resulting libuv.a, but that didnt work. 
> > I haven't been able to figure out how the autotools settings work. 
> > 
> > Any pointers? Does this error actual point to a different issue? Thanks! 
>
> You were close, it's -Duv_library=shared_library. :-) 
>
> The autotools build should do the right thing automatically.  If it 
> doesn't work for you, try `./configure --enable-shared 
> --disable-static`. 
>

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

Reply via email to