Bug #4583 make clean doesn't remove sql/lex_hash.h
Submitted: 17 Jul 2004 14:08 Modified: 22 Jul 2004 16:47
Reporter: Aidan Dixon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-4.0.20 OS:Solaris (solaris9,64bit,gcc3.4.1)
Assigned to: Sergei Golubchik CPU Architecture:Any

[17 Jul 2004 14:08] Aidan Dixon
Description:
A failure to build and execute sql/gen_lex_hash.cc can cause lex_hash.h to exist but have no contents; in turn, this means sql_lex.cc will not compile.  However doing a clean build (make clean/distclean) does not fix this (assuming one fixes the cause of the failure to build/execute gen_lex_hash.cc) because lex_hash.h is not removed.  In fact, the build fails mysteriously over and over.

How to repeat:
In my case, the failure to execute gen_lex_hash.cc happened because libgcc_s.so was unavailable at run-time (bad LD_LIBRARY_PATH setting).

Suggested fix:
Uncomment these lines near the bottom of sql/Makefile:
#distclean:
#                   rm -f lex_hash.h

and possibly add the "rm" instruction to the rule for "clean-noinstPROGRAMS".
[22 Jul 2004 16:47] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

As you have probably guessed, originally we had this distclean target in Makefile.am, then it was commented out - long time ago - nobody remembers why.

I'll uncomment it again now.