I want write shared object using native client classes.
My BUCK:
cxx_binary(
name="hbNativeLib",
srcs=[
"hbNativeLib.cpp",
],
deps=[":core", "//connection:connection"],
compiler_flags = ['-fPIC'],
link_style="shared",)
//-fPIC here is needed?
I have error:
/usr/bin/ld:
/usr/src/hbase/hbase-native-client/buck-out/gen/third-party/gen_libevent/gen_libevent/libevent.a(event.o):
relocation R_X86_64_PC32 against symbol `event_global_current_base_' can
not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Problem is because libevent is system library (?)
is possible install it with -fPIC or not using this library?