Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2644

LP:618282 - libmysqld.a is not compiled with -fPIC

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The binary objects in the embedded library (libmysqld.a) are not all compiled with fPIC, this leads to the following error message when attempting to create a position-independant executable (-pie):

      /usr/bin/ld: /opt/mariadb/lib/mysql/libmysqld.a(my_new.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

      I can recompile manually mariadb by adding -fPIC to CFLAGS, but it would be nice to have this option turned on in the binary Linux distribution as well.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            christophedevine Christophe Devine added a comment -

            Re: libmysqld.a is not compiled with -fPIC
            Btw, this is using mariadb-5.1.49-Linux-x86_64.tar.gz

            Show
            christophedevine Christophe Devine added a comment - Re: libmysqld.a is not compiled with -fPIC Btw, this is using mariadb-5.1.49-Linux-x86_64.tar.gz
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: libmysqld.a is not compiled with -fPIC
            See also MWL#74:

            http://askmonty.org/worklog/Server-RawIdeaBin/?tid=74

            Show
            knielsen Kristian Nielsen added a comment - Re: libmysqld.a is not compiled with -fPIC See also MWL#74: http://askmonty.org/worklog/Server-RawIdeaBin/?tid=74
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 618282

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 618282

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                christophedevine Christophe Devine
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: