Bug #111011 `mysql_config --libs` returns broken zlib reference
Submitted: 12 May 2023 3:16 Modified: 15 May 2023 10:26
Reporter: Adrian Ho Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.33 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysql_config

[12 May 2023 3:16] Adrian Ho
Description:
Since 8.0.33, `mysql_config --libs` returns the following when built with `-DWITH_SYSTEM_LIBS=ON -DWITH_ZLIB=system` (Homebrew):
```
$ mysql_version --version
8.0.33

$ mysql_config --libs
-L/home/linuxbrew/.linuxbrew/Cellar/mysql/8.0.33/lib -lmysqlclient -lzlib  -lzstd -lssl -lcrypto -lresolv -lm
```
Note the incorrect `-lzlib` reference. 8.0.32 (Homebrew) returns the correct lib reference, while built with exactly the same flags as 8.0.33:
```
$ mysql_version --version
8.0.32

$ mysql_config --libs
-L/home/linuxbrew/.linuxbrew/Cellar/mysql/8.0.32/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv -lm
```

How to repeat:
1. Build MySQL with `-DWITH_SYSTEM_LIBS=ON -DWITH_ZLIB=sytem`.
2. Run `mysql_config --libs`.
[12 May 2023 3:19] Adrian Ho
Preliminary diagnosis here: https://github.com/Homebrew/homebrew-core/issues/130258#issuecomment-1544380103
[15 May 2023 10:26] MySQL Verification Team
Hello Adrian Ho,

Thank you for the report and feedback.

regards,
Umesh