Bug #47007 Unresolved reference to 'innodb_system_libs' in "mysql_config"
Submitted: 31 Aug 2009 8:52 Modified: 30 Sep 2009 19:56
Reporter: Kent Boortz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S1 (Critical)
Version:5.0, 5.4, 6.3, 7.0 OS:Any
Assigned to: Kent Boortz CPU Architecture:Any

[31 Aug 2009 8:52] Kent Boortz
Description:
In MySQL server 5.4, Cluster 6.3 and Cluster 7.0 the "mysql_config"
script has a reference "@innodb_system_libs@" that might not get
resolved during the build, and end up in the output of
"mysql_config --libs"

The cause in 5.4 is a mistake in the back merge of features from
MySQL server 6.0, it will never be set in  "storage/innobase/plug.in".

The second problem shared with all the above releases is that
there is now a source package without InnoDB, and then no
"storage/innobase/plug.in" at all. And that causes the same
problem with the output from "mysql_config --libs".

How to repeat:
All builds in 5.4 suffers from this.

Building from "mysql-cluster-com-<ver>.tar.gz"
in Cluster 6.3 and 7.0 suffers from this.

Suggested fix:
In 5.4, the references in "mysql_config" could just be removed,
unless the merge mistake was that 'innodb_system_libs' should
be in "plug.in".

In Cluster 6.3 and 7.0, the bug fix has to take into account
that "storage/innobase/plug.in" might not exist and
'innodb_system_libs' might not be set.
[31 Aug 2009 20:25] Kent Boortz
Note that a work around was done during the build of MySQL Cluster 6.3.26
and 7.0.7, so the problem will not be visible in the binary packages from
those releases. But the bug is still there in the source repository.
[6 Sep 2009 19:57] Kent Boortz
The commercial licensed source package without InnoDB contained
a broken "mysql_config" script, it failed if the "--libmysqld-libs"
flag was given. This has now been corrected.

This problem can be seen in these releases

MySQL Server 5.0.74sp1
MySQL Server 5.0.80
MySQL Server 5.0.82
MySQL Server 5.0.82sp1
MySQL Server 5.0.83
MySQL Server 5.0.84
MySQL Server 5.0.85

MySQL Server 5.1.34sp1
MySQL Server 5.1.35
MySQL Server 5.1.36
MySQL Server 5.1.37
MySQL Server 5.1.38

MySQL Cluster 6.3.17
MySQL Cluster 6.3.20
MySQL Cluster 6.3.24
MySQL Cluster 6.3.25
MySQL Cluster 7.0.5
MySQL Cluster 7.0.6
[8 Sep 2009 13:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82694

2875 Joerg Bruehe	2009-09-08
      This is the 5.4 version of the fix for bug#47007
         Unresolved reference to 'innodb_system_libs' in "mysql_config"
      
      In 5.4.2, we use InnoDB 1.0.4 which does file IO via separate
      threads, opposed to the use of asynchronous IO previously.
      
      So there is no InnoDB call to "aio_read()" which was searched
      in "librt", causing a "-lrt" value of "innodb_system_libs",
      that whole variable is gone.
      
      This fix was applied in the build of 5.4.2-beta.
     @ scripts/Makefile.am
        There is no "innodb_system_libs" variable any more,
        so it cannot be replaced by its value.
     @ scripts/mysql_config.pl.in
        InnoDB does not need any platform-specific libraries any more,
        "innodb_system_libs" may go.
     @ scripts/mysql_config.sh
        InnoDB does not need any platform-specific libraries any more,
        "innodb_system_libs" may go.
[30 Sep 2009 8:18] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20090929093622-1mooerbh12e97zux) (version source revid:alik@sun.com-20090918062754-0wafzg8plnwotzaa) (merge vers: 6.0.14-alpha) (pib:11)
[30 Sep 2009 8:20] Bugs System
Pushed into 5.4.5-beta (revid:alik@sun.com-20090925094254-tjl9eajkzwzgthoe) (version source revid:alik@sun.com-20090918152344-nl5pzeugpejb2sth) (merge vers: 5.4.3-beta) (pib:11)
[30 Sep 2009 19:56] Paul Dubois
Noted in 5.4.5, 6.0.14 changelogs.

The mysql_config script had a reference to @innodb_system_libs@ that
was not replaced with the corresponding library flags during the
build process and ended up in the output of mysql_config --libs.
[9 Oct 2009 19:37] Paul Dubois
Retagged from 5.4.5 to 5.5.0.