<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>210551</bug_id>
          
          <creation_ts>2008-02-18 01:02 0000</creation_ts>
          <short_desc>Get qt-3.3.8 building on mips</short_desc>
          <delta_ts>2008-03-03 20:25:52 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>188857</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>dirtyepic@gentoo.org</reporter>
          <assigned_to>qt@gentoo.org</assigned_to>
          <cc>jer@gentoo.org</cc>
    
    <cc>mips@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>dirtyepic@gentoo.org</who>
            <bug_when>2008-02-18 01:02:55 0000</bug_when>
            <thetext>Building qt-3.3.8 on mips results in uic throwing a SIGBUS at us.

/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins pixmapfunction.ui -o pixmapfunction.h
/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins createtemplate.ui -o createtemplate.h
/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins actioneditor.ui -o actioneditor.h
/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins projectsettings.ui -o projectsettings.h
/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins finddialog.ui -o finddialog.h
/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/bin/uic -L /var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/plugins replacedialog.ui -o replacedialog.h
make[3]: *** [pixmapfunction.h] Bus error
make[3]: *** Deleting file `pixmapfunction.h&apos;
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [createtemplate.h] Bus error
make[3]: *** Deleting file `createtemplate.h&apos;
make[3]: Leaving directory `/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/tools/designer/designer&apos;
make[2]: *** [sub-designer] Error 2
make[2]: Leaving directory `/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/tools/designer&apos;
make[1]: *** [sub-designer] Error 2
make[1]: Leaving directory `/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/tools&apos;
make: *** [sub-tools] Error 2
 *
 * ERROR: x11-libs/qt-3.3.8-r4 failed.


The attached patch from Debian was originally used to fix the same error on HPPA, but it works well enough for us.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342545#165

Upstream status is unknown, but considering it&apos;s Debian and a cornercase arch I bet they&apos;ve never seen this patch.  It fixes a legitimate problem in qlocale.cpp though so they would probably be interested.

According to Redhatter, we&apos;ve been previously working around this by building with -mips1.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirtyepic@gentoo.org</who>
            <bug_when>2008-02-18 01:04:49 0000</bug_when>
            <thetext>Created an attachment (id=143841)
qt-3.3.8-mips.patch

Fix the bogus assumption in src/tools/qlocale.cpp that a char[] can be cast to a double *.  Steve Langasek &lt;vorlon@paer.debian.org&gt; </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirtyepic@gentoo.org</who>
            <bug_when>2008-02-18 01:05:38 0000</bug_when>
            <thetext>mneme ~ # emerge --info
Portage 2.1.4.4 (default-linux/mips/2007.1-dev/generic-be/o32, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23.14-mipsgit-20080206 mips64)
=================================================================
System uname: 2.6.23.14-mipsgit-20080206 mips64 R5000 V2.1 FPU V1.0
Timestamp of tree: Thu, 14 Feb 2008 01:00:04 +0000
distcc 2.18.3 mips-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.17-r2, 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS=&quot;mips ~mips&quot;
CBUILD=&quot;mips-unknown-linux-gnu&quot;
CFLAGS=&quot;-O2 -march=r5000 -mabi=32 -fomit-frame-pointer -pipe&quot;
CHOST=&quot;mips-unknown-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-O2 -march=r5000 -mabi=32 -fomit-frame-pointer -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig ccache digest distcc distlocks fixpackages metadata-transfer parallel-fetch sfperms splitdebug strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://gentoo.arcticnetwork.ca/source/ http://gentoo.osuosl.org http://distfiles.gentoo.org&quot;
LANG=&quot;en_US.utf8&quot;
LDFLAGS=&quot;-Wl,-O1&quot;
LINGUAS=&quot;en en_US&quot;
MAKEOPTS=&quot;-j6&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/home/dirtyepic/overlay&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;X akode bash-completion berkdb bitmap-fonts bzip2 cairo cli cracklib crypt fam fbcon fftw flac gdbm gif gmp gnutls gtk iconv imlib isdnlog jpeg libwww lzo midi mips mp3 ncurses network-cron nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png pppd python qt3 readline reflection sdl session sndfile spell spl sqlite ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode urandom vim-syntax vorbis xml xorg xv zlib&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;mouse keyboard&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en en_US&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;fbdev&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jer@gentoo.org</who>
            <bug_when>2008-03-03 19:06:49 0000</bug_when>
            <thetext>It&apos;s been building fine on HPPA without that patch. Maybe it&apos;s related to a specific gcc version. I can&apos;t think of another reason why it just works for Gentoo and not for Debian.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jer@gentoo.org</who>
            <bug_when>2008-03-03 19:26:08 0000</bug_when>
            <thetext>OK, I get the picture now. On Debian&apos;s test build hosts, unaligned access results in a SIGBUS being sent and causes a build failure. The bug mentioned in the description explains that the test builds failed for that reason. Gentoo/HPPA kernels do not respond to unaligned access events with a SIGBUS being returned, but simply note it in dmesg quietly and get on with life, like this:

Mar  3 20:25:00 elmer fcron[13578]: Job php /var/www/localhost/htdocs/cacti/cmd.
php &gt;&gt; /var/log/cacti_cmd 2&gt;&amp;1 started for user root (pid 13579)
Mar  3 20:25:00 elmer [60756.184000] php(13580): unaligned access to 0x4005604d
at ip=0x004f4ebf
Mar  3 20:25:00 elmer [60756.184000] php(13580): unaligned access to 0x4005604d
at ip=0x004f5037
Mar  3 20:25:00 elmer [60756.184000] php(13580): unaligned access to 0x4005604e
at ip=0x004f48af
Mar  3 20:25:00 elmer [60756.184000] php(13580): unaligned access to 0x4005604e
at ip=0x004f5037
Mar  3 20:25:04 elmer fcron[13578]: Job php /var/www/localhost/htdocs/cacti/cmd.
php &gt;&gt; /var/log/cacti_cmd 2&gt;&amp;1 completed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ingmar@gentoo.org</who>
            <bug_when>2008-03-03 20:25:52 0000</bug_when>
            <thetext>Applied, thanks :)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>143841</attachid>
            <date>2008-02-18 01:04 0000</date>
            <desc>qt-3.3.8-mips.patch</desc>
            <filename>qt-3.3.8-mips.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHF0LXgxMS1mcmVlLTMuMy42Lm9yaWcvc3JjL3Rvb2xzL3Fsb2NhbGUuY3BwCisrKyBxdC14
MTEtZnJlZS0zLjMuNi9zcmMvdG9vbHMvcWxvY2FsZS5jcHAKQEAgLTEyMiwxMyArMTIyLDI0IEBA
CiAjZW5kaWYKIAogLy8gV2UgY2FuJ3QgcmVseSBvbiAtTkFOLCBzaW5jZSBhbGwgb3BlcmF0aW9u
cyBvbiBhIE5BTiBzaG91bGQgcmV0dXJuIGEgTkFOLgorc3RhdGljIGRvdWJsZSBiZV9uZWdfbmFu
OyAKK3N0YXRpYyBkb3VibGUgbGVfbmVnX25hbjsKIHN0YXRpYyBjb25zdCB1bnNpZ25lZCBjaGFy
IGJlX25lZ19uYW5fYnl0ZXNbXSA9IHsgMHhmZiwgMHhmOCwgMCwgMCwgMCwgMCwgMCwgMCB9Owog
c3RhdGljIGNvbnN0IHVuc2lnbmVkIGNoYXIgbGVfbmVnX25hbl9ieXRlc1tdID0geyAwLCAwLCAw
LCAwLCAwLCAwLCAweGY4LCAweGZmIH07CitzdGF0aWMgYm9vbCBuZWdfbmFuX2luaXQgPSBmYWxz
ZTsKKwogc3RhdGljIGlubGluZSBkb3VibGUgbmVnTmFuKCkKIHsKKyAgICBpZiAoIW5lZ19uYW5f
aW5pdCkKKyAgICB7CisgICAgICAgIG1lbWNweSgmYmVfbmVnX25hbixiZV9uZWdfbmFuX2J5dGVz
LHNpemVvZihiZV9uZWdfbmFuX2J5dGVzKSk7CisgICAgICAgIG1lbWNweSgmbGVfbmVnX25hbixs
ZV9uZWdfbmFuX2J5dGVzLHNpemVvZihsZV9uZWdfbmFuX2J5dGVzKSk7CisgICAgICAgIG5lZ19u
YW5faW5pdCA9IHRydWU7CisgICAgfQogICAgIHJldHVybiAoQnl0ZU9yZGVyID09IEJpZ0VuZGlh
biA/Ci0gICAgICAgICAgICAqKChjb25zdCBkb3VibGUgKikgYmVfbmVnX25hbl9ieXRlcykgOgot
ICAgICAgICAgICAgKigoY29uc3QgZG91YmxlICopIGxlX25lZ19uYW5fYnl0ZXMpKTsKKyAgICAg
ICAgICAgIGJlX25lZ19uYW4gOiAKKyAgICAgICAgICAgIGxlX25lZ19uYW4pOworICAgICAgICAg
ICAgCiB9CiAKIC8vIFNpemVzIGFzIGRlZmluZWQgYnkgdGhlIElTTyBDOTkgc3RhbmRhcmQgLSBm
YWxsYmFjawo=
</data>        

          </attachment>
    </bug>

</bugzilla>