Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #1

btv opened this issue Apr 8, 2013 · 3 comments

Build error #1

btv opened this issue Apr 8, 2013 · 3 comments


Copy link

@btv btv commented Apr 8, 2013

First off, thank you for writing this. I look forward to it working.

I'm getting a build error when trying to "make":
gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/ /usr/bin/ld: /tmp/ccqmuRkb.o: relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccqmuRkb.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [install] Error 1`

I'm trying to build this on RHEL 6.3, with the Percona server (devel packages included). Any ideas?

Copy link

@mahrton mahrton commented Aug 20, 2013

hey btw,

I know it's a 4 months old issue but I got it working by editing the Makefile. Had to include two new parameters in the gcc call -fPIC and -DMYSQL_DYNAMIC_PLUGIN so it looked like this:

gcc -DMYSQL_DYNAMIC_PLUGIN -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/

Just in case somebody else has this problem too.

Copy link

@GabrieleV GabrieleV commented Jan 15, 2016

Same thing under Debian Wheezy 64. Mahrton fix works.

Copy link

@jusoto jusoto commented Dec 11, 2016

In addition to mahrton solution I had to update LIBDIR in Makefile too, like this:

Thanks mahrton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants