package/open2300: link with -lz only if needed
PATCH 1/1 package/open2300: link with -lz only if needed
oracle-mysql won't built its own bundled zlib since commit 6fed83a03047535d4a9c849352f8c21b30177fcd so don't unconditionally link with zlib
It should be noted that oracle-mysql has a pkg-config file since version 5.7.22 and
https://github.com/mysql/mysql-server/commit/f701787602583464fce4f44d44f67471a06c9b70
but we're stuck in version 5.1.x and can't easily import this commit because upstream switched to cmake
Fixes:
- No autobuilder failures yet
--- package/open2300/open2300.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/open2300/open2300.mk +1 -1
@@ -21,7 +21,7 @@ OPEN2300_DEPENDENCIES += mysql OPEN2300_BINS += mysql2300 mysqlhistlog2300 OPEN2300_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql OPEN2300_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -ifeq ($(BR2_STATIC_LIBS),y) +ifeq ($(BR2_PACKAGE_ZLIB)$(BR2_STATIC_LIBS),yy) # mysql needs -lz, so we need to specify it for static builds OPEN2300_LDFLAGS += -lz endif
Signature · 1 line
2.27.0
PATCH 1/1 package/open2300: link with -lz only if needed
Quoted 23 lines · On Tue, 14 Jul 2020 22:16:30 +0200 Fabrice Fontaine…
oracle-mysql won't built its own bundled zlib since commit
6fed83a03047535d4a9c849352f8c21b30177fcdso don't unconditionally link with zlibIt should be noted that oracle-mysql has a pkg-config file since version 5.7.22 and
https://github.com/mysql/mysql-server/commit/f701787602583464fce4f44d44f67471a06c9b70
but we're stuck in version 5.1.x and can't easily import this commit because upstream switched to cmakeFixes:
- No autobuilder failures yetSigned-off-by Fabrice Fontaine <[email protected]>--- package/open2300/open2300.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/open2300/open2300.mk +0
-0
package/open2300/open2300.mk OPEN2300_DEPENDENCIES += mysql · line 24
Quoted 5 lines
package/open2300/open2300.mk +1
-1@@ -21,7 +21,7 @@ OPEN2300_DEPENDENCIES += mysql OPEN2300_BINS += mysql2300 mysqlhistlog2300 OPEN2300_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql OPEN2300_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -ifeq ($(BR2_STATIC_LIBS),y) +ifeq ($(BR2_PACKAGE_ZLIB)$(BR2_STATIC_LIBS),yy)
In fact, now that I think of it, why don't we use the mysql_config script here ?
I.E:
OPEN2300_CFLAGS += $(shell $(STAGING_DIR)/usr/bin/mysql_config --cflags) OPEN2300_LDFLAGS += $(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)
this way the static linking mess can be hidden inside the mysql_config script, and hopefully factored out from all the packages using mysql.
What do you think ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/open2300: link with -lz only if needed
Le mar. 14 juil. 2020 ? 22:37, Thomas Petazzoni
<[email protected]> a ?crit :
Quoted 38 lines
Quoted 23 lines · On Tue, 14 Jul 2020 22:16:30 +0200 Fabrice Fontaine…
oracle-mysql won't built its own bundled zlib since commit
6fed83a03047535d4a9c849352f8c21b30177fcdso don't unconditionally link with zlibIt should be noted that oracle-mysql has a pkg-config file since version 5.7.22 and
https://github.com/mysql/mysql-server/commit/f701787602583464fce4f44d44f67471a06c9b70
but we're stuck in version 5.1.x and can't easily import this commit because upstream switched to cmakeFixes:
- No autobuilder failures yetSigned-off-by Fabrice Fontaine <[email protected]>--- package/open2300/open2300.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/open2300/open2300.mk +0
-0package/open2300/open2300.mk OPEN2300_DEPENDENCIES += mysql · line 24
Quoted 5 lines
package/open2300/open2300.mk +1
-1@@ -21,7 +21,7 @@ OPEN2300_DEPENDENCIES += mysql OPEN2300_BINS += mysql2300 mysqlhistlog2300 OPEN2300_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql OPEN2300_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -ifeq ($(BR2_STATIC_LIBS),y) +ifeq ($(BR2_PACKAGE_ZLIB)$(BR2_STATIC_LIBS),yy)In fact, now that I think of it, why don't we use the
mysql_configscript here ?I.E:
Quoted 7 lines
OPEN2300_CFLAGS+= $(shell $(STAGING_DIR)/usr/bin/mysql_config --cflags)OPEN2300_LDFLAGS+= $(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)this way the static linking mess can be hidden inside the
mysql_configscript, and hopefully factored out from all the packages using mysql.What do you think ?
Indeed, this seems a good idea, I'll try it.
Quoted 6 lines
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice