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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amit2781
    New Member
    • Jun 2009
    • 23

    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(cli ent.o) - shared library must be position independent. Use +z or +Z to recompile.

    I am using this option in building:
    aCC -Wl,+s,-E,+vnocompatwar nings -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?
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by amit2781
    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(cli ent.o) - shared library must be position independent. Use +z or +Z to recompile.

    I am using this option in building:
    aCC -Wl,+s,-E,+vnocompatwar nings -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?
    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

    Comment

    • amit2781
      New Member
      • Jun 2009
      • 23

      #3
      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.

      Comment

      • wva1
        New Member
        • Sep 2009
        • 1

        #4
        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.

        Comment

        Working...