Closed dch closed 1 year ago
Hi @dch! Can you please send a PR that adds only the target? Then with #60, you can do: mix tailwind.install custom-url
, which should make it easier for people to get it running on other platforms.
@josevalim done. It's great to see how #60 turned out, this is the way!
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
:rocket: :star_struck: :ping_pong: :earth_africa: :ocean:
dch@wintermute /p/i/indie> mix tailwind.install https://people.freebsd.org/~dch/pub/tailwind/v3.2.4/tailwindcss-freebsd-x64
dch@wintermute /p/i/indie> l _build/tailwind-freebsd-x64
-rwxr-xr-x 1 dch wheel 45M Jan 16 14:32 _build/tailwind-freebsd-x64*
dch@wintermute /p/i/indie>
Hi!, it seems that my FreeBSD version (13.1) isn´t compatible:
ld-elf.so.1: /usr/local/lib/gcc10/libstdc++.so.6: version GLIBCXX_3.4.30 required by /usr/home/leonardo/desarrollo/phoenix1.7/hello_world/_build/tailwind-freebsd-x64 not found
[info] Running HelloWorldWeb.Endpoint with cowboy 2.9.0 at 127.0.0.1:4000 (http)
ld-elf.so.1: /usr/local/lib/gcc10/libstdc++.so.6: version GLIBCXX_3.4.30 required by /usr/home/leonardo/desarrollo/phoenix1.7/hello_world/_build/tailwind-freebsd-x64 not found
Hi again, after spending many hours trying to compile tailwind without success I downloaded the Linux version: https://github.com/tailwindlabs/tailwindcss/releases/download/v3.2.4/tailwindcss-linux-x64
, as I have installed linuxulator
I can run it from command line without issues, then I copied it as tailwindcss-freebsd-x64
into my webserver (a local Apache24) and did mix tailwind.install http://127.0.0.1/tailwindcss-freebsd-x64
, it automatically downloaded and copied into my project's _build
directory, but when I run mix phx.server
it hangs forever without showing any error.
hey @leonardorame I think this will be one of 2 issues:
you're using FreeBSD quarterly ports, not latest (read /etc/pkg/FreeBSD.conf
), update your gcc version
you have multiple gcc installed and it's selecting the wrong one
Using https://people.freebsd.org/~dch/pub/tailwind/v3.2.6/tailwindcss-freebsd-x64
$ chmod +x ./tailwindcss-freebsd-x64
$ ldd ./tailwindcss-freebsd-x64
libutil.so.9 => /lib/libutil.so.9 (0x1c3cb1d0d000)
libkvm.so.7 => /lib/libkvm.so.7 (0x1c3cb0e2a000)
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x1c3cb247a000)
libstdc++.so.6 => /usr/local/lib/gcc12/libstdc++.so.6 (0x1c3cb2a00000) <---
libm.so.5 => /lib/libm.so.5 (0x1c3cb3277000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x1c3cb34ef000)
libthr.so.3 => /lib/libthr.so.3 (0x1c3cb4aa0000)
libc.so.7 => /lib/libc.so.7 (0x1c3cb3fb1000)
libelf.so.2 => /lib/libelf.so.2 (0x1c3cb5593000)
[vdso] (0x1c3cafa985d0)
For the latter, I need to ask a few people to figure out how this can be accommodated.
Hi @dch, yes I'm using quarterly ports and yes, I have gcc9, gcc10, gcc11 and gcc12.
When I run ldd on that file I get this:
tailwindcss-freebsd-x64:
libutil.so.9 => /lib/libutil.so.9 (0x80303f000)
libkvm.so.7 => /lib/libkvm.so.7 (0x803057000)
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x80306c000)
libstdc++.so.6 => /usr/local/lib/gcc10/libstdc++.so.6 (0x803072000) <--- gcc10 !
libm.so.5 => /lib/libm.so.5 (0x803459000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x803494000)
libthr.so.3 => /lib/libthr.so.3 (0x8034ae000)
libc.so.7 => /lib/libc.so.7 (0x8034dc000)
libelf.so.2 => /lib/libelf.so.2 (0x8038e6000)
Hi @dch, I created a Jail with latest ports and it worked!.
Now, it should be great if we can find a way to build it with quarterly ports. I think most users use RELEASE, which by default have quarterly ports.
@leonardorame try this one, https://builds.sr.ht/~dch/job/950069 via
curl -#L https://patchouli.sr.ht/builds.sr.ht/artifacts/~dch/950069/b55f38667af56331/tailwindcss-freebsd-x64 -o tailwind-freebsd-x64 && chmod +x tailwind-freebsd-x64
which should bind to gcc12 (lang/gcc atm) you'll need to have it installed but it shouldn't conflict. If this still doesn't work, let's take this privately as its not really a phx-tailwind issue.
Hi @dch - I used not your tailwind artifact on FreeBSD 13.1 (amd) with https://people.freebsd.org/~dch/pub/tailwind/v3.2.6/tailwindcss-freebsd-x64 and have now this issue.
ld-elf.so.1: /usr/local/lib/gcc11/libstdc++.so.6: version GLIBCXX_3.4.30 required by /var/tmp/gitlab_runner/builds/brxwgu9M/0/devpunx/jail_portal/_build/tailwind-freebsd-x64 not found
ld-elf.so.1: /usr/local/lib/gcc11/libstdc++.so.6: version GLIBCXX_3.4.30 required by /var/tmp/gitlab_runner/builds/brxwgu9M/0/devpunx/jail_portal/_build/tailwind-freebsd-x64 not found
** (Mix) `mix tailwind default --minify` exited with 1
I have gcc an gcc11 both available... any ideas?
@leonardorame can totally understand. One can build Elixir apps in hours and then has to spend hours or days to try to get this javascript tailwind crossover thingy running...
UPDATE: ... okay, used accidentally this one:
That's now way way way better to handle. I now just have a special mix step in my mix.exs that installs the freebsd bin and done!.
So good !!!!
We can't use upstream tailwind FreeBSD packages, because the vercel/pkg tool that tailwind relies on builds in github actions, which don't support FreeBSD. Thus we build these externally, and need to make a few modifications to accommodate this.
This is in "Works on my machine" mode presently; we could make further changes from here if interested:
I will generate the build artifacts separately with verifiable checksum shortly, which should improve the trust factor a bit.
Using https://builds.sr.ht/ and this manifest:
This is now the artefact at https://people.freebsd.org/~dch/pub/tailwind/v3.2.4/tailwindcss-freebsd-x64 at least for the moment.
Alternative approaches welcomed.