`
leongfans
  • 浏览: 85371 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

HBase的C客户端编译问题

 
阅读更多
编写HBase的C语言客户端,通过JNI调用JVM来实现
编译过程中出现如下错误
gcc -L/home/hadoop/media/jdk1.6.0_14/jre/lib/amd64/server -shared -o "libUdmslogParser"  ./bytesUtil.o ./delete.o ./get.o ./hashtable.o ./hbase.o ./hdfs.o ./hdfsUtil.o ./htable.o ./jniHelper.o ./put.o ./recordFile.o ./result.o   -ljvm
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: ./bytesUtil.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

在Link的时候加上-fPIC,仍然报错。google得知,是在compile的时候加上-fPIC,重编译通过
搞定~
0
9
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics