Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930441 - net-misc/sunshine-0.23.1 - Error: Failed to install package @esbuild/linux-x64
Summary: net-misc/sunshine-0.23.1 - Error: Failed to install package @esbuild/linux-x64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 17:49 UTC by Toralf Förster
Modified: 2024-05-11 17:46 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,19.87 KB, text/plain)
2024-04-22 17:49 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,139.06 KB, text/plain)
2024-04-22 17:49 UTC, Toralf Förster
Details
environment (environment,127.26 KB, text/plain)
2024-04-22 17:49 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.18 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,17.27 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,49.15 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details
net-misc:sunshine-0.23.1:20240422-035513.log.xz (net-misc:sunshine-0.23.1:20240422-035513.log.xz,15.51 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,44.73 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,28.41 KB, application/x-xz)
2024-04-22 17:49 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-04-22 17:49:10 UTC
[esbuild] Trying to download "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz"
[esbuild] Failed to download "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz": getaddrinfo EAI_AGAIN registry.npmjs.org
/var/tmp/portage/net-misc/sunshine-0.23.1/work/Sunshine-0.23.1/node_modules/esbuild/install.js:275
        throw new Error(`Failed to install package "${pkg}"`);
              ^

Error: Failed to install package "@esbuild/linux-x64"
    at checkAndPreparePackage (/var/tmp/portage/net-misc/sunshine-0.23.1/work/Sunshine-0.23.1/node_modules/esbuild/install.js:275:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_desktop_gnome_systemd-20240419-093003

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 18.1.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.4
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.77.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.10_p7 [openjdk-bin-17]
2)	Eclipse Temurin JDK 21.0.2_p13 [openjdk-bin-21]
*)	Eclipse Temurin JDK 8.402_p06 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21 

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
  [1]   php8.1
  [2]   php8.3 *
go version go1.22.2 linux/amd64

  HEAD of ::gentoo
commit fcf4969c8c66627f7e49313b52a00434e79ab627
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Apr 22 03:19:07 2024 +0000

    2024-04-22 03:19:06 UTC

emerge -qpvO net-misc/sunshine
[ebuild  N    ] net-misc/sunshine-0.23.1  USE="X libdrm svt-av1 vaapi wayland x265 -cuda -debug -filecaps -trayicon -x264" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop"
Comment 1 Toralf Förster gentoo-dev 2024-04-22 17:49:11 UTC
Created attachment 891342 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-04-22 17:49:13 UTC
Created attachment 891343 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2024-04-22 17:49:14 UTC
Created attachment 891344 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-04-22 17:49:15 UTC
Created attachment 891345 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-04-22 17:49:16 UTC
Created attachment 891346 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-04-22 17:49:17 UTC
Created attachment 891347 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-04-22 17:49:18 UTC
Created attachment 891348 [details]
net-misc:sunshine-0.23.1:20240422-035513.log.xz
Comment 8 Toralf Förster gentoo-dev 2024-04-22 17:49:19 UTC
Created attachment 891349 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-04-22 17:49:20 UTC
Created attachment 891350 [details]
temp.tar.xz
Comment 10 Zhi Ma 2024-04-22 18:42:15 UTC
The old version 0.22.2 on my machine has this problem too. (now, used to be working)
Comment 11 James Le Cuirot gentoo-dev 2024-04-22 22:19:35 UTC
Arrgh. After struggling to find the right method to cache the NPM modules for offline use, it turns out this cache is sensitive to the NPM version being used. Fantastic. I'll see whether there's another way that doesn't involve pinning to specific NPM versions, but I'm not too optimistic.
Comment 12 James Le Cuirot gentoo-dev 2024-05-05 22:52:54 UTC
I've got a plan. Expect a fix soon.
Comment 13 wolfgang 2024-05-07 04:20:42 UTC
fwiw, I've filed https://github.com/npm/cli/issues/3764 in the past, maybe there is useful info in there.
Comment 14 Ryan Wong 2024-05-07 06:12:36 UTC
After downgrading nodejs to `=net-libs/nodejs-20.11.0`, I can merge sunshine without errors.
Comment 15 nE0sIghT 2024-05-07 06:30:10 UTC
Just a idea - besides npm there is at least yarn which may be more version-change tolerant in case offline installation.
Comment 16 James Le Cuirot gentoo-dev 2024-05-08 22:38:20 UTC
Yeah, I thought of yarn too as I remembered it helping me with other issues in the past. I initially dismissed it because I didn't want to force upstream to change, but it looks like the syntax is the same, so maybe we could just swap it in. My other plan was to pre-compile the assets and nobble the build by giving npm as /bin/true. Either of those mean adjusting it to use CMake's find_program. This should work out one way or the other, just been short of time this week.
Comment 17 James Le Cuirot gentoo-dev 2024-05-09 22:36:45 UTC
I tried hard to make yarn work, but it's a total pain in its handling of other platforms. Normally, it will insist on caching all 90MB to cover Windows, Android, all the BSDs, etc. You can manually strip out the other platforms from the lockfile and it won't complain, but only if you pass additional arguments, which can only be done via a wrapper in this case. It supports a .yarnrc file and a few environment variables, but these have nowhere near the amount of control required. All in all, it's just not worth the headache. I'll go back to the pre-compiled assets idea.
Comment 18 Larry the Git Cow gentoo-dev 2024-05-11 17:46:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd44b9aa5c745304ea924fb12b8503bb8ecd9545

commit dd44b9aa5c745304ea924fb12b8503bb8ecd9545
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-05-11 17:44:51 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-05-11 17:44:51 +0000

    net-misc/sunshine: Fix NPM issue by shipping pre-compiled assets
    
    It turns out the NPM cache is sensitive to the NPM version. Yarn is better in
    this regard, but it wanted to cache 90MB of files covering irrelevant operating
    systems and architectures. This is a lot more than 1.3MB of pre-compiled assets.
    
    Closes: https://bugs.gentoo.org/930441
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 net-misc/sunshine/Manifest                      |   2 +-
 net-misc/sunshine/files/sunshine-find-npm.patch | 100 ++++++++++++++++++++++++
 net-misc/sunshine/sunshine-0.23.1.ebuild        |  16 ++--
 net-misc/sunshine/sunshine-9999.ebuild          |  16 ++--
 4 files changed, 115 insertions(+), 19 deletions(-)