ubuntu 12.04 - elocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC -
my server on ubuntu 12.04.
i'm trying install levenshtein-mysql-udf available here : https://github.com/jmcejuela/levenshtein-mysql-udf
i downloaded .zip , locate levenshtein.c file here on server : /home/username/levenshtein.c
when enter in terminal following command :
gcc -o levenshtein.so -shared /home/username/levenshtein.c -i /usr/include/mysql/ i obten error :
/usr/bin/ld: /tmp/cccpqijg.o: relocation r_x86_64_32 against `.rodata' can not used when making shared object; recompile -fpic /tmp/cccpqijg.o: not read symbols: bad value collect2: ld returned 1 exit status
i googled error find how solve , install build-essential, after have same error.
i don't know how can use -fpic recompile correctly must recompile...
i found lot of topics little bit different of mine , don't know solve problem.
anyone me please ?
thanks ;-)
bbfunk01
i had same problem. after build-essential installation compile shared library -fpic flag:
gcc -fpic -o levenshtein.so -shared /home/username/levenshtein.c -i /usr/include/mysql/ just in case install libc6-dev.
Comments
Post a Comment