Package: mysql-5.1
Version: 5.1.49-1
Severity: important


This bug was first discovered on Ubuntu when trying Linaro GCC (which uses code 
from gcc 4.5).
This was found on armel -and now in armhf port on debian-ports as well since it 
uses Linaro GCC.
For now it doesn't affect current Debian ports as they use FSF gcc 4.4, but 
whenever the move
to 4.5 is done, it will certainly hit the package again. Ubuntu/Linaro have 
already posted a fix
to their package, patch found to be working on Debian as well. Please consider 
fixing this as it
holds back the armhf port as well -though there is no rush for squeeze, armhf 
targets squeeze+1.

More information can be found at the Ubuntu BR: 

https://bugs.launchpad.net/ubuntu/+source/mysql-5.1/+bug/579909

Thanks

Konstantinos Margaritis
Genesi USA, Senior Software engineer, armhf port maintainer
Debian Developer
diff -ruN mysql-5.1-5.1.49//debian/patches/00list mysql-5.1-5.1.49.linaro//debian/patches/00list
--- mysql-5.1-5.1.49//debian/patches/00list	2010-09-20 11:57:14.000000000 +0000
+++ mysql-5.1-5.1.49.linaro//debian/patches/00list	2010-09-20 11:59:59.596700622 +0000
@@ -7,3 +7,4 @@
 41_scripts__mysql_install_db.sh__no_test.dpatch
 44_scripts__mysql_config__libs.dpatch
 50_mysql-test__db_test.dpatch
+60_abi-check-include.dpatch
diff -ruN mysql-5.1-5.1.49//debian/patches/60_abi-check-include.dpatch mysql-5.1-5.1.49.linaro//debian/patches/60_abi-check-include.dpatch
--- mysql-5.1-5.1.49//debian/patches/60_abi-check-include.dpatch	1970-01-01 00:00:00.000000000 +0000
+++ mysql-5.1-5.1.49.linaro//debian/patches/60_abi-check-include.dpatch	2010-09-20 12:00:45.006699991 +0000
@@ -0,0 +1,81 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_abi-check-include.patch.dpatch by Loic Minier <l...@dooz.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix build failure in abi_check with newer GCCs which will exit with
+## DP: failure when an #include can't be found.
+
+...@dpatch@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' mysql-5.1-5.1.48~/Makefile.am mysql-5.1-5.1.48/Makefile.am
+--- mysql-5.1-5.1.48~/Makefile.am	2010-06-03 17:50:10.000000000 +0200
++++ mysql-5.1-5.1.48/Makefile.am	2010-07-14 00:11:50.103932000 +0200
+@@ -276,9 +276,10 @@
+ # 1) Generate preprocessor output for the files that need to
+ #    be tested for abi/api changes. use -nostdinc to prevent
+ #    generation of preprocessor output for system headers. This
+-#    results in messages in stderr saying that these headers
+-#    were not found. Redirect the stderr output to /dev/null
+-#    to prevent seeing these messages.
++#    results in messages in stderr saying that these headers were not found
++#    with older gccs and in an error with newer ones. Redirect the stderr
++#    output to /dev/null to prevent seeing these messages, and guard includes
++#    with #ifndef mysql_abi_check; define mysql_abi_check for the abi check.
+ # 2) sed the output to 
+ #    2.1) remove blank lines and lines that begin with "# "
+ #    2.2) When gcc -E is run on the Mac OS  and solaris sparc platforms it
+@@ -314,7 +315,7 @@
+ do_abi_check:
+ 	set -ex; \
+ 	for file in $(abi_headers); do \
+-	         @CC@ -E -nostdinc -dI \
++	         @CC@ -Dmysql_abi_check -E -nostdinc -dI \
+ 	                  -I$(top_srcdir)/include \
+ 	                  -I$(top_srcdir)/include/mysql \
+ 	                  -I$(top_srcdir)/sql \
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' mysql-5.1-5.1.48~/Makefile.in mysql-5.1-5.1.48/Makefile.in
+--- mysql-5.1-5.1.48~/Makefile.in	2010-06-03 17:54:43.000000000 +0200
++++ mysql-5.1-5.1.48/Makefile.in	2010-07-14 00:12:18.563932000 +0200
+@@ -1096,9 +1096,10 @@
+ # 1) Generate preprocessor output for the files that need to
+ #    be tested for abi/api changes. use -nostdinc to prevent
+ #    generation of preprocessor output for system headers. This
+-#    results in messages in stderr saying that these headers
+-#    were not found. Redirect the stderr output to /dev/null
+-#    to prevent seeing these messages.
++#    results in messages in stderr saying that these headers were not found
++#    with older gccs and in an error with newer ones. Redirect the stderr
++#    output to /dev/null to prevent seeing these messages, and guard includes
++#    with #ifndef mysql_abi_check; define mysql_abi_check for the abi check.
+ # 2) sed the output to 
+ #    2.1) remove blank lines and lines that begin with "# "
+ #    2.2) When gcc -E is run on the Mac OS  and solaris sparc platforms it
+@@ -1134,7 +1135,7 @@
+ do_abi_check:
+ 	set -ex; \
+ 	for file in $(abi_headers); do \
+-	         @CC@ -E -nostdinc -dI \
++	         @CC@ -Dmysql_abi_check -E -nostdinc -dI \
+ 	                  -I$(top_srcdir)/include \
+ 	                  -I$(top_srcdir)/include/mysql \
+ 	                  -I$(top_srcdir)/sql \
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' mysql-5.1-5.1.48~/include/mysql.h mysql-5.1-5.1.48/include/mysql.h
+--- mysql-5.1-5.1.48~/include/mysql.h	2010-06-03 17:50:21.000000000 +0200
++++ mysql-5.1-5.1.48/include/mysql.h	2010-07-14 00:09:36.133932000 +0200
+@@ -44,7 +44,9 @@
+ #endif
+ 
+ #ifndef _global_h				/* If not standard header */
++#ifndef mysql_abi_check
+ #include <sys/types.h>
++#endif
+ #ifdef __LCC__
+ #include <winsock2.h>				/* For windows */
+ #endif
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' mysql-5.1-5.1.48~/include/mysql.h.pp mysql-5.1-5.1.48/include/mysql.h.pp
+--- mysql-5.1-5.1.48~/include/mysql.h.pp	2010-06-03 17:50:12.000000000 +0200
++++ mysql-5.1-5.1.48/include/mysql.h.pp	2010-07-14 00:12:31.623932000 +0200
+@@ -1,4 +1,3 @@
+-#include <sys/types.h>
+ typedef char my_bool;
+ typedef int my_socket;
+ #include "mysql_version.h"

Reply via email to