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

MariaDB server does not compile on AIX

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.6
    • 10.5.9
    • Server
    • None
    • AIX 7.1 PowerPC 8 or more
      GCC 8.3 or more
      CMake 3.14 Bullfreeware or CMake 3.16 (git master) vanilla

    Description

      MariaDB does not compile or work on AIX 7.1. Tested with GCC 8.3.
      Lot of other issues about compiling MariaDB on AIX with xlc.

      My goal is to port MariaDB to AIX. For now, MariaDB compiles, and most of the test suite passes (pass: 3084, fail: 39, disabled: 593, skipped: 381, total: 4097). Some plugins are disabled (including Linux only plugins, gamma, beta and experimental, and some dynamics plugins that do not work for now).

      It has been build with CMake 3.14 provided by Bullfreeware (patched CMake). CMake now proposes a new behavior for AIX so if it works well I will propose patches compatible with vanilla CMake (3.16 or more).

      See CONC-430 for connector-c.

      Work in progress at https://github.com/EGuesnet/server/tree/AIX

      Attachments

        Issue Links

          Activity

            So, what is the actual problem? First, you said it doesn't compile, but then you said "for now, MariaDB compiles".

            elenst Elena Stepanova added a comment - So, what is the actual problem? First, you said it doesn't compile, but then you said "for now, MariaDB compiles".

            MariaDB 10.4.6 vanilla does not compile. There are lot of problems:

            • Undefined symbols due to specific AIX ld
            • Undefined macro (see MDEV-19508)
            • RTOC_L error in debug mod
            • and so on...

            I have patched MariaDB in a local version. And this version compiles and most of the tests pass. I will propose patches as soon as CMake 3.16 will be released (new behavior on AIX). I open this issue and a fork in Github as a Work In Progress.

            EGuesnet Etienne Guesnet added a comment - MariaDB 10.4.6 vanilla does not compile. There are lot of problems: Undefined symbols due to specific AIX ld Undefined macro (see MDEV-19508 ) RTOC_L error in debug mod and so on... I have patched MariaDB in a local version. And this version compiles and most of the tests pass. I will propose patches as soon as CMake 3.16 will be released (new behavior on AIX). I open this issue and a fork in Github as a Work In Progress.
            fazalmajid Fazal Majid added a comment - - edited

            MariaDB 10.5.2 does not compile on Solaris (SmartOS/Illumos) either due to SI_KERNEL, which is a linuxism. I worked around this with the following patch:

            mordac ~/build/mariadb-10.5.2/sql>diff -u mysqld.cc

            {.dist,}

            — mysqld.cc.dist Sat May 9 11:13:54 2020
            +++ mysqld.cc Sat May 9 11:14:26 2020
            @@ -3124,7 +3124,11 @@
            }
            break;
            case SIGHUP:
            +#ifdef SI_KERNEL
            if (!abort_loop && origin != SI_KERNEL)
            +#else
            + if (!abort_loop)
            +#endif
            {
            int not_used;
            mysql_print_status(); // Print some debug info

            There are also conflicts due to innodb redefining the system offset, an undefined global variable concurrency if HAVE_THR_SETCONCURRENCY (a Solaris API, if I am not mistaken, although there is a pthread_setconcurrency() equivalent that isn't used in MariaDB, which just calls pthread_dummy() instead). Presumably code that was ripped out of Oracle mysql (which obviously is tested against Solaris) and Mariadb which isn't. Also a number of other issues I worked around.

            If the MariaDB team is interested in supporting Solaris and Illumos as platforms, I'll be happy to elaborate. We don't like Oracle any more than you do

            fazalmajid Fazal Majid added a comment - - edited MariaDB 10.5.2 does not compile on Solaris (SmartOS/Illumos) either due to SI_KERNEL, which is a linuxism. I worked around this with the following patch: mordac ~/build/mariadb-10.5.2/sql>diff -u mysqld.cc {.dist,} — mysqld.cc.dist Sat May 9 11:13:54 2020 +++ mysqld.cc Sat May 9 11:14:26 2020 @@ -3124,7 +3124,11 @@ } break; case SIGHUP: +#ifdef SI_KERNEL if (!abort_loop && origin != SI_KERNEL) +#else + if (!abort_loop) +#endif { int not_used; mysql_print_status(); // Print some debug info There are also conflicts due to innodb redefining the system offset, an undefined global variable concurrency if HAVE_THR_SETCONCURRENCY (a Solaris API, if I am not mistaken, although there is a pthread_setconcurrency() equivalent that isn't used in MariaDB, which just calls pthread_dummy() instead). Presumably code that was ripped out of Oracle mysql (which obviously is tested against Solaris) and Mariadb which isn't. Also a number of other issues I worked around. If the MariaDB team is interested in supporting Solaris and Illumos as platforms, I'll be happy to elaborate. We don't like Oracle any more than you do

            I think your trouble was the MDEV-19508. It was already corrected by PR-1392.

            EGuesnet Etienne Guesnet added a comment - I think your trouble was the MDEV-19508 . It was already corrected by PR-1392 .
            Rada RadaKichenin added a comment -

            Hi Etienne Guesnet,

            I am trying to compile mariadb (https://github.com/EGuesnet/server/tree/10.4-AIX-vanilla-cmake) on AIX 7.1 using gcc 8.3 and cmake 3.16. So far I was able to do cmake. But make fails repeatedly. Can you please help and let me know what are the step involved in compiling MAriaDB successfuly?

            Thanks & Regards
            Radakichenin

            Rada RadaKichenin added a comment - Hi Etienne Guesnet, I am trying to compile mariadb ( https://github.com/EGuesnet/server/tree/10.4-AIX-vanilla-cmake ) on AIX 7.1 using gcc 8.3 and cmake 3.16. So far I was able to do cmake. But make fails repeatedly. Can you please help and let me know what are the step involved in compiling MAriaDB successfuly? Thanks & Regards Radakichenin

            Hi RadaKichenin,
            The new branch I am working on is https://github.com/EGuesnet/server/tree/AIX . However, it is based on the 10.5 unstable MariaDB branch.
            To compile, you need also to use the patched MariaDB-connector-c, https://github.com/EGuesnet/mariadb-connector-c/tree/AIX .
            If you want to compile stable MariaDB on AIX, the simplest way is to use SRPM, that contains stable source, all patches and compilation commands. They are freely available on AIX Toolbox (last is 10.4.8) and Bullfreeeware (last is 10.4.12).
            See this page to see how to compile an SRPMS on AIX.
            Regards,
            Etienne Guesnet.

            EGuesnet Etienne Guesnet added a comment - Hi RadaKichenin, The new branch I am working on is https://github.com/EGuesnet/server/tree/AIX . However, it is based on the 10.5 unstable MariaDB branch. To compile, you need also to use the patched MariaDB-connector-c, https://github.com/EGuesnet/mariadb-connector-c/tree/AIX . If you want to compile stable MariaDB on AIX, the simplest way is to use SRPM, that contains stable source, all patches and compilation commands. They are freely available on AIX Toolbox (last is 10.4.8) and Bullfreeeware (last is 10.4.12). See this page to see how to compile an SRPMS on AIX. Regards, Etienne Guesnet.
            Rada RadaKichenin added a comment -

            Hi Etienne Guesnet,

            Thank you so much for your guidance. I was aware of the SPRMs for MariaDB. But wanted to compile it from source code for a Training assignment.
            I will try compiling https://github.com/EGuesnet/server/tree/AIX after patching the connector-c. If I fail, I will go with the SRPMs ..

            Thanks & Regards
            Radakichenin

            Rada RadaKichenin added a comment - Hi Etienne Guesnet, Thank you so much for your guidance. I was aware of the SPRMs for MariaDB. But wanted to compile it from source code for a Training assignment. I will try compiling https://github.com/EGuesnet/server/tree/AIX after patching the connector-c. If I fail, I will go with the SRPMs .. Thanks & Regards Radakichenin
            danblack Daniel Black added a comment -

            Thanks MDEV-23892 and MDEV-19508 still to be fixed but this is a great contribution and thanks for your patience through a very long review process.

            danblack Daniel Black added a comment - Thanks MDEV-23892 and MDEV-19508 still to be fixed but this is a great contribution and thanks for your patience through a very long review process.

            People

              danblack Daniel Black
              EGuesnet Etienne Guesnet
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.