Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Qt and mips/softfloat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 441

PostPosted: Thu Jan 10, 2008 11:52 am    Post subject: [SOLVED] Qt and mips/softfloat Reply with quote

I felt a bit uneasy opening a bug in bugzilla about this, mostly because my
toolchain seems unsupported by the gentoo/mips herd.

Anyway here goes: I can't compile qt-3.3.8 for mips32-le; it bails at the final
link stage with a few MIPS relocation errors. So if anyone has successfully
built Qt-3 with a softfloat-little-endian mips toolchain, could you please tell
me your exact toolchain version and used CFLAGS?

Thanks!


Error output below if anyone is interested:

Code:

istyle.o .obj/release-shared-mt/moc_qwindowsstyle.o .obj/release-shared-mt/moc_qmotifstyle.o  -L/usr/X11R6/lib -lmng -ljpeg -lpng -lz -lXi
-lXrender -lXrandr -lXcursor -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread
.obj/release-shared-mt/qapplication_x11.o: In function `qt_net_supports(unsigned long)':
qapplication_x11.cpp:(.text+0x13c): relocation truncated to fit: R_MIPS_GOT16 against `qt_net_supported_list'
.obj/release-shared-mt/qapplication_x11.o: In function `QApplication::setEffectEnabled(Qt::UIEffect, bool)':
qapplication_x11.cpp:(.text+0x57c): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::fade_menu'
qapplication_x11.cpp:(.text+0x594): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::fade_menu'
qapplication_x11.cpp:(.text+0x5a4): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::fade_menu'
qapplication_x11.cpp:(.text+0x5b0): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::animate_combo'
.obj/release-shared-mt/qapplication_x11.o: In function `__static_initialization_and_destruction_0(int, int)':
qapplication_x11.cpp:(.text+0x778): relocation truncated to fit: R_MIPS_CALL16 against `QMetaObjectCleanUp::QMetaObjectCleanUp(char const*,
QMetaObject* (*)())'
.obj/release-shared-mt/qapplication_x11.o: In function `QSmSocketReceiver::qt_emit(int, QUObject*)':
qapplication_x11.cpp:(.text+0xe84): relocation truncated to fit: R_MIPS_CALL16 against `QObject::qt_emit(int, QUObject*)'
.obj/release-shared-mt/qapplication_x11.o: In function `QSmSocketReceiver::socketActivated(int)':
qapplication_x11.cpp:(.text+0x108c): relocation truncated to fit: R_MIPS_CALL16 against `SmcGetIceConnection'
.obj/release-shared-mt/qapplication_x11.o: In function `QApplication::isEffectEnabled(Qt::UIEffect)':
qapplication_x11.cpp:(.text+0x1204): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::animate_combo'
qapplication_x11.cpp:(.text+0x1210): relocation truncated to fit: R_MIPS_GOT16 against `QApplication::fade_menu'
.obj/release-shared-mt/qapplication_x11.o: In function `qt_deferred_map_take(QWidget*)':
qapplication_x11.cpp:(.text+0x1244): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
distcc[12118] ERROR: compile (null) on localhost failed
make[1]: *** [../lib/libqt-mt.so.3.3.8] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/qt-3.3.8-r4/work/qt-x11-free-3.3.8/src'
make: *** [sub-src] Error 2
 *
 * ERROR: x11-libs/qt-3.3.8-r4 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2389:  Called die
 * The specific snippet of code:
 *       emake src-qmake src-moc sub-src || diefunc "$FUNCNAME" "$LINENO" "$?";
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-libs/qt-3.3.8-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/qt-3.3.8-r4/temp/environment'.
 *


Judging from the errors I assume it's a toolchain problem.

emerge --info says:
Code:

Portage 2.1.4_rc14 (default-linux/mips, gcc-4.2.2, glibc-2.7-r1, 2.6.20 mips)
=================================================================
System uname: 2.6.20 mips Au1200 V0.1
Timestamp of tree: Thu, 10 Jan 2008 01:47:01 +0000
distcc 2.18.3 mipsel-softfloat-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
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.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18.50.0.3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="mips ~mips"
CBUILD="mipsel-softfloat-linux-gnu"
CFLAGS="-Os -mips32 -msoft-float -pipe"
CHOST="mipsel-softfloat-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -mips32 -msoft-float -pipe"
DISTDIR="/mnt/exchg/distfiles"
FEATURES="buildpkg distcc distlocks metadata-transfer sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages/mipsel"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeo
ut=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aiglx alsa berkdb bzip2 flac gif gtk ipv6 jpeg lcms mesa midi mp3 ogg opengl png qt sdl svg tiff truetype vorbis xcb xorg zlib" ALSA_
PCM_PLUGINS="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" APACHE2_MODULES="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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk
 hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_F
LAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Last edited by roarinelk on Thu Jan 31, 2008 11:46 am; edited 1 time in total
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Sat Jan 12, 2008 7:31 am    Post subject: Reply with quote

Can't say I've ever tried any softfloat stuff... everything supported officially by Gentoo works without it.

I've found Qt does fail to compile if it's compiled for processors higher than MIPS1 -- the symptom is uic dying with a Bus Error and taking the entire build with it.

I've rang the bus company so I can issue uic with a new bus timetable... but this will take some time. ;-) Compiling with CFLAGS=CXXFLAGS="-O2 -mips1 -pipe" works.

This is quite a different problem to what you've had, which is a full blown linker error. binutils-2.18 has been known to have quite a few issues, especially the H. J Lu versions (such as what you're running) so I'd suggest switching back to GNU binutils 2.17 (not 2.17.19.532.52.67.3 or whatever).
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 441

PostPosted: Sat Jan 12, 2008 3:15 pm    Post subject: Reply with quote

Redhatter wrote:
Can't say I've ever tried any softfloat stuff... everything supported officially by Gentoo works without it.



The Alchemy's don't have FPU, and a test app I have only displays 'nan's with in-kernel emulation. And since rebuilding the whole system
with softfloat, it feels _much_ snappier, especially Xfce.

Quote:

I've found Qt does fail to compile if it's compiled for processors higher than MIPS1 -- the symptom is uic dying with a Bus Error and taking the entire build with it.

I've rang the bus company so I can issue uic with a new bus timetable... but this will take some time. ;-) Compiling with CFLAGS=CXXFLAGS="-O2 -mips1 -pipe" works.


QT-4.3.3 fails in a similar way; the built uic segfaults on every test the buildscript does (and stops after Xrandr "non"detection)

Actually, both qt-3 and qt-4 build fine with a "standard" (mipsel-unknown-linux-gnu) toolchain, even with binutils-2.18. But as I mentioned, softfloat is faster
at least for my puny fpu-less cpus ;)

Quote:

I'd suggest switching back to GNU binutils 2.17 (not 2.17.19.532.52.67.3 or whatever).


These errors also appear with the default 2.18[-r1] builds in portage; but I'll try with an older version.
Even found a few weeks old patch for some MIPS GOT issues on the binutils ML.

Thanks for your answer,
-- mano
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 441

PostPosted: Thu Jan 31, 2008 11:57 am    Post subject: Reply with quote

Had to recompile glibc and qt-3.3.8 with the following additional CFLAGS:
"-mxgot -mlong-calls". "mxgot" gets rid of all the R_MIPS_GOT16 errors; but then
a single R_MIPS_CALL16 against __fxstat64@GLIBC remained (libc_nonshared.a),
which is eliminated when glibc is recompiled with "-mlong-calls".

I really hate MIPS and its absurd ABI...

EDIT2: KDE-3.5.8 finished without a hitch. It even runs at acceptable speeds with
X on top of unaccelerated dumb framebuffer...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum