[Buildroot] [PATCH 1/1] package/libodb-mysql: fix static build

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Jul 14 12:46:28 UTC 2020


On Tue, 14 Jul 2020 10:33:37 +0200
Fabrice Fontaine <fontaine.fabrice at 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


More information about the buildroot mailing list