Bug #71803 Ndb.hpp depends on portlib/NdbTick.hpp that's not included in binary dist
Submitted: 22 Feb 2014 21:43 Modified: 27 Feb 2014 14:22
Reporter: Gustaf Thorslund Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:7.2.15, 7.3.4 OS:Any
Assigned to: Ole John Aske CPU Architecture:Any
Tags: ndbapi, regression

[22 Feb 2014 21:43] Gustaf Thorslund
Description:
MySQL Cluster version 7.2.15 and 7.3.4 Ndb.hpp now includes portlib/NdbTick.h. This header file is not shipped with binary distributions or installed during a "make install" stage of a source build. Due to this, any attempt to build a program using NDB API will fail.

This is a regression since 7.2.14 and 7.3.3.

How to repeat:
$ echo "#include <NdbApi.hpp>" > deadly_simple.cpp

$ for mysql_prefix in $HOME/local/mysql-cluster-gpl-{7.2.14,7.2.15,7.3.3,7.3.4}-*; do echo; echo $mysql_prefix; g++ -c -I$mysql_prefix/include/storage/ndb -I$mysql_prefix/include/storage/ndb/ndbapi deadly_simple.cpp && echo "[ok]"; done

/home/gustaf/local/mysql-cluster-gpl-7.2.14-linux2.6-x86_64
[ok]

/home/gustaf/local/mysql-cluster-gpl-7.2.15-linux2.6-x86_64
In file included from /home/gustaf/local/mysql-cluster-gpl-7.2.15-linux2.6-x86_64/include/storage/ndb/ndbapi/NdbApi.hpp:25:0,
                 from deadly_simple.cpp:1:
/home/gustaf/local/mysql-cluster-gpl-7.2.15-linux2.6-x86_64/include/storage/ndb/ndbapi/Ndb.hpp:977:29: fatal error: portlib/NdbTick.h: No such file or directory
 #include <portlib/NdbTick.h>
                             ^
compilation terminated.

/home/gustaf/local/mysql-cluster-gpl-7.3.3-linux-glibc2.5-x86_64
[ok]

/home/gustaf/local/mysql-cluster-gpl-7.3.4-linux-glibc2.5-x86_64
In file included from /home/gustaf/local/mysql-cluster-gpl-7.3.4-linux-glibc2.5-x86_64/include/storage/ndb/ndbapi/NdbApi.hpp:25:0,
                 from deadly_simple.cpp:1:
/home/gustaf/local/mysql-cluster-gpl-7.3.4-linux-glibc2.5-x86_64/include/storage/ndb/ndbapi/Ndb.hpp:977:29: fatal error: portlib/NdbTick.h: No such file or directory
 #include <portlib/NdbTick.h>
                             ^
compilation terminated.

$ echo BEGIN; for f in mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz mysql-cluster-gpl-7.3.4-linux-glibc2.5-x86_64.tar.gz ; do grep NdbTick <(tar tzf $f); done ; echo END
BEGIN
END

Suggested fix:
Only depend on what is shipped, or ship the dependencies.
[15 Mar 2014 16:57] Gustaf Thorslund
Appears this bug got no public comment when it got closed, so I'll sum it up:
* A patch have been committed
* The patch removes the dependency on the file not included in the distribution (or when doing make install on a source distribution).
[15 Mar 2014 17:15] MySQL Verification Team
Fix documented as follows in the NDB 7.0.42, 7.1.31, 7.2.16, and 7.3.5
changelogs:

        Refactoring that was performed in MySQL Cluster [prev. version]
        inadvertently introduced a dependency in Ndb.hpp on a file that is
not
        included in the distribution, which caused NDB API applications to
fail
        to compile. The dependency has been removed.

Closed.