Bug #46995 Missing build dependency between include/mysql.h and libmysql*/client.o
Submitted: 29 Aug 2009 17:14 Modified: 18 Feb 2015 12:03
Reporter: Guilhem Bichot Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-trunk 5.5-m2, 5.1 OS:Linux
Assigned to: CPU Architecture:Any

[29 Aug 2009 17:14] Guilhem Bichot
Description:
Likely exists in 5.1 too (trunk is close to 5.1).
I modify include/mysql.h at 18:50:
[INS 19:05 /m/bzrrepos/mysql-trunk2 $] ll include/mysql.h
-rw-r--r-- 1 guilhem guilhem 33586 2009-08-29 18:50 include/mysql.h
I type "make" in the top-level directory of the source tree; when it is finished, I can see that libmysql*/client.o was not recompiled:
[INS 19:04 /m/bzrrepos/mysql-trunk2 $] find . -name client.o -ls
19:00 ./sql/client.o
19:01 ./libmysqld/client.o
18:33 ./libmysql_r/.libs/client.o
18:33 ./libmysql_r/client.o
18:33 ./libmysql/.libs/client.o
18:33 ./libmysql/client.o
That is wrong, because libmysql*/client.o is made from libmysql*/client.c, which contain
#include "mysql.h"
So a change to mysql.h must trigger a rebuild of libmysql*/client.o
And it caused me a real problem, because after a change to include/mysql.h, as client.o was not rebuilt, programs were not rebuilt:
stale client.o => stale libmysql => stale mysqldump. So I was doing changes in mysql.h and not observing the effects in mysqldump.

How to repeat:
do a full build.
touch include/mysql.h
make
observe that libmysql*/client.o are older than include/mysql.h (sql/client.o and libmysqld/client.o are newer but it does not matter here).
[30 Aug 2009 7:17] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[18 Feb 2015 12:03] Jon Olav Hauglid
Posted by developer:
 
Not repeatable in trunk, likely fixed with introduction of CMake in 5.5.