Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163288 - [QA] app-office/koffice-1.6.1-r1 has poor programming practices (implicit declarations, strict aliasing)
Summary: [QA] app-office/koffice-1.6.1-r1 has poor programming practices (implicit dec...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-22 19:13 UTC by Sandro Bonazzola (RETIRED)
Modified: 2007-01-30 19:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix undeclared functions due to missing header. (karbon-missing-include.patch,423 bytes, patch)
2007-01-22 19:14 UTC, Sandro Bonazzola (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-22 19:13:41 UTC
* QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * vtext.cc:537: warning: dereferencing type-punned pointer will break strict-aliasing rules
kivio_wrap.cpp:481: warning: dereferencing type-punned pointer will break strict-aliasing rules
kivio_wrap.cpp:516: warning: dereferencing type-punned pointer will break strict-aliasing rules
[cut, a lot of others...]

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * gdk-pixbuf-xlib.c:41: warning: implicit declaration of function 'xlib_rgb_init'
gdk-pixbuf-xlib.c:59: warning: implicit declaration of function 'xlib_rgb_init_with_depth'

a patch will follow in a few seconds... Feel free to send upstream the attached patch.
ebuild side patch:

Index: koffice-1.6.1-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.6.1-r1.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 koffice-1.6.1-r1.ebuild
--- koffice-1.6.1-r1.ebuild     17 Jan 2007 01:18:23 -0000      1.1
+++ koffice-1.6.1-r1.ebuild     22 Jan 2007 19:13:00 -0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.6.1-r1.ebuild,v 1.1 2007/01/17 01:18:23 flameeyes Exp $

-inherit kde
+inherit kde flag-o-matic

 RV="${PV}"
 MY_P="koffice-${RV}"
@@ -71,6 +71,7 @@

 src_unpack() {
        kde_src_unpack
+       epatch  "${FILESDIR}"/karbon-missing-include.patch
        # FIXME - disable broken tests for now
        sed -i -e "s:TESTSDIR =.*:TESTSDIR=:" ${S}/krita/core/Makefile.am \
                `ls ${S}/krita/colorspaces/*/Makefile.am`
@@ -78,6 +79,10 @@
 }

 src_compile() {
+       # Until strict aliasing is porperly fixed...
+       filter-flags -fstrict-aliasing
+       append-flags -fno-strict-aliasing
+
        local myconf="$(use_enable mysql) $(use_enable postgres pgsql)"
        # $(use_enable opengl gl)"
Comment 1 Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-22 19:14:52 UTC
Created attachment 107819 [details, diff]
Fix undeclared functions due to missing header.
Comment 2 Charlie Shepherd (RETIRED) gentoo-dev 2007-01-30 10:12:16 UTC
Please reopen this bug when upstream puts out a version with the patch applied.
Comment 3 Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-30 18:43:04 UTC
Ok, I'll wait upstream for source code patching.
Please patch the ebuild for strict-aliasing filtering.

Index: koffice-1.6.1-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.6.1-r1.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 koffice-1.6.1-r1.ebuild
--- koffice-1.6.1-r1.ebuild     17 Jan 2007 01:18:23 -0000      1.1
+++ koffice-1.6.1-r1.ebuild     22 Jan 2007 19:13:00 -0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header:
/var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.6.1-r1.ebuild,v 1.1
2007/01/17 01:18:23 flameeyes Exp $

-inherit kde
+inherit kde flag-o-matic

 RV="${PV}"
 MY_P="koffice-${RV}"
@@ -78,6 +79,10 @@
 }

 src_compile() {
+       # Until strict aliasing is porperly fixed...
+       filter-flags -fstrict-aliasing
+       append-flags -fno-strict-aliasing
+
        local myconf="$(use_enable mysql) $(use_enable postgres pgsql)"
        # $(use_enable opengl gl)"
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-01-30 19:04:07 UTC
Beside the filtering being pointless (append-flags will cover for that), please report this upstream, and try to get the issue fixed there before adding -fno-strict-aliasing unconditionally on the whole build, especially since the problems seems not to apply to _all_ modules.
A patch to append -fno-strict-aliasing to the right modules might be better, but still try first to contact upstream; if upstream fails to address the issue, then we can think of applying this to portage.
Comment 5 Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-30 19:07:53 UTC
Upstream contacted: https://bugs.kde.org/show_bug.cgi?id=140912