Opened 3 months ago

Last modified 2 months ago

#69351 assigned update

v8-8.3: Update and fix livecheck

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: v8-8.3

Description

The latest version of v8 8.3 is 8.3.129.

% port livecheck v8-8.3
v8-8.3 seems to have been updated (port version: 8.3.110.13, new version: 8.9.255.20)

Also, 8.3.129 is four years old. Maybe it would be nice to have a more current version of v8 in MacPorts. (We used to have a v8 port but it was deleted after being neglected.)

Change History (3)

comment:1 in reply to:  description Changed 3 months ago by barracuda156

Replying to ryandesign:

The latest version of v8 8.3 is 8.3.129.

% port livecheck v8-8.3
v8-8.3 seems to have been updated (port version: 8.3.110.13, new version: 8.9.255.20)

Also, 8.3.129 is four years old. Maybe it would be nice to have a more current version of v8 in MacPorts. (We used to have a v8 port but it was deleted after being neglected.)

Ryan, I made it versioned (and not just V8) on purpose, exactly so that there is no incentive to update it, but rather add whatever version one wants to as a separate port, like for llvm. Please leave 8.3 at what it is at the moment. Updating it is non-trivial, since quite of bit of stuff got broken further, and I am short on time, so this gets postponed.

Adding 8-8.9 is desirable (without considering PowerPC, it can be restricted to x86_64 and arm64), but I could not build it on Sonoma. Need to check what was the issue. If it builds for you, you are very welcome to add the port for it.

comment:2 in reply to:  description Changed 3 months ago by barracuda156

Replying to ryandesign:

Let me elaborate a bit.

Initial choice of the version for the port was motivated by feasibility to support PowerPC builds. There was no reason to restrict the port to PowerPC, but I wanted to avoid having multiple versions of the port, to keep it maintainable. That still made sense, since R, for example, does not require latest versions of V8 and seems to support pretty archaic ones (R-V8 builds on x86_64 and passes tests with our existing version of V8-8.3).

While we technically can keep ppc pegged to the current version and update 64-bit archs to 8.3.129, it makes a better sense to just add a port for 8.9 (or whatever chosen) instead. I actually wanted to do that, but it did not work out-of-the-box on arm64, and I had no time to fix it. (I am fine if anyone wants to update 8.3 for x86_64 and arm64 to its latest 8.3.x, but I am not planning to do that myself.)

Notice also, there is a PR to update it to 11.x: https://github.com/bnoordhuis/v8-cmake/pull/66

  1. S. Re PowerPC: there are technical reasons why going beyond 8.3 appears problematic. There were two attempts to fix V8 for ppc (not on macOS, but on AIX? and Linux), which I know of, one for NodeJS 12 (which has 7.x V8, I think), and one for V8 as such, around 8.2.x if not 8.1.x. I think upstream did some work on it back then, but eventually only the half got merged. Upstream code in the master has a broken implementation (to an extent it cannot possibly build, I believe), and even the second, unmerged PR, was incomplete.

The code changes between 8.3 and 8.4 quite substantially, and given complexity and even size, porting those patches (and fixes for those patches) is rather painful. I started with NodeJS 12 and stupidly wasted more time on forward-porting fixes for the build trying to catch up with their mad release schedule than on anything else :) Eventually I got NodeJS 20 building – but failing at linking apparently due to 32-bit address-space limit. So I came to a conclusion I rather try finding time to ensure this old version of V8 actually works – the build itself is fixed, but more work needed on code coherency.

To make things worse, it is not merely code structure changed after 8.3.x (I think there was quite specific reason to use the version I picked, likely one of the following); there were two major changes which broken specifically PowerPC implementation: addition of VSX instructions (sure enough, without making it conditional appropriately) and a PR introducing “compressed pointers” (which distorted logic of fallbacks introduced earlier by those Linux folks). I might have had even some early 8.4.x building or almost building, but reverted back to a slightly earlier version with a less broken code and therefore requiring less patches.

comment:3 Changed 3 months ago by barracuda156

With https://github.com/bnoordhuis/v8-cmake/pull/66 merged, I will try making a port for new V8-11. May take some days, but it will be on to-do list.

UPD. https://github.com/macports/macports-ports/pull/22943

Last edited 2 months ago by barracuda156 (previous) (diff)
Note: See TracTickets for help on using tickets.