pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

webkit24-gtk on/for powerpc



Hi,

I'm following up the bulk pkgsrc build of 2018Q2 for powerpc from
pkgsrc-bulk@, but it's perhaps more appropriate to discuss this
further here instead.  I'm trying to make webkit24-gtk build, and
not having much success:

> On Wed, Aug 01, 2018 at 12:04:32PM +0200, Havard Eidnes wrote:
>> > www/webkit24-gtk                          21 pkgsrc-users%NetBSD.org@localhost
>>
>> ./Source/JavaScriptCore/assembler/MacroAssembler.h:66:2: error: #error "The MacroAssembler is not supported on this platform."
>>  #error "The MacroAssembler is not supported on this platform."
>>   ^
>>
>> Missing powerpc support in the JavaScript jit implementation.
>
> You can probably build it without javascript JIT.
> At least on qt5-qtwebkit the flag they use is ENABLE_JIT.
> I'm not sure where it is defined, though.

It's already configured to not do webkit-jit:

==========================================================================
The supported build options for webkit24-gtk are:

        debug enchant introspection opengl webkit-jit

The currently selected options are:

        enchant introspection opengl

You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable.  Its current value is shown:

        PKG_OPTIONS.webkit-gtk (not defined)

==========================================================================

The construct near the top of options.mk is an explicit list of
ports where we *don't* enable JIT, apparently.  And ... the
configure machinery of webkit24-gtk itself also says:

checking whether to enable JIT compilation... no
checking whether to enable FTL JIT... no
...
configure: JIT compilation is disabled, also disabling FTL JIT support.
...

and

WebKit was configured with the following options:

Build configuration:
 Enable debugging (slow)                                  : no
 Compile with debug symbols (slow)                        : no
 Enable GCC build optimization                            : yes
 Code coverage support                                    : no
 Optimized memory allocator                               : yes
 Accelerated rendering backend                            : OpenGL (gl, glx)
 Geolocation backend                                      : none

Features:
=======
 WebKit1 support                                          : yes
 WebKit2 support                                          : no
 Accelerated Compositing                                  : yes
 Accelerated 2D canvas                                    : no
 Battery API support                                      : no
 Gamepad support                                          : no
 Geolocation support                                      : no
 HTML5 video element support                              : yes
 JIT compilation                                          : no
 FTL JIT compilation                                      : no
 Opcode stats                                             : no
 SVG fonts support                                        : yes
 SVG support                                              : yes
 Spellcheck support                                       : yes
 Credential storage support                               : yes
 Web Audio support                                        : yes
 WebGL                                                    : yes


GTK+ configuration:
 GTK+ version                                             : 2.0
 GDK targets                                              : x11
 Introspection support                                    : yes
 Generate documentation                                   : no

...

Hmm, in Source/WTF/wtf/Platform.h I find this patch is added:

@@ -837,10 +850,12 @@
 #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
 #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
 #else
+#if !CPU(SPARC) && !CPU(SPARC64)
 #undef ENABLE_ASSEMBLER
 #define ENABLE_ASSEMBLER 1
 #endif
 #endif
+#endif
 
 /* If the Disassembler is enabled, then the Assembler must be enabled as well: */
 #if ENABLE(DISASSEMBLER)

Eh, what?!?  Why special-case SPARC and SPARC64 here, and
otherwise let it force-on the assembler in other cases?  That
can't be right.  Hmm, I think this points to a deeper problem.
Earlier in Platform.h we have

/* If the jit is not available, enable the LLInt C Loop: */
#if !ENABLE(JIT)
#undef ENABLE_LLINT        /* Undef so that we can redefine it. */
#undef ENABLE_LLINT_C_LOOP /* Undef so that we can redefine it. */
#undef ENABLE_DFG_JIT      /* Undef so that we can redefine it. */
#define ENABLE_LLINT 1
#define ENABLE_LLINT_C_LOOP 1
#define ENABLE_DFG_JIT 0
#endif

So if JIT isn't enabled, ENABLE_LLINT_C_LOOP will be set to 1,
and ENABLE(LLINT_C_LOOP) will be 1.

Later on we find

/* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP))
#define ENABLE_YARR_JIT 1

So, with the above logic, (ENABLE(JIT) || ENABLE(LLINT_C_LOOP))
will always be 1, so the above becomes effectively

#if !defined(ENABLE_YARR_JIT)
#define ENABLE_YARR_JIT 1

so ENABLE_YARR_JIT is unconditionally defined to 1 because it's
not mentioned anywhere earlier, and that will further drop into
the force-assembler-on part of this construct (this is again with
the special-casing of the SPARC* ports removed):

/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
   enabled as well: */
#if ENABLE(JIT) || ENABLE(YARR_JIT)
#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
#else
#undef ENABLE_ASSEMBLER
#define ENABLE_ASSEMBLER 1
#endif
#endif

So ... let me instead of the CPU-specific special-casing suggest

 /* Disable the JITs if we're forcing the cloop to be enabled */
 #if defined(ENABLE_LLINT_C_LOOP) && ENABLE_LLINT_C_LOOP
 #define ENABLE_JIT 0
+#define ENABLE_YARR_JIT 0
 #define ENABLE_DFG_JIT 0
 #define ENABLE_FTL_JIT 0
 #endif

But ... unfortunately, that doesn't get us further either:

  CXX      Source/JavaScriptCore/llint/Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o
In file included from ./Source/JavaScriptCore/jit/GPRInfo.h:29:0,
                 from ./Source/JavaScriptCore/runtime/VM.h:34,
                 from ./Source/JavaScriptCore/heap/CopiedSpaceInlines.h:33,
                 from ./Source/JavaScriptCore/runtime/ButterflyInlines.h:31,
                 from ./Source/JavaScriptCore/runtime/JSArray.h:25,
                 from ./Source/JavaScriptCore/bytecode/ArrayProfile.h:30,
                 from Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
./Source/JavaScriptCore/assembler/MacroAssembler.h:66:2: error: #error "The MacroAssembler is not supported on this platform."
 #error "The MacroAssembler is not supported on this platform."
  ^

Grr!  It seems I can't convince Platform.h to have the right
settings.

And ... the build is careful to hide the actual invocation of the
compiler, so this frustrates the tradutional method of manually
repeating the compiler invocation but with "-E -dD" and inspect the
results of the preprocessing logic, sigh!  How does people deal with
this?!?  Attempts at setting LIBTOOLFLAGS=-v and passing that in the
environment doesn't appear to have any effect whatsoever either.

Hints welcome.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index