[MDEV-16384] Paths reported by both mariadb_config and mysql_config are fully broken Created: 2018-06-04  Updated: 2018-06-04  Resolved: 2018-06-04

Status: Closed
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.2.15, 10.3.7
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Pali Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-15820 Backward compatibility break of mysql... Closed

 Description   

Steps to reproduce:

1. Download mariadb-10.3.7-linux-glibc_214-x86_64.tar.gz and unpack it to /tmp/
2. Run mariadb_config

$ /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mariadb_config
Copyright 2011-2015 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mariadb_config [OPTIONS]
  --cflags        [-I/usr/local/mysql/include/mysql -I/usr/local/mysql/include/mysql/mysql]
  --include       [-I/usr/local/mysql/include/mysql -I/usr/local/mysql/include/mysql/mysql]
  --libs          [-L/usr/local/mysql/lib/ -lmariadb -ldl -lm -lpthread -l/usr/local/lib/libgnutls.a]
  --libs_r        [-L/usr/local/mysql/lib/ -lmariadb -ldl -lm -lpthread -l/usr/local/lib/libgnutls.a]
  --libs_sys      [-ldl -lm -lpthread -l/usr/local/lib/libgnutls.a]
  --version       [10.3.7]
  --cc_version    [3.0.5]
  --socket        [/tmp/mysql.sock]
  --port          [3306]
  --plugindir     [/usr/local/mysql/lib/plugin]
  --tlsinfo       [GnuTLS ]

All paths reported by mariadb_config points to /usr/local/mysql even real library is located in /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib/libmariadb.so

Same problem has mysql_config:

$ /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mysql_config 
Usage: /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql/include/mysql -I/usr/local/mysql/include/mysql/mysql]
        --include        [-I/usr/local/mysql/include/mysql -I/usr/local/mysql/include/mysql/mysql]
        --libs           [-L/usr/local/mysql/lib/ -lmariadb -ldl -lm -lpthread -l/usr/local/lib/libgnutls.a]
        --libs_r         [-L/usr/local/mysql/lib/ -lmariadb -ldl -lm -lpthread -l/usr/local/lib/libgnutls.a]
        --plugindir      [/usr/local/mysql/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [3306]
        --version        [10.3.7]
        --libmysqld-libs [-L/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib  -lmysqld -lpthread -lm -lrt -ldl -lcrypt -laio -lnuma]
        --variable=VAR   VAR is one of:
                pkgincludedir [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql]
                pkglibdir     [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib]
                plugindir     [/usr/local/mysql/lib/plugin]

Only pkglibdir pkgincludedir and libmysqld-libs are correct, others point to wrong location too.

Once mariadb_config is fully removed, then mysql_config starts reporting correct values:

$ rm /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mariadb_config && /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mysql_config 
Usage: /tmp/mariadb-10.3.7-linux-glibc_214-x86_64/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql -I/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql/.. ]
        --include        [-I/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql -I/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql/..]
        --libs           [-L/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib  -lmariadb -lpthread -ldl -lm -lgnutls]
        --libs_r         [-L/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib  -lmariadb -lpthread -ldl -lm -lgnutls]
        --plugindir      [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [10.3.7]
        --libmysqld-libs [-L/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib  -lmysqld -lpthread -lm -lrt -ldl -lcrypt -laio -lnuma]
        --variable=VAR   VAR is one of:
                pkgincludedir [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/include/mysql]
                pkglibdir     [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib]
                plugindir     [/tmp/mariadb-10.3.7-linux-glibc_214-x86_64/lib/plugin]

In older MariaDB versions, mysql_config reported always correct values. Now it do only when mariadb_config is fully removed.

This makes new versions of MariaDB unusable for compiling client applications as mariadb_config reports bogus and unusable values. And mysql_config does not work correctly until mariadb_config is removed from disk.

Please fix these problems.



 Comments   
Comment by Elena Stepanova [ 2018-06-04 ]

This one we already have as MDEV-15820.

Generated at Thu Feb 08 08:28:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.