The problem is this line at
https://salsa.debian.org/js-team/node-undici/-/blame/master/debian/nodejs/build#L20
echo 'module.exports = "'`perl -MMIME::Base64 -000 -ne 'print encode_base64($_,"")' lib/llhttp/llhttp-wasm`'";' >
lib/llhttp/llhttp-wasm.js
it doesn't do what it is supposed to do
node -r .
Uncaught CompileError: WebAssembly.compile(): expected 48177 bytes, fell
off end @+1361
However it doesn't throw, when doing the same job with: fs.writeFileSync('lib/llhttp/llhttp-wasm.js', `module.exports = '${fs.readFileSync('lib/llhttp/llhttp-wasm').toString('base64')}'\n`)
I don't know perl... is MMIME::Base64 module broken in some weird and suspicious way (i'm being paranoid) ?
Anyway I don't see the point in doing the compilation without using build/wasm.js,
since node-undici requires nodejs to be built fully.
It is somewhat simpler to use the build-profiles / two-staged nodejs build method,
only on nodejs, instead of requiring some other node module to be built in
two stages too.
For these reasons I'm reverting this back to using build/wasm.js
Jérémy
<div dir="ltr">The problem is this line at <a href="
https://salsa.debian.org/js-team/node-undici/-/blame/master/debian/nodejs/build#L20">https://salsa.debian.org/js-team/node-undici/-/blame/master/debian/nodejs/build#L20</a><div>echo 'module.exports =
"'`perl -MMIME::Base64 -000 -ne 'print encode_base64($_,"")' lib/llhttp/llhttp-wasm`'";' > lib/llhttp/llhttp-wasm.js<br></div><div><br></div><div>it doesn't do what it is supposed to do<br></div><div>node -
r .</div><div>> Uncaught CompileError: WebAssembly.compile(): expected 48177 bytes, fell off end @+1361<br></div><div><br></div><div>However it doesn't throw, when doing the same job with:</div><div>fs.writeFileSync('lib/llhttp/llhttp-wasm.js&#
39;, `module.exports = '${fs.readFileSync('lib/llhttp/llhttp-wasm').toString('base64')}'\n`)<br></div><div><br></div><div>I don't know perl... is MMIME::Base64 module broken in some weird and suspicious way (i'm being
paranoid) ?</div><div><br></div><div>Anyway I don't see the point in doing the compilation without using build/wasm.js,</div><div>since node-undici requires nodejs to be built fully.</div><div>It is somewhat simpler to use the build-profiles / two-
staged nodejs build method,</div><div>only on nodejs, instead of requiring some other node module to be built in two stages too.</div><div><br></div><div>For these reasons I'm reverting this back to using build/wasm.js</div><div><br></div><div>Jéré
my</div><div><br></div><div><br></div></div>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)