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
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
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
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
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
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
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
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
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
- 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
- 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
- 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
- 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
- added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
- Disabled router to avoid build errors via -DWITH_ROUTER=OFF
- added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- added -DWITH_SSL=/foo/bar/... to get OpenSSL 1
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
- disabled router to avoid build errors via -DWITH_ROUTER=OFF
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.
ReplyDeleteHence, 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.
I am happy for you. You can write a blog post about your experience.
DeleteAFAIK, 8.0.22 compiled without problems on Ubuntu 22.04 without problems. Now it doesn't and I might never learn why. Something changed.
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.
ReplyDeleteMark, I shall do it .... Try building on the same OS with PowerPC ... lot's of fun ...
ReplyDeleteI 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