[MDEV-9253] mysql_config should not report embedded libs when disabled Created: 2015-12-09  Updated: 2016-01-07

Status: Confirmed
Project: MariaDB Server
Component/s: Compiling, Embedded Server
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Brian Evans Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Any



 Description   

mysql_config should not accept --libmysqld-libs when the embedded server is disabled.

Oracle does this partially in 5.7 with https://github.com/mysql/mysql-server/commit/fd6ac2b79205467bb77778ebb55f4979b6186498

But I think it should not just check WITHOUT_SERVER but WITHOUT_EMBEDDED_SERVER



 Comments   
Comment by Elena Stepanova [ 2016-01-07 ]

I don't know if there is much harm from mysql_config returning the options even if the server was built without embedded; but I think the result that MySQL achieved by their change is awfully confusing.

# Source tree was built with WITHOUT_SERVER=ON
 
$ scripts/mysql_config --libmysqld-libs
Usage: scripts/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/local/mysql/include -fabi-version=2 -fno-omit-frame-pointer]
        --cxxflags       [-I/usr/local/mysql/include -fabi-version=2 -fno-omit-frame-pointer]
        --include        [-I/usr/local/mysql/include]
        --libs           [-L/usr/local/mysql/lib -lmysqlclient -lpthread -lm -lrt -ldl]
        --libs_r         [-L/usr/local/mysql/lib -lmysqlclient -lpthread -lm -lrt -ldl]
        --plugindir      [/usr/local/mysql/lib/plugin]
        --socket         [/tmp/mysql.sock]
        --port           [0]
        --version        [5.7.10]
        --variable=VAR   VAR is one of:
                pkgincludedir [/usr/local/mysql/include]
                pkglibdir     [/usr/local/mysql/lib]
                plugindir     [/usr/local/mysql/lib/plugin]

I could understand if it properly reported the absence of the [embedded] server, or even if it returned an empty result, but complaining about improper usage of an option is silly – how can a user understand from this what is going on? Do you really want it to work this way?

Comment by Brian Evans [ 2016-01-07 ]

I could understand if it properly reported the absence of the [embedded] server, or even if it returned an empty result, but complaining about improper usage of an option is silly – how can a user understand from this what is going on? Do you really want it to work this way?

The point is to "exit 1" so that a "configure" script fails, which it hopefully would check for.
Setting it blank could have the effect of failing at the same point in the compile as a filled in version.

Generated at Thu Feb 08 07:33:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.