Bug #86971 mysql_config --libs of mysql-connector/c 6.1.0 on macOS is wrong
Submitted: 6 Jul 2017 13:12 Modified: 12 Jul 2017 11:07
Reporter: Naoki Inada Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S2 (Serious)
Version:6.1.10, 6.1.11 OS:MacOS
Assigned to: CPU Architecture:Any

[6 Jul 2017 13:12] Naoki Inada
Description:
See this output:

```
$ mysql_config
Usage: /usr/local/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include ]
        --cxxflags       [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include ]
        --include        [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include]
        --libs           [-L/usr/local/Cellar/mysql-connector-c/6.1.10/lib -l ]
        --libs_r         [-L/usr/local/Cellar/mysql-connector-c/6.1.10/lib -l ]
        --plugindir      [/usr/local/Cellar/mysql-connector-c/6.1.10/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [6.1.10]
        --variable=VAR   VAR is one of:
                pkgincludedir [/usr/local/Cellar/mysql-connector-c/6.1.10/include]
                pkglibdir     [/usr/local/Cellar/mysql-connector-c/6.1.10/lib]
                plugindir     [/usr/local/Cellar/mysql-connector-c/6.1.10/lib/plugin]
```

`--libs` and `--libs_r` should have ` -lmysqlclient -lssl -lcrypto`, but it only have `-l`.

How to repeat:
1. Install MySQL Connector/C 6.1.10
2. run mysql_config
[12 Jul 2017 11:07] MySQL Verification Team
Hello Naoki INADA!

Thank you for the report.

Thanks,
Umesh
[22 Sep 2017 10:31] LUKASZ JERNAS
Seems to be still present in 6.1.11

Usage: /usr/local/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
        --cxxflags       [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include ]
        --include        [-I/usr/local/Cellar/mysql-connector-c/6.1.11/include]
        --libs           [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
        --libs_r         [-L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -l ]
        --plugindir      [/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [6.1.11]
        --variable=VAR   VAR is one of:
                pkgincludedir [/usr/local/Cellar/mysql-connector-c/6.1.11/include]
                pkglibdir     [/usr/local/Cellar/mysql-connector-c/6.1.11/lib]
                plugindir     [/usr/local/Cellar/mysql-connector-c/6.1.11/lib/plugin]
[5 Sep 2018 15:25] Zhang Liyang
Still present, please fix this, thank you.
[15 Feb 2019 9:29] Eric Lemanissier
same problem on linux here:

Usage: /home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/include ]
        --cxxflags       [-I/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/include ]
        --include        [-I/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/include]
        --libs           [-L/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/lib -l ]
        --libs_r         [-L/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/lib -l ]
        --plugindir      [/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [6.1.11]
        --variable=VAR   VAR is one of:
                pkgincludedir [/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/include]
                pkglibdir     [/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/lib]
                plugindir     [/home/eric/.conan/data/mysql-connector-c/6.1.11/bincrafters/stable/package/6c1bee452be30f4b43cd3cf270a75e56ed1502c1/lib/plugin]
[5 Jul 2019 19:32] Bruno Daemon
Hey folks

Trying to get mysqlclient installed but running into the error below. While looking for a solution I got here.

===========
Collecting mysqlclient
  Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a524...
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/_r/44r2xl4j2ls7b99hrvk94l5c0000gn/T/pip-install-l29ei28x/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "/private/var/folders/_r/44r2xl4j2ls7b99hrvk94l5c0000gn/T/pip-install-l29ei28x/mysqlclient/setup_posix.py", line 53, in get_config
        libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
      File "/private/var/folders/_r/44r2xl4j2ls7b99hrvk94l5c0000gn/T/pip-install-l29ei28x/mysqlclient/setup_posix.py", line 53, in <listcomp>
        libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
      File "/private/var/folders/_r/44r2xl4j2ls7b99hrvk94l5c0000gn/T/pip-install-l29ei28x/mysqlclient/setup_posix.py", line 12, in dequote
        raise Exception("Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?")
    Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_r/44r2xl4j2ls7b99hrvk94l5c0000gn/T/pip-install-l29ei28x/mysqlclient/
(djangodev) Brunos-MacBook-Air:mysqlclient-python-master$
===========