Bug #97547 | Mysql server cannot be compiled on aarch64 with gcc 4.8.5 | ||
---|---|---|---|
Submitted: | 8 Nov 2019 7:43 | Modified: | 12 Dec 2019 9:38 |
Reporter: | Rungong An | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | CentOS |
Assigned to: | CPU Architecture: | ARM |
[8 Nov 2019 7:43]
Rungong An
[9 Nov 2019 13:22]
Terje Røsten
hi! Can you try with GCC 8 from Devtoolset 8 for CentOS 7 aarch64 instead? For installing required packages do something like: $ yum install centos-release-scl $ yum install devtoolset-8 Then do $ export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc $ export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++ and rerun cmake from a clean state.
[11 Nov 2019 1:04]
Rungong An
Hi, I have tried gcc 7.3, it's ok. However, the complied bin files (such as mysqld, libmysqlclient.so) relate on .so files provided by higher version gcc. As other machines do not have the higher version gcc, I need to install higher version gcc on other machines or execute export LD_LIBRARY_PATH before every mysql related command. I consider that's not suitable.
[11 Nov 2019 13:24]
Terje Røsten
Please retry with devtoolset 8, it will not add any new runtime dependencies. $ ldd sql/mysqld linux-vdso.so.1 => (0x0000fffea5ab0000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000fffea5a50000) libaio.so.1 => /lib64/libaio.so.1 (0x0000fffea5a20000) libnuma.so.1 => /lib64/libnuma.so.1 (0x0000fffea59f0000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000fffea59a0000) libssl.so.10 => /lib64/libssl.so.10 (0x0000fffea5910000) libcrypto.so.10 => /lib64/libcrypto.so.10 (0x0000fffea5700000) libdl.so.2 => /lib64/libdl.so.2 (0x0000fffea56d0000) librt.so.1 => /lib64/librt.so.1 (0x0000fffea56a0000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000fffea5580000) libm.so.6 => /lib64/libm.so.6 (0x0000fffea54c0000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000fffea5480000) libc.so.6 => /lib64/libc.so.6 (0x0000fffea52f0000) /lib/ld-linux-aarch64.so.1 (0x0000fffea5ac0000) libfreebl3.so => /lib64/libfreebl3.so (0x0000fffea52c0000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x0000fffea5250000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x0000fffea5140000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000fffea5110000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x0000fffea50b0000) libz.so.1 => /lib64/libz.so.1 (0x0000fffea5070000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x0000fffea5040000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000fffea5010000) libresolv.so.2 => /lib64/libresolv.so.2 (0x0000fffea4fd0000) libselinux.so.1 => /lib64/libselinux.so.1 (0x0000fffea4f80000) libpcre.so.1 => /lib64/libpcre.so.1 (0x0000fffea4f20000) $ sql/mysqld --version sql/mysqld Ver 5.7.28 for Linux on aarch64 (Source distribution) Note: you might need this patch to build: diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 219e284..25fe64a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -53,6 +53,8 @@ #include <sys/mman.h> #endif +#include <sys/prctl.h> + #include "sql_parse.h" // test_if_data_home_dir #include "sql_cache.h" // query_cache, query_cache_* #include "sql_locale.h" // MY_LOCALES, my_locales, my_locale_by_name or a backport to 5.7 of: https://github.com/mysql/mysql-server/commit/cde75f89ba5dff888dfd44adf16b00b72a82c8c1#diff...
[12 Nov 2019 2:40]
Rungong An
libstdc++ seems to be a higher version.
[12 Nov 2019 3:53]
Rungong An
I mean the libstdc++.so.6 is a soft link, the actual .so file may be a higher version. I'm not sure whether installing a higher version gcc on aother machine impacts other applications on the machine.
[12 Nov 2019 3:53]
Rungong An
I mean the libstdc++.so.6 is a soft link, the actual .so file may be a higher version. I'm not sure whether installing a higher version gcc on aother machine impacts other applications on the machine.
[12 Nov 2019 9:38]
Terje Røsten
GNU G++ from Devtoolset 8 will produce binaries that is compatible with a unmodified libstdc++.so.6.0.19 from libstdc++-4.8.5: $ sql/mysqld --version sql/mysqld Ver 5.7.28 for Linux on aarch64 (Source distribution) $ ldd sql/mysqld|grep libstd libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000fffcf07b0000) $ ls -l /lib64/libstdc++.so.6 lrwxrwxrwx 1 root root 19 nov. 11 09:37 /lib64/libstdc++.so.6 -> libstdc++.so.6.0.19 $ rpm -qf /lib64/libstdc++.so.6.0.19 libstdc++-4.8.5-39.0.4.el7.aarch64 $ rpm -vV libstdc++-4.8.5 |grep /usr/lib64/libstdc++ ......... /usr/lib64/libstdc++.so.6 ......... /usr/lib64/libstdc++.so.6.0.19 ......... /usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py ......... /usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc ......... /usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo That's why I ask you to install these tools.
[13 Dec 2019 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".