472,146 Members | 1,245 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

MySQL Build problem on HPUX platform."shared library must be position independent"

I am trying to build the my project on HPUX (HP-UX oscar B.11.11 U 9000/800 741028561 unlimited-user license) which access the Mysql library. But it is giving error as :

Error : MySQL51/lib/hpux/libmysqld.a(client.o) - shared library must be position independent. Use +z or +Z to recompile.

I am using this option in building:
aCC -Wl,+s,-E,+vnocompatwarnings -z -g0 -b -Wl,-Bsymbolic.

I also tried using the +Z, +z, also added CFLAGS=-fPIC in makefile.Still it is giving error.

I have taken the mysql library from : mysql-5.1.34-hpux11.11-hppa2.0w.tar.gz

Can you please suggest the solution?
Aug 12 '09 #1
3 2141
numberwhun
3,503 Expert Mod 2GB
@amit2781
I love it when you do a Google search to try and find an answer for an OP, and the first result is one of their threads on another board. Funny thing is, its the same question.

Anywho, unfortunately, I don't have any experience with HPUX specifically (my experience lies with Sun Solaris and Linux), but in the search, I did find an installation guide from mysql. There are two sections specifically on thhe HPUX os, pointing out finite details. Hopefully it will help, but not sure.

Also, go through the search and see if anything helps. That is the thing about HPUX and AIX...... they are Unix versions that were produced by HP and IBM (respectively) and in my opinion, did something different so they weren't copies. Unfortunately, there are many quirks with each and installing software sometimes takes some extra steps to figure out the caveat that you have to overcome.

Regards,

Jeff
Aug 12 '09 #2
Thanks for reply.

Basically I have gone through this PDF. So tried the option -fPIC, +Z already. But still it is giving me error.

My way is to try first everything What I can do and then I will take help of the different number of forum. It helps a lot for mot wasting much time after already had gone through the long investigation. These posts are also mine.
Aug 12 '09 #3
wva1
1
libmysqld.a (embedded server library) is static one , you cannot link it as a shared library, no matter how you build your own source.
Normally, to link shared library you just pass the path to the library to the linker.
Sep 9 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Berthold Hoellmann | last post: by
2 posts views Thread by Jenna Schmidt | last post: by
3 posts views Thread by Giovanni Bassi | last post: by
3 posts views Thread by Kenneth Kahl | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.