Opened 2 years ago
Last modified 2 years ago
#64994 new defect
WIP on webkit2 for PowerPC
Reported by: | barracuda156 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | powerpc, leopard, snowleopard | Cc: | cooljeanius (Eric Gallager) |
Port: | webkit2-gtk |
Description
I have finally built all major dependencies for webkit2-gtk and rewritten existing patches for @2.36.0. However, unsurprisingly, once I sorted out all configure errors, the build did not proceed much further :)
Any idea why Cmake fails to identify the arch?
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/Threading.h:42, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.h:32, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.cpp:27: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:60:2: error: #error Unknown Architecture 60 | #error Unknown Architecture | ^~~~~ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:63:8: error: 'PlatformRegisters' does not name a type 63 | inline PlatformRegisters& registersFromUContext(ucontext_t* ucontext) | ^~~~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:145:12: error: 'PlatformRegisters' has not been declared in 'WTF' 145 | using WTF::PlatformRegisters; | ^~~~~~~~~~~~~~~~~ In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.h:32, from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.cpp:27: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/Threading.h:183:72: error: 'PlatformRegisters' has not been declared 183 | WTF_EXPORT_PRIVATE size_t getRegisters(const ThreadSuspendLocker&, PlatformRegisters&); | ^~~~~~~~~~~~~~~~~
Here is the source code:
namespace WTF { #if OS(DARWIN) #if CPU(X86) typedef i386_thread_state_t PlatformRegisters; #elif CPU(X86_64) typedef x86_thread_state64_t PlatformRegisters; #elif CPU(PPC) typedef ppc_thread_state_t PlatformRegisters; #elif CPU(PPC64) typedef ppc_thread_state64_t PlatformRegisters; #elif CPU(ARM) typedef arm_thread_state_t PlatformRegisters; #elif CPU(ARM64) typedef arm_thread_state64_t PlatformRegisters; #else #error Unknown Architecture #endif inline PlatformRegisters& registersFromUContext(ucontext_t* ucontext) { return ucontext->uc_mcontext->__ss; } #elif OS(WINDOWS) using PlatformRegisters = CONTEXT; #elif HAVE(MACHINE_CONTEXT) struct PlatformRegisters { mcontext_t machineContext; }; inline PlatformRegisters& registersFromUContext(ucontext_t* ucontext) { #if OS(OPENBSD) return *bitwise_cast<PlatformRegisters*>(ucontext); #elif CPU(PPC) return *bitwise_cast<PlatformRegisters*>(ucontext->uc_mcontext.uc_regs); #else return *bitwise_cast<PlatformRegisters*>(&ucontext->uc_mcontext); #endif } #else struct PlatformRegisters { void* stackPointer; }; #endif } // namespace WTF
I also tried to specify the arch directly in configure.args, it made no effect. (Argument does get passed to Cmake, but the same error occurs.) From what I can see, no patches were applied to this header file (explicitly, I did not add PPC there, it is there in the source code).
- S. I no one objects, we may keep this ticket as a track record and invitation to participate. If no one joins in, I will slowly post updates from my end.
Change History (4)
comment:1 Changed 2 years ago by barracuda156
comment:2 follow-up: 3 Changed 2 years ago by evanmiller (Evan Miller)
"Heroes die young, everyone else fails to compile webkit2-gtk on PowerPC." @kencu and I separately undertook this project with limited results. I think Ken got something working on Leopard at one point, but the browser was too slow to be usable. After many days of effort I was unable to get the port to compile on Tiger. Here was my latest public attempt:
https://github.com/macports/macports-ports/pull/12009
I have some more private patches in that direction but I really don't recommend pursuing this. There be dragons of all species. I think time and energy is better spent making webkit2-gtk
an optional dependency wherever it is currently required.
comment:3 Changed 2 years ago by barracuda156
Replying to evanmiller:
"Heroes die young, everyone else fails to compile webkit2-gtk on PowerPC." @kencu and I separately undertook this project with limited results. I think Ken got something working on Leopard at one point, but the browser was too slow to be usable. After many days of effort I was unable to get the port to compile on Tiger. Here was my latest public attempt:
https://github.com/macports/macports-ports/pull/12009
I have some more private patches in that direction but I really don't recommend pursuing this. There be dragons of all species. I think time and energy is better spent making
webkit2-gtk
an optional dependency wherever it is currently required.
Thank you for the reference! Yes, it sounds like a no-go. The only advantage now is better compilers, but I guess that's not the main problem.
I was hoping to get something WebKit-based working, since I am not a fan of FF, and anyway it is dead. On the other hand, both apps for secure web, Tor and i2pd, use FF front-end.
comment:4 Changed 2 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
Current config for the reference: