Bug #10364 Mysql won't compile on uniprocessor systems
Submitted: 4 May 2005 19:26 Modified: 23 Jun 2005 13:06
Reporter: [ name withheld ]
Status: Closed
Category:Server: Compiling Severity:S2 (Serious)
Version:4.0.24 OS:Linux (Linux 2.6.11.8)
Assigned to: Sergei Golubchik Target Version:

[4 May 2005 19:26] [ name withheld ]
Description:
When mysql 4.1.11 is compiled on a non-smp machine, the my_global.h defines CONFIG_SMP
which causes compile errors during compile.  CONFIG_SMP should not be defined on a
uniprocessor system, when the kernel is built without CONFIG_SMP.  I don't know if this is
specific to linux 2.6 headers.  I am using 2.6 headers.

How to repeat:
Install a linux distro with linux 2.6 headers and a 2.6 kernel, compile mysql 4.1.11 and
the compile will fail.

Suggested fix:
--- my_global.h	2005-05-04 00:23:55.000000000 -0500
+++ my_global.h	2005-05-04 00:24:23.000000000 -0500
@@ -290,9 +290,6 @@
 #ifdef HAVE_LINUX_CONFIG_H
 #include <linux/config.h>	/* May define CONFIG_SMP */
 #endif
-#ifndef CONFIG_SMP
-#define CONFIG_SMP
-#endif
 C_MODE_START
 #include <asm/atomic.h>
 C_MODE_END
[4 May 2005 19:35] [ name withheld ]
On how to repeat, I forgot to list that your kernel must be compiled with CONFG_SMP
disabled, and the headers for that kernel properly installed.
[3 Jun 2005 9:13] Aleksey Kishkin
Hartmut, I guess this charngeset is about http://bugs.mysql.com/bug.php?id=555 but that
bug was for 4.0. So probably patch wasn't merge or so.
[3 Jun 2005 19:43] Sergei Golubchik
fixed in 4.0.25, 4.0.13, 5.0.7
[23 Jun 2005 13:06] Jon Stephens
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:

Documented fix in changelogs for 4.0.25, 4.1.13, and 5.0.8. (Assume the developer meant
4.1.13 and not 4.0.13.) Closed bug report.