← Back to team overview

maria-developers team mailing list archive

Re: Regression in crossbuilding MariaDB

 

Hi!

> Here're relevant lines from the log:
> ...
> -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
> ...
> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake files:
> ZLIB_LIBRARY

Indeed, the configure stage already has errors. I was thrown off by
the fact that the build proceeds and has errors a long section without
errors and then starts erroring later on.

> note that zlib detection is part of cmake, not something we've changed,
> so it's could be caused by a change in your build environment.

The build environment in the CI is identical for builds done on the
same day, so the regression must be in MariaDB 10.11.3.

Your pointer was enough to find out the issue, thanks for it!

Seems the MariaDB source code has two copies of zlib embedded, and the
new one in libmariadb/external/zlib/CMakeLists.txt somehow bleeded
into the main MariaDB build and made ZLIB_LIBRARY fail. I already
confirmed this in
https://salsa.debian.org/otto/mariadb-server/-/pipelines/528997 where
I reverted libmariadb to older version.

Now I am working on the final fix, which might even be as simple as
just deleting both copies of the embedded zlib in MariaDB and MariaDB
Connector C sources, as embedding source code of external projects is
bad practice anyway.

I also noticed that apparently the MySQl build was broken for the same
reason and they did this:
https://github.com/mysql/mysql-server/commit/1f2b9d62#diff-9c0008f51a59d8b1a69304775d8463a8a77a101b3db3e5ad9e77f1f3ba2ae2f6

I won't do the same as we really should not be using embedded copies
of zlib, but the system zlib, always and everywhere.


My fix when I have the final version will be posted as a commit in
https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/46.

- Otto


Follow ups

References