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

mysql_config mariadb_config lists non existant -lmariadb

    XMLWordPrintable

    Details

      Description

        --libs          [-L/usr/lib64/ -lmariadb]
        --libs_r        [-L/usr/lib64/ -lmariadb]
      

      There is no mariadb library!!

      The code I'm trying to build should be using -lmysqlclient but it's getting messed up flags from your build.

      # rpm -qi MariaDB-devel
      Name        : MariaDB-devel
      Version     : 10.5.13
      Release     : 1.el7.centos
      Architecture: x86_64
      Install Date: Mon 22 Nov 2021 11:24:01 AM PST
      Group       : Applications/Databases
      Size        : 57493407
      License     : GPLv2
      Signature   : DSA/SHA1, Sat 06 Nov 2021 02:36:23 PM PDT, Key ID cbcb082a1bb943db
      Source RPM  : MariaDB-devel-10.5.13-1.el7.centos.src.rpm
      Build Date  : Fri 05 Nov 2021 02:11:59 PM PDT
      Build Host  : centos74-amd64
      Relocations : (not relocatable)
      Vendor      : MariaDB Foundation
      URL         : http://mariadb.org
      

      # mariadb_config 
      Copyright 2011-2020 MariaDB Corporation AB
      Get compiler flags for using the MariaDB Connector/C.
      Usage: mariadb_config [OPTIONS]
      Compiler: GNU 4.8.5
        --cflags        [-I/usr/include/mysql -I/usr/include/mysql/mysql]
        --include       [-I/usr/include/mysql -I/usr/include/mysql/mysql]
        --libs          [-L/usr/lib64/ -lmariadb]
        --libs_r        [-L/usr/lib64/ -lmariadb]
        --libs_sys      [-ldl -lm -lpthread -lssl -lcrypto]
        --version       [10.5.13]
        --cc_version    [3.1.15]
        --socket        [/var/lib/mysql/mysql.sock]
        --port          [3306]
        --plugindir     [/usr/lib64/mysql/plugin]
        --tlsinfo       [OpenSSL 1.0.2k]
        --variable=VAR  VAR is one of:
            pkgincludedir  [/usr/include/mysql]
            pkglibdir      [/usr/lib64]
            pkgplugindir   [/usr/lib64/mysql/plugin]
      

      same thing on centos 8

      [root@c8test ~]# rpm -qi MariaDB-devel
      Name        : MariaDB-devel
      Version     : 10.5.13
      Release     : 1.el8
      Architecture: x86_64
      Install Date: Mon 22 Nov 2021 12:34:36 PM PST
      Group       : Applications/Databases
      Size        : 50887117
      License     : GPLv2
      Signature   : DSA/SHA1, Sat 06 Nov 2021 02:29:29 PM PDT, Key ID cbcb082a1bb943db
      Source RPM  : MariaDB-devel-10.5.13-1.el8.src.rpm
      Build Date  : Fri 05 Nov 2021 01:50:56 PM PDT
      Build Host  : rhel8-amd64
      Relocations : (not relocatable)
      Vendor      : MariaDB Foundation
      URL         : http://mariadb.org
      

      and yes, if I use the command "correctly" I still get the wrong answers

      [root@sup /home/virtuals/html]#  /usr/bin/mysql_config  --libs
      -L/usr/lib64/ -lmariadb
      [root@sup /home/virtuals/html]#  /usr/bin/mariadb_config  --libs
      -L/usr/lib64/ -lmariadb
       
       
      [root@sup /home/virtuals/html]# rpm -ql MariaDB-devel | grep \.a$
      /usr/include/mysql/server/private/data
      /usr/lib64/libmariadbclient.a
      /usr/lib64/libmariadbd.a
      /usr/lib64/libmysqlclient.a
      /usr/lib64/libmysqlclient_r.a
      /usr/lib64/libmysqld.a
      /usr/lib64/libmysqlservices.a
      [root@sup /home/virtuals/html]# rpm -ql MariaDB-devel | grep \.so$
      /usr/lib64/libmysqlclient.so
      /usr/lib64/libmysqlclient_r.so
      

      there's a libmariadbd.a ... with a trailing d suffix, but no mariadb and definitely no libmariadb.so

      I'm no developer. Maybe I'm doing something stupid. I'm just a sysadmin who has to maintain a pile of packages for a number of versions of centos. Mock is usually a good help for this, but it's going to make working around this bug quite ugly as you don't usually have root perms in a mock environment, and it's someone else's 60,000 line configure script that's getting tripped up.

      Anyhow, submitting this in the hope it's legit and it saves someone else the 60 or 90 minutes it took me to figure out what the heck was going on.

      p.s. 10.5.11 and 10.5.12 are still up on the repo, they show the same behaviour.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              bmetal tom brown
              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.