Tuesday, May 23, 2023

Compiling all releases of MySQL 8.0

This explains my experiences compiling all GA releases from MySQL 8.0. The first GA release is 8.0.11, the latest is 8.0.33 and 8.0.29 doesn't exist. That means there are 22 point releases including 8.0.33.

My build platform is Ubuntu 22.04 which has gcc 11.3.0. The first challenge is OpenSSL -- MySQL 8.0.28 and prior releases need version 1, 8.0.30 and later need version 3 and Ubuntu 22.04 includes version 3. The workaround is to download, compile and install version 1.

./config --prefix=/foo/bar/d/ssl --openssldir=/foo/bar/d/ssl shared

make; make install

The second challenge was adding missing include files to avoid compiler failures. I always disabled compiling router because there were build failures early in the 8.0 cycle. Perhaps those have been fixed but I don't need the feature and prefer faster build times so I never checked.


I have no idea whether these build failures occurred on older versions of Ubuntu and/or gcc. Perhaps there is a story for the missing include file errors that linger across multiple releases.


MySQL 8.0.11


Changes:

  • added -fPIC to the CFLAGS and CXXFLAGS to avoid odd linker errors
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <stdexcept> to client/mysqltest.c
  • added include <cstdint> to include/my_hash_combine.h
  • added include <stdexcept> to plugin/x/ngs/src/thread.cc
  • added declarations to materialize templates in sql/dd/impl/cache/storage_adapter.cc
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.12


Changes:

  • added -fPIC to the CFLAGS and CXXFLAGS to avoid odd linker errors
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <stdexcept> to client/mysqltest.c
  • added include <cstdint> to include/my_hash_combine.h
The CMake command line is here:
The diffs to upstream source are here.

MySQL 8.0.13

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <stdexcept> to client/mysqltest.c
  • added include <cstdint> to include/my_hash_combine.h
  • added include <stdexcept> to router/src/http/include/mysqlrouter/http_common.h
  • added include <stdexcept> to router/src/router/include/mysqlrouter/uri.h
  • disabled router in top-level CMakeLists.txt because of build failures and the CMake option to disable it didn't arrive until a later point release
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.14

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <stdexcept> to client/mysqltest.c
  • added include <cstdint> to include/my_hash_combine.h
  • added include <limits> to sql-common/sql_string.cc
  • disabled router in top-level CMakeLists.txt because of build failures and the CMake option to disable it didn't arrive until a later point release
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.15

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <stdexcept> to client/mysqltest.c
  • added include <cstdint> to include/my_hash_combine.h
  • added include <limits> to sql-common/sql_string.cc
  • disabled router in top-level CMakeLists.txt because of build failures and the CMake option to disable it didn't arrive until a later point release
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.16

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <cstdint> to include/my_hash_combine.h
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstdint> & <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.17

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <cstdint> to include/my_hash_combine.h
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstdint> & <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.18

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <cstdint> to include/my_hash_combine.h
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstdint> & <cstddef> to include/mysql/components/services/page_track_service.h
  • added include <string> to sql/rpl_utility.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.19

Changes:

  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstdint> & <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.20

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstdint> & <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.21

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.22

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.23

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • added include <limits> to xtra/robin-hood-hashing/robin_hood.h
  • added include <limits> to sql-common/sql_string.cc
  • added include <cstddef> to include/mysql/components/services/page_track_service.h
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
The diffs to upstream source are here.

MySQL 8.0.24

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • Disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.25

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.26

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.27

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.28

Changes:
  • added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.30

Changes:
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.31

Changes:
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.32

Changes:
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.

MySQL 8.0.33

Changes:
  • disabled router to avoid build errors via -DWITH_ROUTER=OFF
The CMake command line is here.
Upstream source compiled as-is.


5 comments:

  1. Too many problems ..... I do it without problems and make all four releases, with the additional bonus of adding profiling support in the DEBUG build.

    Hence, I have all for releases to play with, without any problems with include files etc ....... all of this on MacOS with command line only. That means, no CMake GUI nor XCode.

    ReplyDelete
    Replies
    1. I am happy for you. You can write a blog post about your experience.

      AFAIK, 8.0.22 compiled without problems on Ubuntu 22.04 without problems. Now it doesn't and I might never learn why. Something changed.

      Delete
  2. I have no such problems. On the latest macOS, I use command line tools only (no CMake GUI nor XCode) and make all 4 (four) releases, with added bonus of adding profiling in the Debug build.

    ReplyDelete
  3. Mark, I shall do it .... Try building on the same OS with PowerPC ... lot's of fun ...

    ReplyDelete
    Replies
    1. I last used PPC on an old Mac. When it was too slow with MacOS I put Linux on it and that gave me a few more years of usage.

      Delete

RocksDB on a big server: LRU vs hyperclock, v2

This post show that RocksDB has gotten much faster over time for the read-heavy benchmarks that I use. I recently shared results from a lar...