Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16384

Paths reported by both mariadb_config and mysql_config are fully broken

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.2.15, 10.3.7
    • N/A
    • Configuration
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pali Pali
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.