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] Musl/Alpine is not supported in the V4 prereleases #15031

Open
flavorjones opened this issue Nov 18, 2024 · 2 comments
Open

[v4] Musl/Alpine is not supported in the V4 prereleases #15031

flavorjones opened this issue Nov 18, 2024 · 2 comments

Comments

@flavorjones
Copy link

flavorjones commented Nov 18, 2024

What version of Tailwind CSS are you using?

v4.0.0-alpha.34

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

Binary CLI executable from https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.0.0-alpha.34

What version of Node.js are you using?

N/A

What browser are you using?

N/A

What operating system are you using?

Alpine Linux (musl libc)

Reproduction URL

You can see the failure in CI here: https://github.com/flavorjones/tailwindcss-ruby/actions/runs/11896261069/job/33147810896?pr=21#step:7:5

Compare with successful build run on a glibc system here: https://github.com/flavorjones/tailwindcss-ruby/actions/runs/11896261069/job/33147810459?pr=21#step:5:5

Describe your issue

When running the binary x86_64-linux executable on an Alpine (musl libc) system, I see:

/bin/sh: ./tailwindcss: not found

Running ldd to see whether shared libraries are resolved properly reveals the problem:

# ldd ./tailwindcss
        /lib64/ld-linux-x86-64.so.2 (0x72662d672000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x72662d672000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./tailwindcss)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x72662d672000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x72662d672000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x72662d672000)
Error relocating ./tailwindcss: gnu_get_libc_version: symbol not found
Error relocating ./tailwindcss: backtrace: symbol not found
Error relocating ./tailwindcss: backtrace_symbols: symbol not found
Error relocating ./tailwindcss: __cxa_thread_atexit_impl: symbol not found
Error relocating ./tailwindcss: __cxa_at_quick_exit: symbol not found
Error relocating ./tailwindcss: __register_atfork: symbol not found
Error relocating ./tailwindcss: __strftime_l: symbol not found
Error relocating ./tailwindcss: __cxa_thread_atexit_impl: symbol not found
Error relocating ./tailwindcss: unsupported relocation type 37
Error relocating ./tailwindcss: unsupported relocation type 37
Error relocating ./tailwindcss: unsupported relocation type 37

A previous issue (#14569) reported this, and the outcome was to open an upstream bun bug at oven-sh/bun#14292. The reply there was, essentially:

  • musl is not supported by bun and won't be
  • you should be able to apk install gcompat to make it work

Unfortunately, gcompat does not help:

# apk add gcompat
(1/3) Installing musl-obstack (1.2.3-r2)
(2/3) Installing libucontext (1.2-r3)
(3/3) Installing gcompat (1.1.0-r4)
OK: 89 MiB in 55 packages

# ./tailwindcss
Error relocating /tailwindcss-ruby-mount/exe/x86_64-linux/tailwindcss: unsupported relocation type 37
Error relocating /tailwindcss-ruby-mount/exe/x86_64-linux/tailwindcss: unsupported relocation type 37
Error relocating /tailwindcss-ruby-mount/exe/x86_64-linux/tailwindcss: unsupported relocation type 37

# ldd ./tailwindcss
        /lib64/ld-linux-x86-64.so.2 (0x7db1dbfca000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7db1dbfca000)
        ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7db1dbfbc000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7db1dbfca000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7db1dbfca000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7db1dbfca000)
Error relocating ./tailwindcss: gnu_get_libc_version: symbol not found
Error relocating ./tailwindcss: backtrace: symbol not found
Error relocating ./tailwindcss: backtrace_symbols: symbol not found
Error relocating ./tailwindcss: __cxa_thread_atexit_impl: symbol not found
Error relocating ./tailwindcss: __cxa_at_quick_exit: symbol not found
Error relocating ./tailwindcss: __register_atfork: symbol not found
Error relocating ./tailwindcss: __strftime_l: symbol not found
Error relocating ./tailwindcss: __cxa_thread_atexit_impl: symbol not found
Error relocating ./tailwindcss: unsupported relocation type 37
Error relocating ./tailwindcss: unsupported relocation type 37
Error relocating ./tailwindcss: unsupported relocation type 37

I suspect this is going to be a blocker to adoption for many people given how widespread Alpine images are, particularly in CI/CD pipelines.

@philipp-spiess
Copy link
Member

@flavorjones Thanks for the bug report! I agree that this is something that will cause a lot of frustrations and it's something we should find a solution for. We're currently working with the Bun team to adopt their new musl support that they just landed: oven-sh/bun#918

Will update this PR when we have news, right now we're blocked on oven-sh/bun#15307

@Robert344Humphries

This comment was marked as spam.

@flavorjones flavorjones changed the title [v4] Musl/Alpine is not supported in the V4 alphas [v4] Musl/Alpine is not supported in the V4 prereleases Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants