Closed WhoAteDaCake closed 1 year ago
bun --help
crashes the same way
This is most likely due to missing AVX2 instruction support.
Can you run this and tell me if it prints anything?
grep avx2 /proc/cpuinfo
I think you're right, I had similar problem with tensorflow as well.
grep avx2 /proc/cpuinfo
Returned nothing. Is there any workaround for this? Like if I build manually and pass a certain flag.
Just a workaround:
You can use the Intel-SDE to emulate avx2 capabilities, or at least that's what I'm currently doing. It is emulation so you might not be allowed to care about performance. Install intel-sde (I use arch btw and there it's in the AUR) and then do a cheeky sde -- bun --help
At least the help page works with this for me personally and I'll play around with it a little to check if it 'just works'. Hope so anyways.
Just a workaround: You can use the Intel-SDE to emulate avx2 capabilities, or at least that's what I'm currently doing. It is emulation so you might not be allowed to care about performance. Install intel-sde (I use arch btw and there it's in the AUR) and then do a cheeky
sde -- bun --help
At least the help page works with this for me personally and I'll play around with it a little to check if it 'just works'. Hope so anyways.
it seems that doesn't work for me :(
I'm new to the whole sde thing, just stumbled over it like half an hour ago, but what happens if you fiddle around with the -chip-check
options? What happens if you try stuff like -chip-check-disable
or -chip-check-exe-only
? Just saw it in the -help-long
so don't expect anything, I'm really no expert.
Using -chip-check-disable
works for me, maybe axv2 is able only on newer intel processor? idk about AXV2
Worked perfectly well for me! Now i can use bun
. Thanks @deijjji303 and @pedrinfx!
Just a workaround: You can use the Intel-SDE to emulate avx2 capabilities, or at least that's what I'm currently doing. It is emulation so you might not be allowed to care about performance. Install intel-sde (I use arch btw and there it's in the AUR) and then do a cheeky
sde -- bun --help
At least the help page works with this for me personally and I'll play around with it a little to check if it 'just works'. Hope so anyways.Using
-chip-check-disable
works for me, maybe axv2 is able only on newer intel processor? idk about AXV2
<path/to/sde/installation>/sde64 -chip-check-disable -- bun
works perfectly!
For users who dont want to write such long line, they can make an alias
and add it to your .bashrc or .zshrc ;)
alias sde='~/sde-external-9.7.0-2022-05-09-lin/sde64'
alias bun='sde -chip-check-disable -- bun'
and after restarting your shell, run bun
and it just works perfectly, just like you have no problems in the first place :)
You can download the sde by running these lines btw:
wget https://downloadmirror.intel.com/732268/sde-external-9.7.0-2022-05-09-lin.tar.xz
tar -xf sde-external-9.7.0-2022-05-09-lin.tar.xz
run the above in ur home folder, or edit the alias urself to keep the paths updated ;)
Btw, isnt bun's startup time a lot slower than node? Atleast when running with this sde... The http.ts file provided in example of bunjs takes like 10 secs to start up... Pretty sure nodejs would start it up in like 2-3 secs max... PS: Using wsl2 ubuntu, on Pentium cpu
That is very true, yes. The reason for that is that in its current form, bun appears to leverage the avx2 instruction set to do very specific things way more efficiently. What we are doing here is emulating the 'avx2 part of the cpu' (idk maybe even the whole cpu) in order to get it to run. Does it provide us with buns speed benefit? I guess no, really not. Does it allow us to play around with buns all inclusive toolset? Yea. The SDE way isn't for people who want to use bun because it's faster, but for those who just want so have some way of playing around with it. Would be very nice if at some point there would be a non-avx2 version of bun, that would still be faster than node etc. to some degree, so I really hope that for unsupported CPU's this is not the permanent way to run things
I think a little note about this in the readme would be good for newcomers until this issue is resolved
Also just for completeness: possible duplicate of #67
I've made a script to simplify and automate SDE's installation based on @renhiyama's solution, lmk if there's anything to fix.
$ curl https://gist.githubusercontent.com/fuka-g/afb29296db34d2451cdddcc14dbeef3c/raw/0c9e5d43910cf53b9bd82b358559bb8b75ebbfdc/bun-sde-fix-install_script.sh | bash
EDIT: Updated script, this one is up to date.
Script updated to fix architecture issues https://gist.github.com/spidyhackx/194108a0df2b4fc8df642f126edcc0e5
Hi, I tried to run
curl -fsSL https://bun.sh/install | bash
command on my machine, which crashed withLinux:
5.17.0-051700-generic
System:Is there a way I could provide more information?