* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
@ 2020-12-14 21:43 Fabrice Fontaine
2020-12-31 16:42 ` Thomas Petazzoni
2021-01-05 21:38 ` Peter Korsgaard
0 siblings, 2 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2020-12-14 21:43 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/ba2c5ef1bb54c2751569f79beef21ff486348469
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libodb-mysql/libodb-mysql.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk
index 835e5bc6bf..a9040c65f8 100644
--- a/package/libodb-mysql/libodb-mysql.mk
+++ b/package/libodb-mysql/libodb-mysql.mk
@@ -12,6 +12,6 @@ LIBODB_MYSQL_INSTALL_STAGING = YES
LIBODB_MYSQL_LICENSE = GPL-2.0
LIBODB_MYSQL_LICENSE_FILES = LICENSE
LIBODB_MYSQL_DEPENDENCIES = libodb mysql
-LIBODB_MYSQL_CONF_ENV = LIBS="$(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)"
+LIBODB_MYSQL_CONF_ENV = LIBS=`$(STAGING_DIR)/usr/bin/mysql_config --libs`
$(eval $(autotools-package))
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
2020-12-14 21:43 [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build Fabrice Fontaine
@ 2020-12-31 16:42 ` Thomas Petazzoni
2021-01-05 21:38 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-12-31 16:42 UTC (permalink / raw)
To: buildroot
On Mon, 14 Dec 2020 22:43:13 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fixes:
> - http://autobuild.buildroot.org/results/ba2c5ef1bb54c2751569f79beef21ff486348469
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libodb-mysql/libodb-mysql.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks. I think this issue only appears with
per-package directories, and indeed the failed configuration you're
pointing has BR2_PER_PACKAGE_DIRECTORIES=y.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
2020-12-14 21:43 [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build Fabrice Fontaine
2020-12-31 16:42 ` Thomas Petazzoni
@ 2021-01-05 21:38 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2021-01-05 21:38 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fixes:
> - http://autobuild.buildroot.org/results/ba2c5ef1bb54c2751569f79beef21ff486348469
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libodb-mysql/libodb-mysql.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk
> index 835e5bc6bf..a9040c65f8 100644
> --- a/package/libodb-mysql/libodb-mysql.mk
> +++ b/package/libodb-mysql/libodb-mysql.mk
> @@ -12,6 +12,6 @@ LIBODB_MYSQL_INSTALL_STAGING = YES
> LIBODB_MYSQL_LICENSE = GPL-2.0
> LIBODB_MYSQL_LICENSE_FILES = LICENSE
> LIBODB_MYSQL_DEPENDENCIES = libodb mysql
> -LIBODB_MYSQL_CONF_ENV = LIBS="$(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)"
> +LIBODB_MYSQL_CONF_ENV = LIBS=`$(STAGING_DIR)/usr/bin/mysql_config --libs`
Committed to 2020.11.x, thanks.
I see you dropped the quotes around the output of mysql_config, is that
always guaranteed to only return a single word?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
@ 2020-07-13 21:59 Fabrice Fontaine
2020-07-14 8:20 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Fontaine @ 2020-07-13 21:59 UTC (permalink / raw)
To: buildroot
mysql needs -lz for static build
Fixes:
- http://autobuild.buildroot.org/results/a5447c5105f15606ed562b39ca84c06e7e6b78c0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libodb-mysql/libodb-mysql.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk
index 97cbcddf93..1a12220222 100644
--- a/package/libodb-mysql/libodb-mysql.mk
+++ b/package/libodb-mysql/libodb-mysql.mk
@@ -13,4 +13,9 @@ LIBODB_MYSQL_LICENSE = GPL-2.0
LIBODB_MYSQL_LICENSE_FILES = LICENSE
LIBODB_MYSQL_DEPENDENCIES = libodb mysql
+ifeq ($(BR2_STATIC_LIBS),y)
+# mysql needs -lz, so we need to specify it for static builds
+LIBODB_MYSQL_CONF_ENV += LIBS=-lz
+endif
+
$(eval $(autotools-package))
--
2.27.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
2020-07-13 21:59 Fabrice Fontaine
@ 2020-07-14 8:20 ` Thomas Petazzoni
2020-07-14 8:33 ` Fabrice Fontaine
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2020-07-14 8:20 UTC (permalink / raw)
To: buildroot
On Mon, 13 Jul 2020 23:59:43 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> mysql needs -lz for static build
>
> Fixes:
> - http://autobuild.buildroot.org/results/a5447c5105f15606ed562b39ca84c06e7e6b78c0
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libodb-mysql/libodb-mysql.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk
> index 97cbcddf93..1a12220222 100644
> --- a/package/libodb-mysql/libodb-mysql.mk
> +++ b/package/libodb-mysql/libodb-mysql.mk
> @@ -13,4 +13,9 @@ LIBODB_MYSQL_LICENSE = GPL-2.0
> LIBODB_MYSQL_LICENSE_FILES = LICENSE
> LIBODB_MYSQL_DEPENDENCIES = libodb mysql
>
> +ifeq ($(BR2_STATIC_LIBS),y)
> +# mysql needs -lz, so we need to specify it for static builds
> +LIBODB_MYSQL_CONF_ENV += LIBS=-lz
> +endif
zlib is only an optional dependency of mysql. When I build just
oracle-mysql, the libmysqlclient libraries are not linked with zlib:
0x00000001 (NEEDED) Shared library: [libcrypt.so.1]
0x00000001 (NEEDED) Shared library: [libnsl.so.1]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000e (SONAME) Library soname: [libmysqlclient.so.16]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libcrypt.so.1]
0x00000001 (NEEDED) Shared library: [libnsl.so.1]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000e (SONAME) Library soname: [libmysqlclient_r.so.16]
So you cannot forcefully link with zlib, as it may not be present.
According to
https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients-pkg-config.html,
MySQL provides a pkg-config file, but I don't have it installed.
Perhaps it is due to the fact that we use an ancient MySQL version
(5.1.x) ?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
2020-07-14 8:20 ` Thomas Petazzoni
@ 2020-07-14 8:33 ` Fabrice Fontaine
2020-07-14 12:46 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Fontaine @ 2020-07-14 8:33 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Le mar. 14 juil. 2020 ? 10:20, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> On Mon, 13 Jul 2020 23:59:43 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > mysql needs -lz for static build
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/a5447c5105f15606ed562b39ca84c06e7e6b78c0
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > package/libodb-mysql/libodb-mysql.mk | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/package/libodb-mysql/libodb-mysql.mk b/package/libodb-mysql/libodb-mysql.mk
> > index 97cbcddf93..1a12220222 100644
> > --- a/package/libodb-mysql/libodb-mysql.mk
> > +++ b/package/libodb-mysql/libodb-mysql.mk
> > @@ -13,4 +13,9 @@ LIBODB_MYSQL_LICENSE = GPL-2.0
> > LIBODB_MYSQL_LICENSE_FILES = LICENSE
> > LIBODB_MYSQL_DEPENDENCIES = libodb mysql
> >
> > +ifeq ($(BR2_STATIC_LIBS),y)
> > +# mysql needs -lz, so we need to specify it for static builds
> > +LIBODB_MYSQL_CONF_ENV += LIBS=-lz
> > +endif
>
> zlib is only an optional dependency of mysql. When I build just
> oracle-mysql, the libmysqlclient libraries are not linked with zlib:
>
> 0x00000001 (NEEDED) Shared library: [libcrypt.so.1]
> 0x00000001 (NEEDED) Shared library: [libnsl.so.1]
> 0x00000001 (NEEDED) Shared library: [libm.so.6]
> 0x00000001 (NEEDED) Shared library: [libc.so.6]
> 0x0000000e (SONAME) Library soname: [libmysqlclient.so.16]
>
> 0x00000001 (NEEDED) Shared library: [libpthread.so.0]
> 0x00000001 (NEEDED) Shared library: [libcrypt.so.1]
> 0x00000001 (NEEDED) Shared library: [libnsl.so.1]
> 0x00000001 (NEEDED) Shared library: [libm.so.6]
> 0x00000001 (NEEDED) Shared library: [libc.so.6]
> 0x0000000e (SONAME) Library soname: [libmysqlclient_r.so.16]
>
> So you cannot forcefully link with zlib, as it may not be present.
I basically copy/pasted the solution that was applied to the open2300
package 4 years ago:
https://git.buildroot.net/buildroot/commit/package/open2300?id=382fa60f9c7445e962b290c74779a0e0fd7e310f
> According to
> https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients-pkg-config.html,
> MySQL provides a pkg-config file, but I don't have it installed.
> Perhaps it is due to the fact that we use an ancient MySQL version
> (5.1.x) ?
I'll try to check it.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build
2020-07-14 8:33 ` Fabrice Fontaine
@ 2020-07-14 12:46 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-07-14 12:46 UTC (permalink / raw)
To: buildroot
On Tue, 14 Jul 2020 10:33:37 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> I basically copy/pasted the solution that was applied to the open2300
> package 4 years ago:
> https://git.buildroot.net/buildroot/commit/package/open2300?id=382fa60f9c7445e962b290c74779a0e0fd7e310f
Wow, I looked into this, and what I found is not pretty. It turns out
that when there's no zlib available, MySQL builds its own copy, and
installs it in $(STAGING_DIR). We can see during the MySQL configure:
checking for zlib compression library... system-wide zlib not found, using one bundled with MySQL
So to me, it seems like we should fix this, using the following option:
--with-zlib-dir=no|bundled|DIR
Provide MySQL with a custom location of compression
library. Given DIR, zlib binary is assumed to be in
$DIR/lib and header files in $DIR/include.
I.e probably:
ifeq ($(BR2_PACKAGE_ZLIB),y)
ORACLE_MYSQL_CONF_OPTS += --with-zlib-dir=$(STAGING_DIR)/usr
ORACLE_MYSQL_DEPENDENCIES += zlib
else
ORACLE_MYSQL_CONF_OPTS += --without-zlib-dir
endif
and of course check in the latter case that it really builds without
zlib.
Could you have a look into this ?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-05 21:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14 21:43 [Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build Fabrice Fontaine
2020-12-31 16:42 ` Thomas Petazzoni
2021-01-05 21:38 ` Peter Korsgaard
-- strict thread matches above, loose matches on Subject: below --
2020-07-13 21:59 Fabrice Fontaine
2020-07-14 8:20 ` Thomas Petazzoni
2020-07-14 8:33 ` Fabrice Fontaine
2020-07-14 12:46 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox