Bug 213202 - lang/v8: Seriously outdated port
Summary: lang/v8: Seriously outdated port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-04 18:39 UTC by german.mb
Modified: 2020-11-20 10:43 UTC (History)
8 users (show)

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


Attachments
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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2020-06-09 18:25:03 UTC
FYI...

https://groups.google.com/forum/#!topic/v8-users/EG0z7DXR7GA

The 5.1 port referenced here fails with a gyp error, but maybe it's an easy fix.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2020-06-14 10:15:40 UTC
I have a wip port: https://github.com/MikaelUrankar/v8-ports
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2020-06-18 18:26:45 UTC
Created attachment 215743 [details]
patch
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2020-06-18 18:59:09 UTC
Created attachment 215746 [details]
patch
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2020-06-19 11:37:48 UTC
Created attachment 215773 [details]
patch
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 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 freebsd_triage 2020-06-27 18:25:37 UTC
https://people.freebsd.org/~pi/logs/v8-121.txt
Comment 10 Mikael Urankar freebsd_committer freebsd_triage 2020-06-27 19:42:17 UTC
(In reply to Kurt Jaeger from comment #9)
It requires llvm10, I've uploaded the wrong patch :(
https://github.com/MikaelUrankar/v8-ports/blob/master/files/patch-build_toolchain_gcc__toolchain.gni#L28
Comment 11 Mikael Urankar freebsd_committer freebsd_triage 2020-06-27 19:53:26 UTC
Created attachment 215995 [details]
patch
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2020-06-27 20:34:38 UTC
(In reply to Mikael Urankar from comment #11)
testbuilds@work
Comment 13 Kurt Jaeger freebsd_committer freebsd_triage 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 freebsd_triage 2020-07-02 15:51:55 UTC
Created attachment 216145 [details]
patch

8.6.39
Only install llvm10 on 12.1 (11.4 and 13 already ship clang10 in base)
Add cppgc include
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 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 freebsd_triage 2020-07-03 09:34:49 UTC
Created attachment 216165 [details]
v5
Comment 17 Mikael Urankar freebsd_committer freebsd_triage 2020-07-03 16:18:51 UTC
Created attachment 216175 [details]
v6

add do-fetch
put distfiles on freefall
Comment 18 Kurt Jaeger freebsd_committer freebsd_triage 2020-07-03 18:04:01 UTC
testbuilds are fine, thanks!
Comment 19 Po-Chuan Hsieh freebsd_committer freebsd_triage 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 8.3.110.13 now.
Comment 20 Mikael Urankar freebsd_committer freebsd_triage 2020-07-09 12:43:59 UTC
https://github.com/MikaelUrankar/v8-ports/tree/8.3
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.

Thanks!
Comment 22 Mikael Urankar freebsd_committer freebsd_triage 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
Mikael,

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.
Example:

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

Stop.
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 freebsd_triage 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 freebsd_triage 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.
Comment 28 j.david.lists 2020-11-16 01:29:40 UTC
While trying the latest version from github, I'm getting this error during the patch phase:

===========================================================================
=======================<phase: patch          >============================
===>  Patching for v8-8.7.142
===>  Applying FreeBSD patches for v8-8.7.142 from /usr/ports/lang/v8/files
/usr/bin/sed -i.bak "s|%%LOCALBASE%%|/usr/local|"  /wrkdirs/usr/ports/lang/v8/work/v8-8.7.142/build/toolchain/gcc_toolchain.gni
/wrkdirs/usr/ports/lang/v8/work/v8-8.7.142/buildtools/third_party/libc++/BUILD.gn
make: exec(/wrkdirs/usr/ports/lang/v8/work/v8-8.7.142/buildtools/third_party/libc++/BUILD.gn) failed (Permission denied)
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/v8
=>> Cleaning up wrkdir
===>  Cleaning for v8-8.7.142
build of lang/v8 | v8-8.7.142 ended at Mon Nov 16 01:18:21 UTC 2020
build time: 00:00:10
!!! build failure encountered !!!

During the patch phase, make should be trying to exec the patch utility, not buildtools/third_party/libc++/BUILD.gn (for which I do see a patch in files/), right?

This is under poudriere with FreeBSD 12.2.
Comment 29 Mikael Urankar freebsd_committer freebsd_triage 2020-11-16 13:53:29 UTC
(In reply to j.david.lists from comment #28)
sorry, there was a missing backslash, it's fixed (I've updated the port to the latest version)
Comment 30 j.david.lists 2020-11-18 22:31:48 UTC
(In reply to Mikael Urankar from comment #29)

Looks good, it built cleanly.  Really appreciate your efforts on this, and I hope it's able to get into the tree soon!
Comment 31 Jason W. Bacon freebsd_committer freebsd_triage 2020-11-19 13:58:16 UTC
(In reply to j.david.lists from comment #30)
+1

This removes a barrier to doing differential gene analysis with DESeq2 on FreeBSD.  Why DESeq2 depends on a Javascript engine is a mystery to me, but it does, and it's one of the most essential tools in bioinformatics.

I also know this is a challenging port and I hope upstream will accept some patches and suggestions to simplify things from here on.
Comment 32 commit-hook freebsd_committer freebsd_triage 2020-11-20 10:42:01 UTC
A commit references this bug:

Author: mikael
Date: Fri Nov 20 10:41:21 UTC 2020
New revision: 555754
URL: https://svnweb.freebsd.org/changeset/ports/555754

Log:
  lang/v8: Update to 8.7.220.23

  PR:		213202
  Reported by:	many
  Approved by:	sunpoet (maintainer timeout)

Changes:
  head/lang/v8/Makefile
  head/lang/v8/distinfo
  head/lang/v8/files/extra-patch-src-stub-cache.cc
  head/lang/v8/files/extrapatch-clang10
  head/lang/v8/files/patch-CVE-2015-5380
  head/lang/v8/files/patch-build_config_BUILD.gn
  head/lang/v8/files/patch-build_config_BUILDCONFIG.gn
  head/lang/v8/files/patch-build_config_compiler_BUILD.gn
  head/lang/v8/files/patch-build_config_compiler_compiler.gni
  head/lang/v8/files/patch-build_config_features.gni
  head/lang/v8/files/patch-build_config_freetype_freetype.gni
  head/lang/v8/files/patch-build_config_linux_BUILD.gn
  head/lang/v8/files/patch-build_config_linux_pkg-config.py
  head/lang/v8/files/patch-build_config_sysroot.gni
  head/lang/v8/files/patch-build_detect__host__arch.py
  head/lang/v8/files/patch-build_gn__run__binary.py
  head/lang/v8/files/patch-build_linux_chrome.map
  head/lang/v8/files/patch-build_linux_libpci_BUILD.gn
  head/lang/v8/files/patch-build_linux_unbundle_libusb.gn
  head/lang/v8/files/patch-build_linux_unbundle_replace__gn__files.py
  head/lang/v8/files/patch-build_toolchain_gcc__toolchain.gni
  head/lang/v8/files/patch-build_toolchain_get__concurrent__links.py
  head/lang/v8/files/patch-build_toolchain_linux_BUILD.gn
  head/lang/v8/files/patch-buildtools_third__party_libc++_BUILD.gn
  head/lang/v8/files/patch-src-checks.h
  head/lang/v8/files/patch-src-deoptimizer.cc
  head/lang/v8/files/patch-src-ia32-code-stubs-ia32.cc
  head/lang/v8/files/patch-src-ia32-disasm-ia32.cc
  head/lang/v8/files/patch-src-ia32-ic-ia32.cc
  head/lang/v8/files/patch-src-liveedit.cc
  head/lang/v8/files/patch-src-objects.h
  head/lang/v8/files/patch-src-x64-disasm-x64.cc
  head/lang/v8/files/patch-src-x64-ic-x64.cc
  head/lang/v8/files/patch-src_d8_d8-posix.cc
  head/lang/v8/files/patch-v8_BUILD.gn
  head/lang/v8/files/patch-v8_include_v8config.h
  head/lang/v8/files/patch-v8_src_api_api.cc
  head/lang/v8/files/patch-v8_src_base_cpu.cc
  head/lang/v8/files/patch-v8_src_base_platform_platform-freebsd.cc
  head/lang/v8/files/patch-v8_src_base_platform_platform-posix.cc
  head/lang/v8/files/v8.pc
  head/lang/v8/files/v8_libbase.pc
  head/lang/v8/files/v8_libplatform.pc
  head/lang/v8/pkg-plist