[MDEV-12832] Mariadb 10.1.23 doesn't compile by default on debian jessie Created: 2017-05-17  Updated: 2017-05-23  Resolved: 2017-05-23

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.1.23
Fix Version/s: 10.1.24

Type: Bug Priority: Major
Reporter: Jaime Crespo Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 1
Labels: 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.



 Comments   
Comment by Vladislav Vaintroub [ 2017-05-17 ]

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.

Comment by Jaime Crespo [ 2017-05-17 ]

I would bet -DBUILD_CONFIG=mysql_release does that.

Comment by Vladislav Vaintroub [ 2017-05-17 ]

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.

Comment by Jaime Crespo [ 2017-05-17 ]

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.

Generated at Thu Feb 08 08:00:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.