evanw/esbuild

Add Loongnix OS support for LoongArch64 architecture

Closed this issue · 3 comments

Loongnix is an operating system which is based on an old version of Linux kernel (4.19). Currently it's widely used by loong64 users but it is not compatible with newest kernel. So Loongnix user cannot install esbuild on their system.

I've successfully built this software in loongnix environment
https://github.com/Iacob/esbuild-0.24.0

and I've made a patch for the installation script:
esbuild_loongnix.txt

Please consider adding this build and the patch.

When installing esbuild on Loognix, the error output is:

npm error code 1
npm error path /home/user1/test_node_1/node_modules/esbuild
npm error command failed
npm error command sh -c node install.js
npm error node:internal/errors:984
npm error const err = new Error(message);
npm error ^
npm error
npm error Error: Command failed: /home/user1/test_node_1/node_modules/esbuild/bin/esbuild --version
npm error at genericNodeError (node:internal/errors:984:15)
npm error at wrappedFn (node:internal/errors:538:14)
npm error at checkExecSyncError (node:child_process:889:11)
npm error at Object.execFileSync (node:child_process:925:15)
npm error at validateBinaryVersion (/home/user1/test_node_1/node_modules/esbuild/install.js:100:28)
npm error at /home/user1/test_node_1/node_modules/esbuild/install.js:284:5 {
npm error status: null,
npm error signal: 'SIGSEGV',
npm error output: [ null, Buffer(0) [Uint8Array] [], Buffer(0) [Uint8Array] [] ],
npm error pid: 5238,
npm error stdout: Buffer(0) [Uint8Array] [],
npm error stderr: Buffer(0) [Uint8Array] []
npm error }
npm error
npm error Node.js v22.1.0
npm verbose exit 1
npm verbose code 1

npm error A complete log of this run can be found in: /home/user1/.npm/_logs/2024-11-03T15_04_47_961Z-debug-0.log

evanw commented

I'm not sure what you're saying, but it sounds like you are suggesting that esbuild should publish builds for Loongnix OS using a custom Go compiler that is closed source and/or dependent on having a machine that runs Loongnix OS. I'm guessing this both because you say "in loongnix environment" and because the Go compiler source code doesn't include the word loongnix.

Sorry, but all published builds for esbuild must come from the official Go compiler: https://go.dev/. This is for many reasons including making it easy for me to maintain esbuild (e.g. testing and publishing releases) and to ensure verifiable builds to avoid supply chain security problems.

I'm closing this issue because this isn't something I plan on doing, for the reasons described above.

Iacob commented

Hello evanw,

For Loongnix OS will be merged with debian ports loong64 in the future months, so this request can be cancelled.

Thank you very much and best regards