Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating qtwebkit #3045

Open
aquiles2k opened this issue Feb 13, 2024 · 1 comment
Open

Error updating qtwebkit #3045

aquiles2k opened this issue Feb 13, 2024 · 1 comment

Comments

@aquiles2k
Copy link
Contributor

Im trying to update the qtwebkit to some newer revision, but am getting errors like:

/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: In static member function 'static JSC::JSValue JSC::LLInt::CLoop::execute(JSC::OpcodeID, void*, JSC::VM*, JSC::ProtoCallFrame*, bool)':
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1.build_/JavaScriptCore/DerivedSources/Bytecodes.h:32:11: error: label 'op_create_this_wide16' used but not defined
   32 |     macro(op_create_this, 5) \
      |           ^~~~~~~~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:257:63: note: in definition of macro 'OPCODE_ENTRY'
  257 |             opcodeMapWide16[__opcode] = bitwise_cast<void*>(&&__opcode##_wide16); \
      |                                                               ^~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:273:9: note: in expansion of macro 'FOR_EACH_BYTECODE_ID'
  273 |         FOR_EACH_BYTECODE_ID(OPCODE_ENTRY)
      |         ^~~~~~~~~~~~~~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1.build_/JavaScriptCore/DerivedSources/Bytecodes.h:33:11: error: label 'op_create_promise_wide16' used but not defined
   33 |     macro(op_create_promise, 5) \
      |           ^~~~~~~~~~~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:257:63: note: in definition of macro 'OPCODE_ENTRY'
  257 |             opcodeMapWide16[__opcode] = bitwise_cast<void*>(&&__opcode##_wide16); \
      |                                                               ^~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:273:9: note: in expansion of macro 'FOR_EACH_BYTECODE_ID'
  273 |         FOR_EACH_BYTECODE_ID(OPCODE_ENTRY)
      |         ^~~~~~~~~~~~~~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1.build_/JavaScriptCore/DerivedSources/Bytecodes.h:34:11: error: label 'op_create_generator_wide16' used but not defined
   34 |     macro(op_create_generator, 4) \
      |           ^~~~~~~~~~~~~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:257:63: note: in definition of macro 'OPCODE_ENTRY'
  257 |             opcodeMapWide16[__opcode] = bitwise_cast<void*>(&&__opcode##_wide16); \
      |                                                               ^~~~~~~~
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-i686-w64-mingw32.shared/qtwebkit-1/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:273:9: note: in expansion of macro 'FOR_EACH_BYTECODE_ID'
  273 |         FOR_EACH_BYTECODE_ID(OPCODE_ENTRY)
      |         ^~~~~~~~~~~~~~~~~~~~

@tonytheodore Have you ever encountered some of these while maintaining qtwebkit? This is so lowlevel that i have no clue where to start :)

@aquiles2k
Copy link
Contributor Author

So, annulen over at qtwebkit repo confirmed that 32bit JIT was abandoned long time ago which is why this code is falling back to CLoop which again is untested and unsupported on 32bit mingw. So i guess i have to give up on this.

Meanwhile i tried for 64bit mingw crosscompile which got me further but still errors out early.

There were some fixable errors like mispelled or not existing includes.

The first error that left me scratching my head was:

[ 16%] �[32mBuilding CXX object Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.obj�[0m
cd /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07.build_/Source/JavaScriptCore && /home/adrian/dev/sources/mxe/usr/bin/x86_64-w64-mingw32.shared-g++ -DBUILDING_LLIntOffsetsExtractor -DBUILDING_QT__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DNOMINMAX -DPAS_BMALLOC=1 -DQT_ASCII_CAST_WARNINGS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DSTATICALLY_LINKED_WITH_WTF -DUNICODE -D_UNICODE -D_WINDOWS -D_WINSOCKAPI_="" -D__USE_MINGW_ANSI_STDIO=1 @CMakeFiles/LLIntOffsetsExtractor.dir/includes_CXX.rsp -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-unknown-pragmas -Wno-tautological-compare -fpermissive -fno-strict-aliasing -fno-exceptions -fno-rtti -mno-ms-bitfields -fno-keep-inline-dllexport -O3 -DNDEBUG -std=c++20 -MD -MT Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.obj -MF CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.obj.d -o CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.obj -c /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp

In file included from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/heap/Heap.h:40,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/JSCell.h:29,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/JSCast.h:28,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/ClassInfo.h:26,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/Structure.h:28,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/bytecode/ArrayProfile.h:29,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:29:
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/heap/IsoSubspace.h:81:23: error: function 'JSC::GCClient::IsoSubspace::~IsoSubspace()' definition is marked dllimport
   81 |     JS_EXPORT_PRIVATE ~IsoSubspace() = default;
      |                       ^
In file included from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/debugger/Debugger.h:26,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/VMInlines.h:28,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/runtime/CommonSlowPaths.h:39,
                 from /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:33:
/home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/debugger/DebuggerCallFrame.h:57:43: error: function 'const WTF::TextPosition& JSC::DebuggerCallFrame::position() const' definition is marked dllimport
   57 |     JS_EXPORT_PRIVATE const TextPosition& position() const { return m_position; }
      |                                           ^~~~~~~~
make[4]: *** [Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/build.make:169: Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.obj] Error 1

Since i have read somewhere that dllimport/export markings are more of a msvc thing and not gcc (which is used here), i disabled them:

diff --git a/Source/WTF/wtf/PlatformUse.h b/Source/WTF/wtf/PlatformUse.h
index 1111111..2222222 100644
--- a/Source/WTF/wtf/PlatformUse.h
+++ b/Source/WTF/wtf/PlatformUse.h
@@ -44,7 +44,7 @@
 
 /* Export macro support. Detects the attributes available for shared library symbol export
    decorations. */
-#if OS(WINDOWS) || (COMPILER_HAS_CLANG_DECLSPEC(dllimport) && COMPILER_HAS_CLANG_DECLSPEC(dllexport))
+#if (COMPILER_HAS_CLANG_DECLSPEC(dllimport) && COMPILER_HAS_CLANG_DECLSPEC(dllexport))
 #define USE_DECLSPEC_ATTRIBUTE 1
 #elif defined(__GNUC__)
 #define USE_VISIBILITY_ATTRIBUTE 1

Can anyone confirm this is the right approach?

Anyway, this got me some compilations further but now im getting an assembler error again:

[ 19%] �[32mBuilding CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/assembler/MacroAssemblerX86Common.cpp.obj�[0m
cd /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07.build_/Source/JavaScriptCore && /home/adrian/dev/sources/mxe/usr/bin/x86_64-w64-mingw32.shared-g++ -DBUILDING_JavaScriptCore -DBUILDING_QT__=1 -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DNOMINMAX -DPAS_BMALLOC=1 -DQT_ASCII_CAST_WARNINGS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DSTATICALLY_LINKED_WITH_WTF -DUNICODE -D_UNICODE -D_WINDOWS -D_WINSOCKAPI_="" -D__USE_MINGW_ANSI_STDIO=1 @CMakeFiles/JavaScriptCore.dir/includes_CXX.rsp -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-unknown-pragmas -Wno-tautological-compare -fpermissive -fno-strict-aliasing -fno-exceptions -fno-rtti -mno-ms-bitfields -fno-keep-inline-dllexport -O3 -DNDEBUG -std=c++20 -ffp-contract=off -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/assembler/MacroAssemblerX86Common.cpp.obj -MF CMakeFiles/JavaScriptCore.dir/assembler/MacroAssemblerX86Common.cpp.obj.d -o CMakeFiles/JavaScriptCore.dir/assembler/MacroAssemblerX86Common.cpp.obj -c /home/adrian/dev/sources/mxe/tmp-qtwebkit2-x86_64-w64-mingw32.shared/webkit-2022-09-07/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp

{standard input}: Assembler messages:
{standard input}:131: Error: unknown pseudo-op: `.previous'
make[4]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:964: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/assembler/MacroAssemblerX86Common.cpp.obj] Error 1
make[4]: *** Waiting for unfinished jobs....

Here we are again with some compiler voodoo i dont understand. I suspect there will be some defines or compiler flags which would tell the assembler to make the right things, but im lost here for now.

Anyone else an idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant