Open doyougnu opened 2 months ago
This is a non-issue actually.
We see the error in the build logs because stderr
is not captured here. That there is an error is actually expected. checkRDRAND
is working properly, RDRAND is not supported on JS so it should induce this error. Then this result is passed to the next check checkGetRandom
which is supported on JS and will properly set LocalBuildInfo
for Cabal.
So the actually issue is simply that the error is not captured by the code and we are observing it in the logs even though its benign.
This commit adds the
entropy
package to the ghcjs package set in this PR.entropy
finishes building, but the build log displays:What's going on? Well
emscripten
has failed to compile this function inentropy
'sSetup.hs
file. Why has emscripten failed here? Because emscripten does not support inline assembly only portable C/C++.What to do? I believe this is an upstream issue.
entropy
needs to be patched to use a JS random number generator sincerdrand
is not portable. That is the correct fix, alternatively, thecheckRDRAND
function could be changed to trivially pass on unsupported targets such as JS and WASM.