* [Buildroot] [PATCH/next/RFC 1/2] package/mariadb: handle missing ucontext_t @ 2018-08-25 20:44 Bernd Kuhls 2018-08-25 20:44 ` [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 Bernd Kuhls 0 siblings, 1 reply; 9+ messages in thread From: Bernd Kuhls @ 2018-08-25 20:44 UTC (permalink / raw) To: buildroot On some archs uclibc does not provide ucontext_t, for details see https://git.buildroot.net/buildroot/commit/?id=f1cbfeea95e6287c7a666aafc182ffa318eff262 Mariadb uses ucontext_t optionally, its use can be disabled by the corresponding cmake option. Instead of copying the Config.in code from libsigsegv we shamelessly use its ARCH_SUPPORTS option while thinking that a more general approach might be needed for ucontext_t support so please consider this patch a RFC. This patch fixes a build error In file included from /home/bernd/buildroot/output/build/mariadb-10.2.17/libmariadb/plugins/pvio/pvio_socket.c:32:0: /home/bernd/buildroot/output/build/mariadb-10.2.17/libmariadb/include/ma_context.h:62:3: error: unknown type name ?ucontext_t? ucontext_t base_context; ^~~~~~~~~~ using this defconfig: BR2_arcle=y BR2_archs38=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arcle-hs38-full-2018.02-926-gb393c24.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_PACKAGE_MYSQL=y BR2_PACKAGE_MARIADB=y BR2_PACKAGE_MARIADB_SERVER=y Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> --- package/mariadb/mariadb.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/mariadb/mariadb.mk b/package/mariadb/mariadb.mk index 075582288a..7074e3510e 100644 --- a/package/mariadb/mariadb.mk +++ b/package/mariadb/mariadb.mk @@ -61,6 +61,11 @@ else MARIADB_CONF_OPTS += -DWITHOUT_SERVER=ON endif +# hack: do we need a ucontext-specific option? +ifeq ($(BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS),) +MARIADB_CONF_OPTS += -DHAVE_UCONTEXT_H=0 +endif + MARIADB_CONF_OPTS += \ -DINSTALL_DOCDIR=share/doc/mariadb-$(MARIADB_VERSION) \ -DINSTALL_DOCREADMEDIR=share/doc/mariadb-$(MARIADB_VERSION) \ -- 2.18.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 20:44 [Buildroot] [PATCH/next/RFC 1/2] package/mariadb: handle missing ucontext_t Bernd Kuhls @ 2018-08-25 20:44 ` Bernd Kuhls 2018-08-25 21:05 ` Thomas Petazzoni 0 siblings, 1 reply; 9+ messages in thread From: Bernd Kuhls @ 2018-08-25 20:44 UTC (permalink / raw) To: buildroot From: Peter Seiderer <ps.report@gmx.net> Release notes: https://mariadb.com/kb/en/mariadb-1039-release-notes/ Changelog: https://mariadb.com/kb/en/mariadb-1039-changelog/ - change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE) This bump also fixes broken atomic support for BR2_TOOLCHAIN_HAS_LIBATOMIC=y with mariadb-10.2: [ 59%] Linking CXX executable mariabackup ../../storage/innobase/libinnobase.a(handler0alter.cc.o): In function `my_atomic_add64': /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:274: undefined reference to `__sync_fetch_and_add_8' with this defconfig BR2_arcle=y BR2_archs38=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arcle-hs38-full-2018.02-926-gb393c24.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_7=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_PACKAGE_MYSQL=y BR2_PACKAGE_MARIADB=y BR2_PACKAGE_MARIADB_SERVER=y Adding "-latomic" to CXXFLAGS and/or adding -DHAVE_GCC_ATOMIC_BUILTINS=1 to CONF_OPTS, like we do for mariadb-10.3, does not fix the build error with mariadb-10.2. There the build would stop even earlier without these options: /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:138:2: error: #error atomic ops for this platform are not implemented #error atomic ops for this platform are not implemented Mariadb-10.3 contains improved atomic support, this build error does not occur here. To prevent adding "depends on BR2_TOOLCHAIN_HAS_SYNC_8" to mariadb-10.2 and then removing it now we bump and fix the atomic problem in one commit instead. Updated license hash of README.md after upstream commits: https://github.com/MariaDB/server/commits/10.3/README.md my-small.cnf.sh is not provided anymore by upstream: https://github.com/MariaDB/server/commit/7fee164faf8fce7be4ebe322d2178efd3d075eae [Peter Seiderer: bumped to version 10.3.7] Signed-off-by: Peter Seiderer <ps.report@gmx.net> [Bernd: bumped to version 10.3.9, fixed atomic support, fixed my-small.cnf.sh, updated license hash] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> --- package/mariadb/mariadb.hash | 12 ++++++------ package/mariadb/mariadb.mk | 14 ++++++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package/mariadb/mariadb.hash b/package/mariadb/mariadb.hash index d44b4f35ab..41e60037be 100644 --- a/package/mariadb/mariadb.hash +++ b/package/mariadb/mariadb.hash @@ -1,9 +1,9 @@ -# From https://downloads.mariadb.org/mariadb/10.2.17/ -md5 97dac7c5c288dbbbdd97768972daeb2e mariadb-10.2.17.tar.gz -sha1 38f2ba16297e14baa2f641d2273bbb92f56d0b94 mariadb-10.2.17.tar.gz -sha256 e7b3078f8de874a4d451242a8a3eed49bf6f916dcd52fc3efa55886f5f35be27 mariadb-10.2.17.tar.gz -sha512 9714f786abde43b418d8b5accbbd485de213b90db18c879625ce30777526d28fdafd3bdb43922ab6872b300cfa06895b5b3fad5eb0c0e804ad66a1fd1793a141 mariadb-10.2.17.tar.gz +# From https://downloads.mariadb.org/mariadb/10.3.9 +md5 39c871e65134aabbc12c856691912435 mariadb-10.3.9.tar.gz +sha1 51e9870847daa76f1e82ade97d9cf60a31df7656 mariadb-10.3.9.tar.gz +sha256 561c6969bbd24dbb22d1d196a6b037665389b91e6dab881f39c5616389f156f4 mariadb-10.3.9.tar.gz +sha512 7c7a678fb0c85da64b6df3df17b8cf7f2ccf862e27dcf8535f7403f8693c76b3b1a912f4b6ca876a591ada60a99577a947bfe7a63c602f754332e1e4f689e6e7 mariadb-10.3.9.tar.gz # Hash for license files -sha256 dec3c92fdc58070facec08db681aa6b9cb05fd21e463358161c1df92e1c0653f README.md +sha256 5baa5057c525cacc9f7814215582ac150e5bb0b0007aa8f6ebc50a5c1b7a496d README.md sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/mariadb/mariadb.mk b/package/mariadb/mariadb.mk index 7074e3510e..f3c8ed4081 100644 --- a/package/mariadb/mariadb.mk +++ b/package/mariadb/mariadb.mk @@ -4,7 +4,7 @@ # ################################################################################ -MARIADB_VERSION = 10.2.17 +MARIADB_VERSION = 10.3.9 MARIADB_SITE = https://downloads.mariadb.org/interstitial/mariadb-$(MARIADB_VERSION)/source MARIADB_LICENSE = GPL-2.0 (server), GPL-2.0 with FLOSS exception (GPL client library), LGPL-2.0 (LGPL client library) # Tarball no longer contains LGPL license text @@ -66,7 +66,14 @@ ifeq ($(BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS),) MARIADB_CONF_OPTS += -DHAVE_UCONTEXT_H=0 endif +MARIADB_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +MARIADB_CXXFLAGS += -latomic +endif + MARIADB_CONF_OPTS += \ + -DCMAKE_CXX_FLAGS="$(MARIADB_CXXFLAGS)" \ -DINSTALL_DOCDIR=share/doc/mariadb-$(MARIADB_VERSION) \ -DINSTALL_DOCREADMEDIR=share/doc/mariadb-$(MARIADB_VERSION) \ -DINSTALL_MANDIR=share/man \ @@ -80,7 +87,8 @@ MARIADB_CONF_OPTS += \ -DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET) -HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF +HOST_MARIADB_DEPENDENCIES = host-openssl +HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system # Some helpers must be compiled for host in order to crosscompile mariadb for # the target. They are then included by import_executables.cmake which is @@ -121,8 +129,6 @@ endif # We also don't need the test suite on the target define MARIADB_POST_INSTALL mkdir -p $(TARGET_DIR)/var/lib/mysql - $(INSTALL) -D -m 644 $(TARGET_DIR)/usr/share/mysql/my-small.cnf \ - $(TARGET_DIR)/etc/mysql/my.cnf $(RM) $(TARGET_DIR)/usr/bin/mysql_config $(RM) -r $(TARGET_DIR)/usr/share/mysql/test endef -- 2.18.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 20:44 ` [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 Bernd Kuhls @ 2018-08-25 21:05 ` Thomas Petazzoni 2018-08-25 21:26 ` Bernd Kuhls 0 siblings, 1 reply; 9+ messages in thread From: Thomas Petazzoni @ 2018-08-25 21:05 UTC (permalink / raw) To: buildroot Hello, On Sat, 25 Aug 2018 22:44:03 +0200, Bernd Kuhls wrote: > From: Peter Seiderer <ps.report@gmx.net> > > Release notes: https://mariadb.com/kb/en/mariadb-1039-release-notes/ > Changelog: https://mariadb.com/kb/en/mariadb-1039-changelog/ > > - change WITH_SSL for host build from bundled to system (and add > host-openssl dependency) to avoid the following configure failure: > > CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): > Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) > (Required is at least version "3.3.24") > Call Stack (most recent call first): > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) > /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > libmariadb/CMakeLists.txt:298 (FIND_PACKAGE) We changed from -DWITH_SSL=bundled to -DWITH_SSL=OFF very recently, in commit 9276747defdd4f91ec21ba0930afdf6d947730b6. Do we really need SSL support in the host mariadb build ? The move to -DWITH_SSL=OFF in 9276747defdd4f91ec21ba0930afdf6d947730b6 was also done to fix exactly the same build issue, according to the commit log. > This bump also fixes broken atomic support for > BR2_TOOLCHAIN_HAS_LIBATOMIC=y with mariadb-10.2: > > [ 59%] Linking CXX executable mariabackup > ../../storage/innobase/libinnobase.a(handler0alter.cc.o): In function `my_atomic_add64': > /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h:274: undefined reference to `__sync_fetch_and_add_8' Is it the bump that fixes the atomic issue, or the fact that this patch adds the logic to link against libatomic when needed ? Thanks, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 21:05 ` Thomas Petazzoni @ 2018-08-25 21:26 ` Bernd Kuhls 2018-08-25 21:39 ` Thomas Petazzoni 0 siblings, 1 reply; 9+ messages in thread From: Bernd Kuhls @ 2018-08-25 21:26 UTC (permalink / raw) To: buildroot Hi Thomas, Am Sat, 25 Aug 2018 23:05:14 +0200 schrieb Thomas Petazzoni: > We changed from -DWITH_SSL=bundled to -DWITH_SSL=OFF very recently, in > commit 9276747defdd4f91ec21ba0930afdf6d947730b6. Do we really need SSL > support in the host mariadb build ? will test, thanks for the hint. >> This bump also fixes broken atomic support for >> BR2_TOOLCHAIN_HAS_LIBATOMIC=y with mariadb-10.2: >> >> [ 59%] Linking CXX executable mariabackup >> ../../storage/innobase/libinnobase.a(handler0alter.cc.o): In function >> `my_atomic_add64': >> /home/bernd/buildroot/output/build/mariadb-10.2.17/include/my_atomic.h: 274: >> undefined reference to `__sync_fetch_and_add_8' > > Is it the bump that fixes the atomic issue, or the fact that this patch > adds the logic to link against libatomic when needed ? Both ;) In unpatched next branch the build on arc fails with "error atomic ops for this platform are not implemented", no cxxflags nor CONF_OPTS will solve that. Only when bumping to 10.3 you get past this build error just to see the "undefined reference to `__sync_fetch_and_add_8'" error later on. To solve this the changes in this patch are needed. Regards, Bernd ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 21:26 ` Bernd Kuhls @ 2018-08-25 21:39 ` Thomas Petazzoni 2018-08-25 21:54 ` Bernd Kuhls 2018-08-26 11:48 ` Bernd Kuhls 0 siblings, 2 replies; 9+ messages in thread From: Thomas Petazzoni @ 2018-08-25 21:39 UTC (permalink / raw) To: buildroot Hello, On Sat, 25 Aug 2018 23:26:48 +0200, Bernd Kuhls wrote: > In unpatched next branch the build on arc fails with > "error atomic ops for this platform are not implemented", no cxxflags nor > CONF_OPTS will solve that. > > Only when bumping to 10.3 you get past this build error just to see the > "undefined reference to `__sync_fetch_and_add_8'" error later on. > To solve this the changes in this patch are needed. So it still needs some atomic intrinsics, so the package should: depends on BR2_TOOLCHAIN_HAS_ATOMIC || BR2_TOOLCHAIN_HAS_SYNC_4 Indeed, atomic intrinsics are not always available, even when you link with -latomic: gcc versions before gcc 4.8 did not have libatomic. Build a SPARC gcc 4.7 toolchain, and try to build this package, you'll be surprised :-) Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 21:39 ` Thomas Petazzoni @ 2018-08-25 21:54 ` Bernd Kuhls 2018-08-25 22:01 ` Thomas Petazzoni 2018-08-26 11:48 ` Bernd Kuhls 1 sibling, 1 reply; 9+ messages in thread From: Bernd Kuhls @ 2018-08-25 21:54 UTC (permalink / raw) To: buildroot Am Sat, 25 Aug 2018 23:39:58 +0200 schrieb Thomas Petazzoni: > Indeed, atomic intrinsics are not always available, even when you link > with -latomic: gcc versions before gcc 4.8 did not have libatomic. Build > a SPARC gcc 4.7 toolchain, and try to build this package, you'll be > surprised :-) Hi Thomas, ok, will also do that. Where can I get such a toolchain? Could you please point me to a defconfig? Regards, Bernd ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 21:54 ` Bernd Kuhls @ 2018-08-25 22:01 ` Thomas Petazzoni 0 siblings, 0 replies; 9+ messages in thread From: Thomas Petazzoni @ 2018-08-25 22:01 UTC (permalink / raw) To: buildroot Hello, On Sat, 25 Aug 2018 23:54:10 +0200, Bernd Kuhls wrote: > ok, will also do that. Where can I get such a toolchain? Could you please > point me to a defconfig? I don't have anything like that readily available, unfortunately. You'd have to pick a Buildroot version that is old enough to still support gcc 4.7, or see if Crosstool-NG can help here. Unfortunately, due to the autobuild.b.o server crash in October 2017, I lost all pre-built toolchains I had built before that :-/ Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-25 21:39 ` Thomas Petazzoni 2018-08-25 21:54 ` Bernd Kuhls @ 2018-08-26 11:48 ` Bernd Kuhls 2018-08-27 9:04 ` Thomas Petazzoni 1 sibling, 1 reply; 9+ messages in thread From: Bernd Kuhls @ 2018-08-26 11:48 UTC (permalink / raw) To: buildroot Am Sat, 25 Aug 2018 23:39:58 +0200 schrieb Thomas Petazzoni: > Hello, > > On Sat, 25 Aug 2018 23:26:48 +0200, Bernd Kuhls wrote: > >> Only when bumping to 10.3 you get past this build error just to see the >> "undefined reference to `__sync_fetch_and_add_8'" error later on. >> To solve this the changes in this patch are needed. > > So it still needs some atomic intrinsics, so the package should: > > depends on BR2_TOOLCHAIN_HAS_ATOMIC || BR2_TOOLCHAIN_HAS_SYNC_4 Hi Thomas, why "BR2_TOOLCHAIN_HAS_SYNC_4" and not "BR2_TOOLCHAIN_HAS_SYNC_8"? Regards, Bernd ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 2018-08-26 11:48 ` Bernd Kuhls @ 2018-08-27 9:04 ` Thomas Petazzoni 0 siblings, 0 replies; 9+ messages in thread From: Thomas Petazzoni @ 2018-08-27 9:04 UTC (permalink / raw) To: buildroot Hello, On Sun, 26 Aug 2018 13:48:59 +0200, Bernd Kuhls wrote: > > So it still needs some atomic intrinsics, so the package should: > > > > depends on BR2_TOOLCHAIN_HAS_ATOMIC || BR2_TOOLCHAIN_HAS_SYNC_4 > > Hi Thomas, > > why "BR2_TOOLCHAIN_HAS_SYNC_4" and not "BR2_TOOLCHAIN_HAS_SYNC_8"? I misread the error message you pasted. Indeed it should be BR2_TOOLCHAIN_HAS_SYNC_8. Sorry about that :-/ Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-08-27 9:04 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-25 20:44 [Buildroot] [PATCH/next/RFC 1/2] package/mariadb: handle missing ucontext_t Bernd Kuhls 2018-08-25 20:44 ` [Buildroot] [PATCH/next 2/2] package/mariadb: bump version to 10.3.9 Bernd Kuhls 2018-08-25 21:05 ` Thomas Petazzoni 2018-08-25 21:26 ` Bernd Kuhls 2018-08-25 21:39 ` Thomas Petazzoni 2018-08-25 21:54 ` Bernd Kuhls 2018-08-25 22:01 ` Thomas Petazzoni 2018-08-26 11:48 ` Bernd Kuhls 2018-08-27 9:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox