Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389963 - >=net-libs/webkit-gtk-1.4 broken on sparc with gcc-4.5.x
Summary: >=net-libs/webkit-gtk-1.4 broken on sparc with gcc-4.5.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugs.webkit.org/show_bug.cgi?...
Whiteboard:
Keywords:
: 389945 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-09 14:01 UTC by Dustin Polke
Modified: 2012-03-18 11:05 UTC (History)
1 user (show)

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


Attachments
webkit-gtk-1.2.3-fix-pool-sparc.patch.out (webkit-gtk-1.2.3-fix-pool-sparc.patch.out,6.79 KB, text/plain)
2011-11-09 14:01 UTC, Dustin Polke
Details
build.log (build.log,121.88 KB, text/plain)
2011-11-10 11:49 UTC, Dustin Polke
Details
webkit-gtk-1.6.1-__exchange_and_add-sparc.patch (webkit-gtk-1.6.1-__exchange_and_add-sparc.patch,644 bytes, patch)
2011-11-14 00:22 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin Polke 2011-11-09 14:01:26 UTC
Created attachment 292019 [details]
webkit-gtk-1.2.3-fix-pool-sparc.patch.out

See subject
Comment 1 Pacho Ramos gentoo-dev 2011-11-09 14:50:57 UTC
I thought it was already dropped from it too :S

Please, try to manually edit that ebuild and comment that line to skip the patch and see it it builds or not
Comment 2 Dustin Polke 2011-11-10 11:45:21 UTC
(In reply to comment #1)
> I thought it was already dropped from it too :S
> 
> Please, try to manually edit that ebuild and comment that line to skip the
> patch and see it it builds or not
Done it doesn't build:

make[1]: *** [Source/JavaScriptCore/wtf/libjavascriptcoregtk_1_0_la-ThreadingPthreads.lo] Error 1
make[1]: *** Waiting for unfinished jobs....

Will attach build.log soon
Comment 3 Dustin Polke 2011-11-10 11:49:06 UTC
Created attachment 292115 [details]
build.log

[ebuild     U ~] net-libs/webkit-gtk-1.6.1-r200 [1.2.7] USE="gstreamer* introspection* jit test (-aqua) -coverage -debug -spell% -webgl% (-doc%)"


Portage 2.1.10.11 (default/linux/sparc/experimental/multilib/server, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 sparc64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-sparc64-sun4u-with-gentoo-2.0.3
Timestamp of tree: Thu, 10 Nov 2011 07:45:01 +0000
distcc 3.1 sparc-unknown-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.2-r3
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo modified-ebuilds DuPol betagarden
ACCEPT_KEYWORDS="sparc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe -ggdb"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --autounmask=n"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms splitdebug strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/     ftp://gentoo.tiscali.nl/pub/mirror/gentoo/     ftp://mirror.cambrium.nl/pub/os/linux/gentoo/     ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo     ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=500"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/modified /var/lib/layman/DuPol /var/lib/layman/betagarden"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X acl admin bash-completion branding bzip2 cli coverpage cracklib crypt cups cxx dbus dri fortran gd git gpm iconv iproute2 javascript jpeg kerberos keyscrub logrotate loop-aes mime modules mudflap multilib nls nptl nptlonly openmp pam pcre png posix pppd readline sasl session sparc ssl sysfs syslog system-sqlite tcpd threads tiff truetype unicode userlocales xml xorg xvfb zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="auth_basic auth_core authn_file authz_core authz_host authz_user dav dir log_config mime unixd" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="mach64" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS
Comment 4 Pacho Ramos gentoo-dev 2011-11-10 19:59:05 UTC
Probably old pool patch needs to be updated... but this is really a headache and I don't understand why upstream is so slow accepting patches :S

Sadly, I don't have time now for taking care of this :(
Comment 5 Dustin Polke 2011-11-11 09:37:40 UTC
(In reply to comment #4)
> Probably old pool patch needs to be updated... but this is really a headache
> and I don't understand why upstream is so slow accepting patches :S
> 
> Sadly, I don't have time now for taking care of this :(

This means that as this version and 1.4.3-r200 (bug #389945) don't compile right now, sparc has no usable version for security bug #254209 right now...

Please decide, whether sparc keyword needs to be dropped on webkit-gtk with all the negative side-effects.
Comment 7 Dustin Polke 2011-11-13 16:30:33 UTC
(In reply to comment #6)
> Can you try this patch?
> http://patch-tracker.debian.org/patch/series/dl/webkit/1.6.1-5/01_double-conversion.patch

It applies and compiles until it fails identically to bug #389945. Do you want the build log?
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-14 00:22:36 UTC
Created attachment 292453 [details, diff]
webkit-gtk-1.6.1-__exchange_and_add-sparc.patch

(In reply to comment #7)
> It applies and compiles until it fails identically to bug #389945. Do you want
> the build log?

Can you try the attached patch (in addition to the one in comment #6)? I think it might solve the "undefined reference to __sync_fetch_and_add_4" problem.
Comment 9 Dustin Polke 2011-11-16 08:39:52 UTC
(In reply to comment #8)
> Created attachment 292453 [details, diff] [details, diff]
> webkit-gtk-1.6.1-__exchange_and_add-sparc.patch
> 
> (In reply to comment #7)
> > It applies and compiles until it fails identically to bug #389945. Do you want
> > the build log?
> 
> Can you try the attached patch (in addition to the one in comment #6)? I think
> it might solve the "undefined reference to __sync_fetch_and_add_4" problem.

Unfortunately, it doesn't slve the problem. Here the relevant snippet from build.log:

Tools/DumpRenderTree/Programs_DumpRenderTree-LayoutTestController.o: In function `__exchange_and_add':
/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: undefined reference to `__sync_fetch_and_add_4'
Tools/DumpRenderTree/Programs_DumpRenderTree-LayoutTestController.o:/usr/lib/gcc/sparc-unknown-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h:46: more undefined references to `__sync_fetch_and_add_4
' follow
collect2: ld returned 1 exit status
make[1]: *** [Programs/DumpRenderTree] Error 1
make[1]: *** Waiting for unfinished jobs....

If you want the complete build log, please ask for it. I need to compress it as it is too large to attach directly.
Comment 10 Pacho Ramos gentoo-dev 2011-11-20 20:51:47 UTC
Maybe openbsd patches could help:
http://www.openbsd.org/cgi-bin/cvsweb/ports/www/webkit/patches/

But I don't have a sparc machine to test :S
Comment 11 Pacho Ramos gentoo-dev 2011-11-22 01:35:17 UTC
*** Bug 389945 has been marked as a duplicate of this bug. ***
Comment 12 Dustin Polke 2011-11-24 12:32:48 UTC
(In reply to comment #10)
> Maybe openbsd patches could help:
> http://www.openbsd.org/cgi-bin/cvsweb/ports/www/webkit/patches/
> 
> But I don't have a sparc machine to test :S
Just a quick note: I am trying with those patches, but up to now with no avail. Still failing the same way as reported before...
Comment 13 Pacho Ramos gentoo-dev 2011-11-24 13:01:42 UTC
I guess you should try to build webkit-1.6.1 manually and, if still failing, report to upstream, as I have failed to find any other people supplying webkit for sparc
Comment 15 Dustin Polke 2011-11-27 21:10:16 UTC
I have narrowed the problem down:
webkit-gtk-1.4.3-r200 builds as is with gcc-4.4.5 but fails with gcc-4.5.3-r1 :-/

(In reply to comment #14)
> Here is another one for sparc and sparc64 :/
> http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/www/webkit-gtk/patches/patch-ag?rev=1.4;content-type=text%2Fplain
> http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/www/webkit-gtk/patches/patch-ah?rev=1.4;content-type=text%2Fplain

I can try with these as well, but maybe you want talk to members of toolchain herd first. Either gcc-4.5.3-r1 is broken or stricter compared to 4.4.5 (though I doubt that)
Comment 16 Pacho Ramos gentoo-dev 2011-11-28 00:20:10 UTC
Will CC tolchain here then
Comment 17 Pacho Ramos gentoo-dev 2011-11-28 00:20:52 UTC
Maybe would also be interesting to test with gcc-4.6
Comment 18 Pacho Ramos gentoo-dev 2011-11-28 17:12:13 UTC
(In reply to comment #15)
> I have narrowed the problem down:
> webkit-gtk-1.4.3-r200 builds as is with gcc-4.4.5 but fails with gcc-4.5.3-r1
> :-/
> 
> (In reply to comment #14)
> > Here is another one for sparc and sparc64 :/
> > http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/www/webkit-gtk/patches/patch-ag?rev=1.4;content-type=text%2Fplain
> > http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/www/webkit-gtk/patches/patch-ah?rev=1.4;content-type=text%2Fplain
> 
> I can try with these as well, but maybe you want talk to members of toolchain
> herd first. Either gcc-4.5.3-r1 is broken or stricter compared to 4.4.5 (though
> I doubt that)

Anyway, try these patches also if possible please

Thanks
Comment 19 Pacho Ramos gentoo-dev 2011-11-28 17:26:20 UTC
One of the openbsd patches talk about an overoptimising bug on sparc64, maybe you can also try without "-O2"...
Comment 20 Dustin Polke 2011-11-29 09:17:59 UTC
(In reply to comment #18)
> Anyway, try these patches also if possible please

(In reply to comment #19)
> One of the openbsd patches talk about an overoptimising bug on sparc64, maybe
> you can also try without "-O2"...

I will try, but this will take a while. Please don't expect results before end of the week. Thanks.
Comment 21 Pacho Ramos gentoo-dev 2012-01-08 19:19:32 UTC
Any news here please? Thanks
Comment 22 Dustin Polke 2012-01-08 20:11:36 UTC
(In reply to comment #21)
> Any news here please? Thanks

I am still on gcc-4.4.5 and so far webkit-gtk-1.6.1-r201 compiles but the test suite fails.
If I remember correctly, there is still a warning about increased required alignment of target type...

I will attach the build log with -O2 later if it is failing as well.
Comment 23 Dustin Polke 2012-01-10 08:26:16 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > Any news here please? Thanks
> 
> I am still on gcc-4.4.5 and so far webkit-gtk-1.6.1-r201 compiles but the test
> suite fails.
> If I remember correctly, there is still a warning about increased required
> alignment of target type...
> 
> I will attach the build log with -O2 later if it is failing as well.
This is of course without -O2.

Unfortunately, the box ran out of memory without -O2 while linking libwebkitgtk-1.0.la.
I need to enlarge the swap partition but this takes a while because I need physical access to the box.
Comment 24 Dustin Polke 2012-01-17 10:46:58 UTC
(In reply to comment #22)
> (In reply to comment #21)
> > Any news here please? Thanks
> 
> I am still on gcc-4.4.5 and so far webkit-gtk-1.6.1-r201 compiles but the test
> suite fails.
> If I remember correctly, there is still a warning about increased required
> alignment of target type...
> 
> I will attach the build log with -O2 later if it is failing as well.
I opened bug #399153 for the test failure. Will now try without -O2 and gcc-4.5.3-r1 and see whether it compiles.
Comment 25 Raúl Porcel (RETIRED) gentoo-dev 2012-03-17 17:27:55 UTC
The failure of  undefined reference to `__sync_fetch_and_add_4'

is due to this in the ebuild:

        # Sigbuses on SPARC with mcpu and co.
        use sparc && filter-flags "-mcpu=*" "-mvis" "-mtune=*"

For some reason, in our stages we have -mcpu=ultrasparc. With that line, we filter out mcpu, meaning we use the default mcpu which is not a sparc64, which doesn't have those sync_fetch...functions. Removing that line makes webkit-gtk compile...but it sigbuses(unaligned accesses)...guess it needs more debugging. I'll check if debian has the same issue when i have time
Comment 26 Raúl Porcel (RETIRED) gentoo-dev 2012-03-17 18:57:32 UTC
This patch fixes it: http://patch-tracker.debian.org/patch/series/dl/webkit/1.6.3-2/05_sparc-needs-alignment.patch

So please, remove the mcpu, mtune filtering, feel free to keep the mvis one, and apply this patch. Please do it for both revisions of 1.6.1 so i can do bug 393007, and also do it for 1.6.3
Comment 27 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-03-17 19:24:43 UTC
(In reply to comment #25)
(In reply to comment #26)

>  17 Mar 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  webkit-gtk-1.6.1-r201.ebuild, webkit-gtk-1.6.1-r301.ebuild,
>  +files/webkit-gtk-1.6.1-sparc-needs-alignment.patch,
>  webkit-gtk-1.6.3-r200.ebuild, webkit-gtk-1.6.3-r300.ebuild:
>  Sparc fix by Raúl Porcel for bug #389963

Thank you for your investigation! The patch is applied and "-mcpu=*" and "-mtune=*" filtering is removed in all 1.6.x ebuilds.

Can this bug be closed now?
Comment 28 Pacho Ramos gentoo-dev 2012-03-18 11:00:19 UTC
Yes, I guess

Alexandre, is upstream aware of this bug? 

Thanks :)
Comment 29 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-03-18 11:05:32 UTC
(In reply to comment #28)
> Alexandre, is upstream aware of this bug? 

Probably, since the Debian patch was already applied upstream in webkit-gtk-1.7.x.