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

Open
btv opened this issue Apr 8, 2013 · 3 comments
Open

Build error #1

btv opened this issue Apr 8, 2013 · 3 comments

Comments

@btv
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/lib_mysqludf_sys.so /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?

@mahrton
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)/lib_mysqludf_sys.so

Just in case somebody else has this problem too.

@GabrieleV
Copy link

@GabrieleV GabrieleV commented Jan 15, 2016

Same thing under Debian Wheezy 64. Mahrton fix works.

@jusoto
Copy link

@jusoto jusoto commented Dec 11, 2016

In addition to mahrton solution I had to update LIBDIR in Makefile too, like this:
LIBDIR=/usr/lib/mysql/plugin

Thanks mahrton

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

Successfully merging a pull request may close this issue.

None yet
4 participants