Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V4] Illegal instruction on older Mac Xeons due to same bun AVX #17259

Closed
julik opened this issue Mar 17, 2025 · 5 comments · Fixed by #17267
Closed

[V4] Illegal instruction on older Mac Xeons due to same bun AVX #17259

julik opened this issue Mar 17, 2025 · 5 comments · Fixed by #17267

Comments

@julik
Copy link

julik commented Mar 17, 2025

What version of Tailwind CSS are you using?

For example: v4.0.0 to 4.0.14

What build tool (or framework if it abstracts the build tool) are you using?

None, I try to run the CLI raw

What version of Node.js are you using?

For example: v22

What browser are you using?

Doesn't get there

What operating system are you using?

macOS 12.7.6

Reproduction URL

N/A

Describe your issue

Trying to run the tailwindcss binary results in a segfault with exit code 4 and SIGILL. This is likely the same issue as the one in #15181 . Also mentioned in #17098

philipp-spiess added a commit that referenced this issue Mar 20, 2025
Closes #17259

This PR now also updates the MacOS x64 build to use `bun-baseline`,
meaning all x64 builds now use baseline for the improved hardware
compatibility.

Co-authored-by: Robin Malfait <[email protected]>
@julik
Copy link
Author

julik commented Mar 21, 2025

@philipp-spiess Maybe I am missing something, but it doesn't seem the last build fixed the problem.

julik@jet tmp $ curl -L https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.15/tailwindcss-macos-x64 > tailwindcss && chmod a+x tailwindcss && ./tailwindcss
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  103M  100  103M    0     0  36.3M      0  0:00:02  0:00:02 --:--:-- 44.7M
Illegal instruction: 4
julik@jet tmp $ 

@julik
Copy link
Author

julik commented Mar 21, 2025

If someone can help me along in getting the development setup working, I can try to debug what's going on. Didn't succeed on my own during dependency install via pnpm, unfortunately (also somewhere in the bowels of bun native libs).

@julik
Copy link
Author

julik commented Mar 21, 2025

@philipp-spiess I have looked into this a bit further, and it looks like it's just a no go. Sorry to have sent you on a wild goose chase with this. While one may specify x64-baseline for some reason

Image

I do realise this computer and my use case is part of a small minority of users and I won't be debating your toolchain choices of course. It would be a good idea to put it somewhere front and center that for older macOS versions and Intel CPUs one has to run the tailwindcss binary in Docker or something 😭

Aside: I don't understand the exact reasoning behind oven-sh/bun@a4759eb and won't debate it with them either. That said, maybe a good approach for tailwindcss - if you want to have more backwards-compat - would be to pin to an older version of bun which still is able to produce a working baseline build for macOS.

I know that prebundling scripted langs into binaries is not an easy feat to do 🫂

@philipp-spiess
Copy link
Member

Ohhh, I'm sorry. Most other CPU instructions issue were solved by baseline so I just thought of using that since it seemingly existed but haven't realized it's actually not different.

would be to pin to an older version of bun which still is able to produce a working baseline build for macOS.

This won't help either since we depend a lot on new fixes being added since then :(

Unfortunately I think your best bet is to not use the standalone version of Tailwind CSS at the moment and instead use Node.js.

@julik
Copy link
Author

julik commented Mar 21, 2025

but haven't realized it's actually not different

Neither have I 😭

and instead use Node.js.

This sounds like a great idea! Is there a guide somewhere that I could follow to replace the binary with a wrapper script that uses the node version? I think this would solve my problem for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants