By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,007 Members | 1,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,007 IT Pros & Developers. It's quick & easy.

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

P: 23
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
Share this Question
Share on Google+
3 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
@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

P: 23
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

P: 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.