loongson-community / discussions

Cross-community issue tracker & discussions / 跨社区工单追踪 & 讨论场所
11 stars 0 forks source link

clash-verge-rev 1.7.3+ fails to build on loong64 with Node.js <22 #61

Closed eatradish closed 4 weeks ago

eatradish commented 4 months ago

在 clash-verge-rev 1.7.3 之后,已经无法通过简单的加一句:

  "pnpm": {
    "overrides": {
      "rollup": "npm:@rollup/wasm-node"
    }
  }

来使 clash-verge-rev 通过编译,在使用 rollup 打包前端的过程中会出现类似这样的错误(仅在龙架构中出现),只能够通过删除一些代码来解决:

x Build failed in 30.97s
error during build:
unreachable
    at wasm://wasm/005ff59a:wasm-function[640]:0x13f87e
    at wasm://wasm/005ff59a:wasm-function[1291]:0x15f639
    at wasm://wasm/005ff59a:wasm-function[244]:0x108823
    at wasm://wasm/005ff59a:wasm-function[469]:0x132118
    at wasm://wasm/005ff59a:wasm-function[151]:0xe447e
    at wasm://wasm/005ff59a:wasm-function[328]:0x11f96b
    at wasm://wasm/005ff59a:wasm-function[307]:0x11bb0f
    at wasm://wasm/005ff59a:wasm-function[328]:0x11f92f
    at wasm://wasm/005ff59a:wasm-function[151]:0xe435e
    at wasm://wasm/005ff59a:wasm-function[35]:0x274dd
    at wasm://wasm/005ff59a:wasm-function[35]:0x250bd
    at wasm://wasm/005ff59a:wasm-function[35]:0x2505d
    at wasm://wasm/005ff59a:wasm-function[436]:0x12e2f9
    at wasm://wasm/005ff59a:wasm-function[35]:0x24277
    at wasm://wasm/005ff59a:wasm-function[292]:0x118c2d
    at wasm://wasm/005ff59a:wasm-function[35]:0x24545
    at wasm://wasm/005ff59a:wasm-function[151]:0xe446d
    at wasm://wasm/005ff59a:wasm-function[340]:0x121afe
    at wasm://wasm/005ff59a:wasm-function[35]:0x259f1
    at wasm://wasm/005ff59a:wasm-function[41]:0x3c6f5
    at wasm://wasm/005ff59a:wasm-function[393]:0x12977a
    at wasm://wasm/005ff59a:wasm-function[510]:0x136789
    at wasm://wasm/005ff59a:wasm-function[35]:0x26bd2
    at wasm://wasm/005ff59a:wasm-function[174]:0xef657
    at wasm://wasm/005ff59a:wasm-function[344]:0x122447
    at wasm://wasm/005ff59a:wasm-function[266]:0x10e8ea
    at wasm://wasm/005ff59a:wasm-function[811]:0x14d91a
    at module.exports.parse (/var/cache/acbs/build/acbs.k_wav_1x/clash-verge-rev/node_modules/.pnpm/@rollup+wasm-node@4.18.1/node_modules/@rollup/wasm-node/dist/wasm-node/bindings_wasm.js:132:14)
    at exports.parseAsync (/var/cache/acbs/build/acbs.k_wav_1x/clash-verge-rev/node_modules/.pnpm/@rollup+wasm-node@4.18.1/node_modules/@rollup/wasm-node/dist/native.js:10:2)
    at Module.setSource (file:///var/cache/acbs/build/acbs.k_wav_1x/clash-verge-rev/node_modules/.pnpm/@rollup+wasm-node@4.18.1/node_modules/@rollup/wasm-node/dist/es/shared/node-entry.js:14213:37)
    at ModuleLoader.addModuleSource (file:///var/cache/acbs/build/acbs.k_wav_1x/clash-verge-rev/node_modules/.pnpm/@rollup+wasm-node@4.18.1/node_modules/@rollup/wasm-node/dist/es/shared/node-entry.js:18861:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 ELIFECYCLE  Command failed with exit code 1.
       Error beforeBuildCommand `pnpm run web:build` failed with exit code 1

参考资料:

  1. AOSC-Tracking/clash-verge-rev(在原有基础上,加上一些修改以便于打包):https://github.com/AOSC-Tracking/clash-verge-rev/tree/aosc/v1.7.5
  2. 编译日志:https://buildit.aosc.io/logs/27389-clash-verge-rev-1.7.5-loongarch64-loong13-2024-07-17-14:10:56.txt
eatradish commented 1 month ago

使用 Node v22 编译后问题消失,这个 issue 还有必要保持打开吗?

xen0n commented 4 weeks ago

使用 Node v22 编译后问题消失,这个 issue 还有必要保持打开吗?

可能是不用的,因为如果再有人被坑到,那 ta 应该能搜索到这个 issue 于是知道该怎么办了