Bug 213202 - lang/v8: Seriously outdated port
Summary: lang/v8: Seriously outdated port
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Sunpoet Po-Chuan Hsieh
Depends on:
Reported: 2016-10-04 18:39 UTC by german.mb
Modified: 2020-08-27 03:27 UTC (History)
7 users (show)

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

patch (50.75 KB, patch)
2020-06-18 18:26 UTC, Mikael Urankar
no flags Details | Diff
patch (66.85 KB, patch)
2020-06-18 18:59 UTC, Mikael Urankar
no flags Details | Diff
patch (70.96 KB, patch)
2020-06-19 11:37 UTC, Mikael Urankar
no flags Details | Diff
patch (60.24 KB, patch)
2020-06-27 19:53 UTC, Mikael Urankar
no flags Details | Diff
patch (68.85 KB, patch)
2020-07-02 15:51 UTC, Mikael Urankar
no flags Details | Diff
v5 (68.90 KB, patch)
2020-07-03 09:34 UTC, Mikael Urankar
no flags Details | Diff
v6 (69.72 KB, patch)
2020-07-03 16:18 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 german.mb 2016-10-04 18:39:51 UTC
The V8 port hasn't been updated since 2013 it seems.

V8 is a very popular Javascript engine by Google. The latest stable release is v5.1 (April 23, 2016); but we still have lang/v8 v3.18.5 (April 30, 2013), and lang/v8-devel v3.27.7 (May 19, 2014) in FreeBSD ports.

There have been *very* important improvements in between, including API changes and many performance and stability improvements on all platforms.

Maybe lang/v8 should be at v5.1 and lang/v8-devel at v5.5 (or at least v8-devel should be at v5.1)

Thank you very much.
Comment 1 Kurt Jaeger freebsd_committer 2017-08-10 05:32:21 UTC
The problem is the build structure, so someone needs to provide a patch
for the update.
Comment 2 Gleb Popov freebsd_committer 2019-07-31 20:31:58 UTC
I think, maintainers of www/chromium or devel/electron4 can help with that. Current release of v8 uses gn build system, which is also used by chromium and electron.
Comment 3 Jason W. Bacon freebsd_committer 2020-06-09 18:25:03 UTC


The 5.1 port referenced here fails with a gyp error, but maybe it's an easy fix.
Comment 4 Mikael Urankar freebsd_committer 2020-06-14 10:15:40 UTC
I have a wip port: https://github.com/MikaelUrankar/v8-ports
Comment 5 Mikael Urankar freebsd_committer 2020-06-18 18:26:45 UTC
Created attachment 215743 [details]
Comment 6 Mikael Urankar freebsd_committer 2020-06-18 18:59:09 UTC
Created attachment 215746 [details]
Comment 7 Mikael Urankar freebsd_committer 2020-06-19 11:37:48 UTC
Created attachment 215773 [details]
Comment 8 Kurt Jaeger freebsd_committer 2020-06-27 18:24:48 UTC
I have testbuilt in poudriere on cur-amd, cur-i386, 11.4-amd and it was fine.
It somehow failed on 12.1 ?
Comment 9 Kurt Jaeger freebsd_committer 2020-06-27 18:25:37 UTC
Comment 10 Mikael Urankar freebsd_committer 2020-06-27 19:42:17 UTC
(In reply to Kurt Jaeger from comment #9)
It requires llvm10, I've uploaded the wrong patch :(
Comment 11 Mikael Urankar freebsd_committer 2020-06-27 19:53:26 UTC
Created attachment 215995 [details]
Comment 12 Kurt Jaeger freebsd_committer 2020-06-27 20:34:38 UTC
(In reply to Mikael Urankar from comment #11)
Comment 13 Kurt Jaeger freebsd_committer 2020-06-28 06:49:38 UTC
Thanks, built was fine on cur-a, cur-i, 12.1a and 11.4a.
Comment 14 Mikael Urankar freebsd_committer 2020-07-02 15:51:55 UTC
Created attachment 216145 [details]

Only install llvm10 on 12.1 (11.4 and 13 already ship clang10 in base)
Add cppgc include
Comment 15 Kurt Jaeger freebsd_committer 2020-07-03 03:39:17 UTC
testbuilds are fine after I added on pkg-plist line for:

Error: Orphaned: include/cppgc/internal/caged-heap-local-data.h
Comment 16 Mikael Urankar freebsd_committer 2020-07-03 09:34:49 UTC
Created attachment 216165 [details]
Comment 17 Mikael Urankar freebsd_committer 2020-07-03 16:18:51 UTC
Created attachment 216175 [details]

add do-fetch
put distfiles on freefall
Comment 18 Kurt Jaeger freebsd_committer 2020-07-03 18:04:01 UTC
testbuilds are fine, thanks!
Comment 19 Sunpoet Po-Chuan Hsieh freebsd_committer 2020-07-08 19:58:16 UTC
Thanks, Mikael. I'll test it ASAP.

BTW, lang/v8 should track the stable release (8.3) which is now.
Comment 20 Mikael Urankar freebsd_committer 2020-07-09 12:43:59 UTC
Comment 21 Ryan D 2020-07-27 17:11:46 UTC
I also received a build error for lang/v8 after updating from FreeBSD 11.3 to FreeBSD 11.4. Could someone point me in the direction of applying this patch while using Poudriere. I have downloaded the files from Mikael and uploaded them to my server. I have tried a few different ways to implement this patch with Poudriere but all have failed. Any help is appreciated.

Comment 22 Mikael Urankar freebsd_committer 2020-07-27 18:27:16 UTC
You can do that:
git clone -b 8.3 git@github.com:MikaelUrankar/v8-ports.git

mv /usr/local/poudriere/ports/default/lang/v8 /usr/local/poudriere/ports/default/lang/v8.orig
mv v8-ports /usr/local/poudriere/ports/default/lang/v8
Comment 23 Ryan D 2020-07-27 19:04:57 UTC

Thanks for the assistance. I was able to move the files to the necessary directory and began the build again. We then received a new error with the chromium-gn build. Poudriere output:
[00:01:26] Failed ports: devel/chromium-gn:extract

Reviewed logs and found "Write to restore size failed." at the end of nearly every line.

chromium-83.0.4103.116/storage/common/file_system/file_system_mount_option.h: Write to restore size failed
chromium-83.0.4103.116/storage/common/file_system/OWNERS: Write to restore size failed

Here was the output from the end of file:

tar: Error exit delayed from previous errors.
*** Error code 1

make: stopped in /usr/ports/devel/chromium-gn
=>> Cleaning up wrkdir
===>  Cleaning for chromium-gn-83.0.4103.116_1
build of devel/chromium-gn | chromium-gn-83.0.4103.116_1 ended at Mon Jul 27 13:35:24 CDT 2020
build time: 00:02:54
!!! build failure encountered !!!

Here is the FreeBSD version and arch:
Jail Version : 11.4-RELEASE-p1  amd64

Thanks again for the assistance.
Comment 24 Mikael Urankar freebsd_committer 2020-07-28 06:22:11 UTC
(In reply to Ryan D from comment #23)
Weird error, never saw that before, what filesystem / mount option do you use?
Is it the only port failing?
Comment 25 Ryan D 2020-07-28 15:43:59 UTC
Using the ZFS file system. It is the only port that fails. Once it fails, lang/v8 and databases/postgresql-plv8js is skipped due to its failing . There is plenty of space on the file system. Unsure which info you need about the mount options but here is the output relevant to mounting when running a Poudriere build.

[00:00:01] Mounting system devices for freebsd_11-4x64-HEAD
[00:00:01] Mounting ports/packages/distfiles
[00:00:01] Stashing existing package repository
[00:00:01] Mounting packages from: /usr/local/poudriere/data/packages/freebsd_11-4x64-HEAD

This system is running on a bare metal server.
Comment 26 Mikael Urankar freebsd_committer 2020-07-28 17:10:21 UTC
(In reply to Ryan D from comment #25)
Can you try to untar the distfiles with archivers/gtar?
Comment 27 Ryan D 2020-07-28 17:28:34 UTC
(In reply to Mikael Urankar from comment #26)
This worked. I was able to untar the files in a test directory.