Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325185 - net-libs/xulrunner-1.9.2.4 fails on arches where atomic ops are not implemented
Summary: net-libs/xulrunner-1.9.2.4 fails on arches where atomic ops are not implemented
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: PPC Linux
: High normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 325255 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-23 09:33 UTC by Risto A. Paju
Modified: 2011-01-18 00:14 UTC (History)
8 users (show)

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


Attachments
Patch to make firefox compile with ipc (first-version.patch,7.82 KB, patch)
2011-01-17 23:04 UTC, DaNiMoTh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Risto A. Paju 2010-06-23 09:33:46 UTC
In xulrunner-1.9.2.4, atomic operations are only implemented for x86 and arm, thus the ebuild fails on PPC.

From ipc/chromium/src/base/atomicops.h:

// Include our platform specific implementation.
#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_msvc.h"
#elif defined(OS_MACOSX) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_macosx.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
#include "base/atomicops_internals_x86_gcc.h"
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)
#include "base/atomicops_internals_arm_gcc.h"
#else
#error "Atomic operations are not supported on your platform"
#endif
Comment 1 Risto A. Paju 2010-06-23 16:57:08 UTC
With USE="-ipc", the new xulrunner and firefox compile and run as intended. So as a workaround, this USE should probably be disabled for platforms not x86, amd64 or arm.

(Unfortunately, USE=ipc enables the most prominent new feature, process separation between plugins and the browser.)
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-24 04:29:45 UTC
Bug confirmed.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-24 04:40:39 UTC
Adding another one.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-24 04:40:58 UTC
*** Bug 325255 has been marked as a duplicate of this bug. ***
Comment 5 Andrew John Hughes 2010-06-24 15:23:49 UTC
The USE should be off by default on powerpc then:

powerpc-unknown-linux-gnu-g++ -o nsXPCOMStrings.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_COM_OBSOLETE -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DOSTYPE=\"Linux2.6.33-gentoo-r2\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES -DCHROMIUM_MOZILLA_BUILD  -DOS_LINUX=1 -DOS_POSIX=1  -D_IMPL_NS_COM -D_IMPL_NS_STRINGAPI -DEXPORT_XPT_API -DEXPORT_XPTC_API -DTARGET_XPCOM_ABI=\"ppc-gcc3\" -I. -I.. -I./../glue -I./../base -I./../ds -I./../io -I./../components -I./../threads -I./../threads/_xpidlgen -I./../proxy/src -I./../reflect/xptinfo/src  -I../../ipc/chromium/src -I../../ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I. -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/include/nspr -I/usr/include/nss         -fPIC  -fno-rtti -fno-handle-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -mtune=G5 -mcpu=G5 -mabi=altivec -pipe -ggdb -Wno-return-type -w -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/gtk-unix-print-2.0   -Os -freorder-blocks -fno-reorder-functions    -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsXPCOMStrings.pp nsXPCOMStrings.cpp
In file included from ../../ipc/chromium/src/base/port.h:9,
                 from ../../ipc/chromium/src/base/basictypes.h:50,
                 from nsXPComInit.cpp:41:
../../ipc/chromium/src/build/build_config.h:61:2: error: #error Please add support for your architecture in build/build_config.h
In file included from ../../ipc/chromium/src/base/atomic_ref_count.h:11,
                 from ../../ipc/chromium/src/base/ref_counted.h:8,
                 from ../../ipc/chromium/src/base/message_pump.h:8,
                 from ../../ipc/chromium/src/base/message_loop.h:14,
                 from nsXPComInit.cpp:152:
../../ipc/chromium/src/base/atomicops.h:136:2: error: #error "Atomic operations are not supported on your platform"
Comment 6 Andrew John Hughes 2010-06-24 16:47:55 UTC
And for mozilla-firefox and icecat too.
Comment 7 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-06-26 15:51:59 UTC
USE=ipc has been package.use.masked for ff/xul/icecat in the base profile, and unmasked only for x86/amd64/arm

Thanks for reporting!
Comment 8 Matt Turner gentoo-dev 2010-06-27 23:48:38 UTC
(In reply to comment #7)
> USE=ipc has been package.use.masked for ff/xul/icecat in the base profile, and
> unmasked only for x86/amd64/arm
> 
> Thanks for reporting!

Since this isn't really a 'fix', don't you think we should create bugs to implement atomic-ops for these platforms?
Comment 9 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-06-28 04:28:25 UTC
(In reply to comment #8)
> Since this isn't really a 'fix', don't you think we should create bugs to
> implement atomic-ops for these platforms?
> 

This should be taken upstream. Although I doubt they'd be interested in it since their primary arches of interest are x86/amd64/arm. They might be interested if you provide patches though.
Comment 10 DaNiMoTh 2011-01-17 23:04:02 UTC
Created attachment 260082 [details, diff]
Patch to make firefox compile with ipc

Hi, 

I wrote this patch this afternoon. 
The only thing to fix is data_pack.cc, which I don't know why the code isn't endianness-indepented: maybe you could contact a chromium/mozilla developers, which could fix it in 5 minutes (I do the most annoying thing - assembly ppc code - ).

Please tell me if I should open a new bug. 
Thanks
Comment 11 Jory A. Pratt gentoo-dev 2011-01-18 00:14:28 UTC
(In reply to comment #10)
> Created an attachment (id=260082) [details]
> Patch to make firefox compile with ipc
> 
> Hi, 
> 
> I wrote this patch this afternoon. 
> The only thing to fix is data_pack.cc, which I don't know why the code isn't
> endianness-indepented: maybe you could contact a chromium/mozilla developers,
> which could fix it in 5 minutes (I do the most annoying thing - assembly ppc
> code - ).
> 
> Please tell me if I should open a new bug. 
> Thanks
> 
I appreciate your work, but this will need to go upstream, before you take it upstream tho you will need to base it on mozilla-central. If you decide to do this please add mozilla@gentoo.org to the upstream bug reports cc so we can track it and assist where needed.