Bad News: MySQL does not compile with GCC 4.5. Good News: I found a patch.
MySQL fails to build in GCC 4.5. You can see the make results
HERE<http://pastebin.com/DrTT1Ta3>.
I managed to trace the problem to CPP's new behavior of terminating when it
fails to find a header file (instead of putting nothing and emitting a
warning to stderr). So when MySQL checks CPP and it's headers with the
-nostdinc option, instead of removing the system #includes, it "crashes" on
"#include <sys/types.h>", putting only that line into Stdout. Which, of
course, makes the self-test fail
Here's the patch:
First, use SQL 5.1.46 instead of .42.
Then change the build instructions into this:
patch -Np1 -i ../mysql-5.1.46-cpp4.5-1.patch &&
./configure --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/sbin \
--localstatedir=/srv/mysql \
--enable-thread-safe-client \
--enable-assembler \
--enable-local-infile \
--with-unix-socket-path=/var/run/mysql/mysql.sock \
--without-debug \
--without-readline \
--with-plugins=innobase,myisam \
--with-extra-charsets=all \
--with-ssl &&
make
How the patch works:
Simple, it creates a directory "bugfixes" containing a sys/types.h
containing only a comment, and changes Makefile.in to add bugfixes into the
include path on the test. The comment is then removed by the piped sed
(which can be seen at the start of the bug pastebin).
I initially tried to put the fake sys/types.h inside include, but SQL
decided to include it during regular compilation.
Hope that bugfix works.
--
- Ariel Ben-Yehuda
diff -ur mysql-5.1.46/bugfixes/sys/types.h mysql-5.1.46-new/bugfixes/sys/types.h
--- mysql-5.1.46/bugfixes/sys/types.h 2010-05-06 23:22:35.000000000 +0300
+++ mysql-5.1.46-new/bugfixes/sys/types.h 2010-05-06 23:23:07.000000000 +0300
@@ -0,0 +1 @@
+# fix the CPP-4.5 bug
diff -ur mysql-5.1.46/Makefile.in mysql-5.1.46-new/Makefile.in
--- mysql-5.1.46/Makefile.in 2010-05-06 23:22:17.000000000 +0300
+++ mysql-5.1.46-new/Makefile.in 2010-05-06 23:15:35.000000000 +0300
@@ -1136,6 +1136,7 @@
for file in $(abi_headers); do \
@CC@ -E -nostdinc -dI \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/bugfixes \
-I$(top_srcdir)/include/mysql \
-I$(top_srcdir)/sql \
-I$(top_builddir)/include \
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page