Bug 207275 - www/webkit2-gtk3 using armv6t2 ASM instructions on armv6
Summary: www/webkit2-gtk3 using armv6t2 ASM instructions on armv6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 13:00 UTC by Sean Bruno
Modified: 2016-09-25 12:19 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
poudriere build log. (81.01 KB, text/plain)
2016-03-25 11:25 UTC, Otacílio de Araújo Ramos Neto
no flags Details
armv6 fix (2.45 KB, patch)
2016-07-20 19:10 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer freebsd_triage 2016-02-17 13:00:00 UTC
Compiling this port under qemu-arm emulating armv6 bails trying to use assmebly instructions that aren't supported under armv6:

[ 15%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/inspector/InspectorBackendDispatchers.cpp.o
cd /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore && /nxb-bin/usr/bin/c++   -DBUILDING_GTK__=1 -DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DDATA_DIR=\"share\" -DENABLE_3D_RENDERING=1 -DENABLE_PLUGIN_PROCESS_GTK2=1 -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DHAVE_CONFIG_H=1 -DHAVE_GTK_GESTURES=1 -DJavaScriptCore_EXPORTS -DMOZ_X11=1 -DSTATICALLY_LINKED_WITH_WTF -DUSER_AGENT_GTK_MAJOR_VERSION=601 -DUSER_AGENT_GTK_MINOR_VERSION=1 -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -DWTF_PLATFORM_X11=1 -DWTF_USE_3D_GRAPHICS=1 -DWTF_USE_EGL=1 -DWTF_USE_GLX=1 -DWTF_USE_GSTREAMER -DWTF_USE_LIBNOTIFY=0 -DWTF_USE_OPENGL=1 -DWTF_USE_REDIRECTED_XCOMPOSITE_WINDOW=1 -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1 -DWTF_USE_WEBAUDIO_GSTREAMER -DXP_UNIX -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5 -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/API -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/ForwardingHeaders -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/assembler -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/bindings -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/builtins -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/bytecode -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/bytecompiler -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/dfg -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/disassembler -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/ftl -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/heap -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/debugger -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/inspector -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/inspector/agents -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/inspector/remote -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/interpreter -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/jit -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/llint -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/llvm -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/parser -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/profiler -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/replay -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/runtime -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/tools -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/yarr -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/WTF -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/DerivedSources -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/DerivedSources/ForwardingHeaders -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/DerivedSources/JavaScriptCore -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/DerivedSources/JavaScriptCore/inspector -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source -I/usr/local/include -I/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/JavaScriptCore/disassembler/udis86 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include  -O -pipe -mfloat-abi=softfp -fno-strict-aliasing -std=c++11 -Qunused-arguments -O -pipe -mfloat-abi=softfp -fno-strict-aliasing -fno-exceptions -fno-strict-aliasing -fno-rtti -fPIC   -Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings  -o CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/inspector/InspectorBackendDispatchers.cpp.o -c /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/DerivedSources/JavaScriptCore/inspector/InspectorBackendDispatchers.cpp
<inline asm>:292:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_enter - .LrelativePCBase
        ^
<inline asm>:293:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_enter - .LrelativePCBase
        ^
<inline asm>:297:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_create_lexical_environment - .LrelativePCBase
        ^
<inline asm>:298:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_create_lexical_environment - .LrelativePCBase
        ^
<inline asm>:302:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_get_scope - .LrelativePCBase
        ^
<inline asm>:303:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_get_scope - .LrelativePCBase
        ^
<inline asm>:307:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_touch_entry - .LrelativePCBase
        ^
<inline asm>:308:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_touch_entry - .LrelativePCBase
        ^
<inline asm>:312:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_init_lazy_reg - .LrelativePCBase
        ^
<inline asm>:313:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_init_lazy_reg - .LrelativePCBase
        ^
<inline asm>:317:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_create_arguments - .LrelativePCBase
        ^
<inline asm>:318:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_create_arguments - .LrelativePCBase
        ^
<inline asm>:322:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_create_this - .LrelativePCBase
        ^
<inline asm>:323:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_create_this - .LrelativePCBase
        ^
<inline asm>:327:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_get_callee - .LrelativePCBase
        ^
<inline asm>:328:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_get_callee - .LrelativePCBase
        ^
<inline asm>:332:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_to_this - .LrelativePCBase
        ^
<inline asm>:333:2: error: instruction requires: armv6t2
        movt r2, #:upper16:.Lllint_op_to_this - .LrelativePCBase
        ^
<inline asm>:337:2: error: instruction requires: armv6t2
        movw r2, #:lower16:.Lllint_op_new_object - .LrelativePCBase
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:12967: recipe for target 'Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LowLevelInterpreter.cpp.o' failed
gmake[3]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LowLevelInterpreter.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory '/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5'
CMakeFiles/Makefile2:365: recipe for target 'Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all' failed
gmake[2]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5'
Makefile:152: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Otacílio de Araújo Ramos Neto 2016-03-25 11:25:48 UTC
Created attachment 168612 [details]
poudriere build log.

I got a error when compiling www/webkit2-gtk3 to ARM usig poudriere. Attached is the poudriere log. I don't got if this error is related with this Bug 207275 but Im sending the log because I think that can help in some form.
Comment 2 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2016-05-05 22:39:01 UTC
Please try latest port version [1] from development repo and let us know if it makes any difference. Thanks.

https://github.com/freebsd/freebsd-ports-gnome/tree/gnome-3.20/www/webkit2-gtk3
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2016-07-20 19:10:14 UTC
Created attachment 172758 [details]
armv6 fix

The problem was introduced with this commit:
https://bugs.webkit.org/show_bug.cgi?id=131612#c17

A PR is opened upstream for more than a year now without a fix:
https://bugs.webkit.org/show_bug.cgi?id=141288

I don't know how to fix the assembly but compiling webkit without JIT workaround the issue. I know it's lame but I can't do better.

See attached patch
Comment 4 Trent 2016-08-01 05:12:00 UTC
Quote from #211216


"I know this is probably not what you wanted to hear, but I tried out the patch from #207275 and it would fail at patching the bmalloc_BPlatform.h stuff. I edited the diff to remove everything past the line:

Index: files/patch-Source_bmalloc_bmalloc_BPlatform.h

and the patch completed and the build worked."
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2016-08-01 07:07:25 UTC
The bmalloc_BPlatform.h patch is needed if you use the development repo that Ruslan Makhmatkhanov posted at comment 2. I agree that it's not needed if you use the ports at r419069.
Sorry about the confusion.
Comment 6 Trent 2016-08-01 07:49:51 UTC
No worries, thank you for the work!
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-09-13 15:34:35 UTC
A commit references this bug:

Author: brd
Date: Tue Sep 13 15:34:28 UTC 2016
New revision: 422019
URL: https://svnweb.freebsd.org/changeset/ports/422019

Log:
  Fix build of www/webkit2-gtk3 on armv6 by matching the correct define and
  disabling the JIT compiler.

  PR:		207275
  Submitted by:	mikael.urankar@gmail.com
  Reported by:	sbruno
  Reviewed by:	bdrewery (implicit)
  Approved by:	maintainer timeout

Changes:
  head/www/webkit2-gtk3/Makefile
  head/www/webkit2-gtk3/files/patch-Source_WTF_wtf_Platform.h
  head/www/webkit2-gtk3/files/patch-Source_bmalloc_bmalloc_BPlatform.h
Comment 8 Brad Davis freebsd_committer freebsd_triage 2016-09-13 15:40:16 UTC
Fixed in r422019.

Thank you for all your work!
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-09-14 05:44:08 UTC
A commit references this bug:

Author: antoine
Date: Wed Sep 14 05:43:13 UTC 2016
New revision: 422112
URL: https://svnweb.freebsd.org/changeset/ports/422112

Log:
  Revert r422019, patch fails to apply

  PR:		207275
  Reported by:	pkg-fallout

Changes:
  head/www/webkit2-gtk3/Makefile
  head/www/webkit2-gtk3/files/patch-Source_WTF_wtf_Platform.h
  head/www/webkit2-gtk3/files/patch-Source_bmalloc_bmalloc_BPlatform.h
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-09-25 12:19:34 UTC
A commit references this bug:

Author: brd
Date: Sun Sep 25 12:19:16 UTC 2016
New revision: 422748
URL: https://svnweb.freebsd.org/changeset/ports/422748

Log:
  Try #2 for fixing build of www/webkit2-gtk3 on armv6 by matching the correct
  define and disabling the JIT compiler.

  PR:		207275
  Submitted by:	mikael.urankar@gmail.com
  Reported by:	sbruno
  Reviewed by:	bdrewery (implicit)
  Approved by:	maintainer timeout

Changes:
  head/www/webkit2-gtk3/Makefile
  head/www/webkit2-gtk3/files/patch-Source_WTF_wtf_Platform.h