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

Mariadb 10.1.23 doesn't compile by default on debian jessie

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.23
    • 10.1.24
    • Compiling
    • None

    Description

      This is not a Debian jessie specific problem, it fails because cmake doesn't check the lz4 version used to compile the newly introduced mariabackup. The default version available (Debian calls it 0.0~r122-2) doesn't contain the function LZ4_loadDictHC.

      After installing a later version manually, (0.0~r131-2 -I think is the backported version from the next Debian stable) that contains that version, the whole package compilation works successfully:

      $ ldd mariabackup 
              linux-vdso.so.1 (0x00007ffda5507000)
              libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f503c0e7000)
              liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f503bedb000)
              libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007f503bcd8000)
              libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f503baa1000)
              libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f503b840000)
              libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f503b443000)
              libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f503b23f000)
              libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f503af34000)
              libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f503ac32000)
              libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f503a887000)
              /lib64/ld-linux-x86-64.so.2 (0x0000560bd4f82000)
              libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f503a671000)
       
      $ ./mariabackup --version
      ./mariabackup based on MariaDB server 10.1.23-MariaDB Linux (x86_64)
      

      Suggested fix: either make the backup utility use the older api or just make cmake fail if the backup is enable and there isn't a function calle LZ4_loadDictHC on the lz4 library detected (or require a minimum version, but due to the strange lz4 versionsing, it may be more complex).

      Side note: If someone cannot upgrade for any reason, -DWITH_MARIABACKUP=0 allows compilation as previous versions did.

      Attachments

        Activity

          how do you compile? Can you list your cmake options? cmakes default behavior is to compile mariabackup without libarchive support, if libarchive is not found on the machine. There is an option to force libarchive support (compile from source and link it statically), but this is not the default.

          wlad Vladislav Vaintroub added a comment - how do you compile? Can you list your cmake options? cmakes default behavior is to compile mariabackup without libarchive support, if libarchive is not found on the machine. There is an option to force libarchive support (compile from source and link it statically), but this is not the default.
          jcrespo Jaime Crespo added a comment -

          I would bet -DBUILD_CONFIG=mysql_release does that.

          jcrespo Jaime Crespo added a comment - I would bet -DBUILD_CONFIG=mysql_release does that.

          yes, it does
          https://github.com/MariaDB/server/blob/10.1/cmake/build_configurations/mysql_release.cmake
          you can see WITH_LIBARCHIVE is always set either ON or STATIC
          This is used for our packages, and it compiles too much, compared with what people would normally need (like, embedded server)

          I'd recommend to omit -DBUILD_CONFIG=mysql_release for the builds, unless there is a strong need. Meanwhile let me check how to disable lz4 in statically compiled libarchive.

          wlad Vladislav Vaintroub added a comment - yes, it does https://github.com/MariaDB/server/blob/10.1/cmake/build_configurations/mysql_release.cmake you can see WITH_LIBARCHIVE is always set either ON or STATIC This is used for our packages, and it compiles too much, compared with what people would normally need (like, embedded server) I'd recommend to omit -DBUILD_CONFIG=mysql_release for the builds, unless there is a strong need. Meanwhile let me check how to disable lz4 in statically compiled libarchive.
          jcrespo Jaime Crespo added a comment -

          Let's say I have "special needs" - In any case, to clarify, I do not need this to be solved, I have upgraded lz4 (even for unrelated reasons) and it works for me. I just reported it in case it is useful for someone else.

          jcrespo Jaime Crespo added a comment - Let's say I have "special needs" - In any case, to clarify, I do not need this to be solved, I have upgraded lz4 (even for unrelated reasons) and it works for me. I just reported it in case it is useful for someone else.

          People

            wlad Vladislav Vaintroub
            jcrespo Jaime Crespo
            Votes:
            1 Vote for this issue
            Watchers:
            3 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.