Fresh phx_new with fresh fly launch isn't working (tailwind gnu32 error)

As the title says, I span up a new phx project today, new fly launch. CTL verison v0.2.31.

When I deploy I get this builder error:

 > [builder 13/17] RUN mix assets.deploy:
0.668 20:36:37.295 [notice] Application tailwind exited: exited in: Tailwind.start(:normal, [])
0.668     ** (EXIT) an exception was raised:
0.668         ** (RuntimeError) tailwind is not available for architecture: x86_64-pc-linux-gnux32
0.668             (tailwind 0.2.1) lib/tailwind.ex:260:
0.668             (tailwind 0.2.1) lib/tailwind.ex:138: Tailwind.bin_path/0
0.668             (tailwind 0.2.1) lib/tailwind.ex:155: Tailwind.bin_version/0
0.668             (tailwind 0.2.1) lib/tailwind.ex:81: Tailwind.start/2
0.668             (kernel 9.1) application_master.erl:293: :application_master.start_it_old/4
0.668 20:36:37.302 [notice] Application castore exited: :stopped
0.669 ** (RuntimeError) tailwind is not available for architecture: x86_64-pc-linux-gnux32
0.669     (tailwind 0.2.1) lib/tailwind.ex:260:
0.669     (tailwind 0.2.1) lib/tailwind.ex:138: Tailwind.bin_path/0
0.669     (tailwind 0.2.1) lib/tailwind.ex:204: Tailwind.install_and_run/2
0.669     (tailwind 0.2.1) lib/mix/tasks/tailwind.ex:57: Mix.Tasks.Tailwind.install_and_run/1
0.669     (mix 1.16.2) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
0.669     (mix 1.16.2) lib/mix/task.ex:544: Mix.Task.run_alias/6
0.669     (mix 1.16.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2
0.669     /usr/local/bin/mix:2: (file)
Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/sh -c mix assets.deploy" did not complete successfully: exit code: 1

I’d like to dig through this and understand, but the bit I’m missing is why the fly build architecture is reporting as x86_64-pc-linux-gnux32 ?

Tips appreciated, thanks.

Update: To make this weirder, docker build . works locally, but fly deploy . --local-only fails with the same error as the remote builder.

Update 2: If I run docker build I’m using arch64 linux, 64 bit. But when I run fly build . --local-only or --remote-only the arch is 32 bit? Any ideas why this is?

# ["x86_64", "pc", "linux", "gnux32"] 

> :erlang.system_info(:wordsize) * 8
=> 32
1 Like

Isolating this further, this looks to be a problem with the image chosen by fly launch. I rolled back to an earlier image of bullseye.

bullseye-20240408-slim fails (32 bit system, no tailwind)
bullseye-20240130-slim works (64 bit system, tailwind package exists)

I can mark this as solved for anyone else coming across this. No, I don’t know why this version of bullseye is coming up as 32 bit…


Yeah for some reason some of the hexpm/elixir images are running an i386 architecture while most others are amd64 or arm64. I don’t know why though, from what I understand reading the code, it shouldn’t even build i386-based images.

I’ll submit a note with them as well. Though Fly might want to have some kind of allow-listing for the images, as this breaks when following official fly documentation / fly launch.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.