tags 565801 patch
thanks
Hello,
On sekmadienis 21 Kovas 2010 13:34:43 Petr Salinger wrote:
I found that changing -O level is sufficient to build this package.
The next step should be find somehow, which .o file built with -O1
causes the trouble.
dpkg-buildpackage -b -uc
wait for segfault (or hang) during
../gen/firebird/bin/gbak_static -MODE read_only -R
../builds/misc/help.gbak ../gen/firebird/help/help.f$ make clean
make -C gen -f ../gen/Makefile.boot.gpre gpre_boot
make -C gen -f ../gen/Makefile.libfbstatic libfbstatic
alter gen/make.platform to -O0
rm gen/firebird/lib/libfbstatic.a
rm temp/boot/dsql/*
make -C gen -f ../gen/Makefile.libfbstatic libfbstatic
alter gen/make.platform to -O1 or -O2
make
The problem seems be in (compilation of)
some file from the rebuilt ones.
As this bug is going to block transitions,
it might be usefull to use
CFLAGS=-O0 CXXFLAGS=-O0 ./configure $(confflags) --enable-superserver
when DEB_HOST_ARCH is kfreebsd-amd64 to workaround it in mean time.
Thanks to very helpful hints from Petr, I was able to track down what atomic
g++ flag and which object file is the problem. It appears that current
(4.4.3-2) g++ miscompiles src/dsql/parse.cpp when -fipa-reference optimization
flag (implied by -O1 or higher) is enabled. Therefore, my solution is to avoid
the problem by building src/dsql/parse.cpp ( $(OBJ)/dsql/parse.o ) with -fno-
ipa-reference:
$ cat debian/patches/fix_kfreebsd_amd64_miscompile.patch
Author: Modestas Vainius mo...@debian.org
Description: workaround FBTFS on kfreebsd-amd64
The FTBFS is due to g++ (confirmed on version 4.4.3-2) miscompilation of the
src/dsql/parse.cpp file when -fipa-reference optimization is enabled (-O1 or
higher enables it). The patch workarounds the issue by disabling ipa-
reference
for temp/boot/dsql/parse.o on kfreebsd-amd64.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565801
Forwarded: not-needed
Last-Update: 2010-03-27
--- a/builds/posix/prefix.freebsd_amd64
+++ b/builds/posix/prefix.freebsd_amd64
@@ -28,3 +28,6 @@ CLIENT_UTIL_TARGETS=gstat gsec fbguard f
Physical_IO_Module=os/posix/unix.cpp
# This is needed due to broken port of gcc
STATIC_CXXSUPPORT_LIB = -lstdc++ -lgcc_s
+
+# Workaround g++ miscompilation bug with -fipa-reference (-O1 or higher)
+$(OBJ)/dsql/parse.o: WCXXFLAGS += -fno-ipa-reference
In addition, a couple other changes are needed in order to successfully build
firebird2.5 on kfreebsd-amd64. My debian/changelog is below:
firebird2.5 (2.5.0.25920~ReleaseCandidate2.ds2-3.1) unstable; urgency=low
.
* Non-maintainer upload.
* Workaround gcc miscompilation of src/dsql/parse.cpp on kfreebsd-amd64.
Fixes FTBFS (Closes: #565801).
* Mirror file builds/posix/prefix.freebsd changes in the patches
no-rpath.patch and freebsd_targets.patch to the
builds/posix/prefix.freebsd_amd64 file. This enables firebird to build
successfully on kfreebsd-amd64.
firebird2.5 is a dependency of Qt 4 on kfreebsd-amd64. Since Qt 4.6.2
transition is very likely to start sometime next week, it is very important to
get fixed firebird2.5 to archive before Qt 4.6.2 is ready to migrate to
testing. A full diff with all my changes is attached. If maintainer upload is
not made in time, I will NMU firebird2.5 with these changes. I will send
another ping to this bug a couple of days before NMUing.
--
Modestas Vainius modes...@vainius.eu
diff -Nru firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/changelog firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/changelog
--- firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/changelog 2010-03-27 00:27:52.0 +
+++ firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/changelog 2010-03-27 00:27:55.0 +
@@ -1,3 +1,15 @@
+firebird2.5 (2.5.0.25920~ReleaseCandidate2.ds2-3.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Workaround gcc miscompilation of src/dsql/parse.cpp on kfreebsd-amd64.
+Fixes FTBFS (Closes: #565801).
+ * Mirror file builds/posix/prefix.freebsd changes in the patches
+no-rpath.patch and freebsd_targets.patch to the
+builds/posix/prefix.freebsd_amd64 file. This enables firebird to build
+successfully on kfreebsd-amd64.
+
+ -- Modestas Vainius mo...@asdfasdf.debian.net Sat, 27 Mar 2010 00:58:35 +0100
+
firebird2.5 (2.5.0.25920~ReleaseCandidate2.ds2-3) unstable; urgency=high
* *.postrm: protect db_input calls with || true as we don't want to fail when
diff -Nru firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/patches/fix_kfreebsd_amd64_miscompile.patch firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/patches/fix_kfreebsd_amd64_miscompile.patch
--- firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/patches/fix_kfreebsd_amd64_miscompile.patch 1970-01-01 00:00:00.0 +
+++ firebird2.5-2.5.0.25920~ReleaseCandidate2.ds2/debian/patches/fix_kfreebsd_amd64_miscompile.patch 2010-03-27