orc-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Korry Douglas <ko...@me.com>
Subject Re: Building liborc - need position independent code
Date Tue, 15 Jan 2019 17:10:27 GMT
Thanks for the quick reply, Zhiyuan.

I’ve tried your suggestion (that was how I expected the process to work), but I get an error
when I do that:

  /usr/local/lib/libprotobuf.a(arena.cc.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E'
can not be used when making a shared object; recompile with -fPIC

So the link fails. (I *do* compile my .cc files with -fPIC.)

             — Korry

> On Jan 15, 2019, at 10:02 AM, Zhiyuan Dong <zhiyuan.dong@gmail.com> wrote:
> This my personal $0.02. 
> I have been able to use the default settings there building various supporting *.a files
in linux Ubuntu and CentOS. Then I build C++ functions into my own written *.so file which
is then linked to various *.a files... And the *.so that calls the orc functionalities in
C++ works fine.
> Hope this helps a little bit.
> Zhiyuan
> On Tue, Jan 15, 2019 at 8:40 AM Korry Douglas <korry@me.com <mailto:korry@me.com>>
> As an alternative - is there somewhere I can find binary packages for liborc (RPMs) ?
>           — Korry
> > On Jan 14, 2019, at 7:17 PM, Korry Douglas <korry@me.com <mailto:korry@me.com>>
> > 
> > Hi all,  I am trying to build a shared library that links to liborc (the C++ API).
 However, the Makefiles are all set up to build .a files instead of .so files.
> > 
> > I’ve figured out how to modify the CMakeLists.txt file to add the -fPIC CFLAG
(although I don’t really like editing that file by hand).  However, there are many related
libraries that seem to be downloaded from various URL’s  and those libraries are not compiled
with -fPIC.
> > 
> > Any suggestions?  Thanks in advance.
> > 
> >            — Korry
> -- 
> Zhiyuan Dong, Ph.D.

View raw message