pycairo no longer installs

makkojoo
PRO

23 days ago

after mid-day today (CET) pycairo install started failing on all of our builds. I don't know what has changed in the environment. We've tried adding cairo as a package in both NIXPACKS_PKGS and we've tried with nixpacks.toml. Neither works.

Solved$10 Bounty

3 Replies

makkojoo
PRO

23 days ago

project: 45c1876a-a454-444e-9b70-e33bd5b762dd


23 days ago

https://pycairo.readthedocs.io/en/latest/getting_started.html
hmmm, it looks like pycairo needs libcairo2-dev pkg-config python3-dev


23 days ago

I dont know if nixpacks has this.
May I suggest using a custom Dockerfile?
You get much a higher level of control over anything when you use one. They might seem a bit odd at first but once you get the hang its wonderful.


makkojoo
PRO

23 days ago

we literally haven't changed anything today, and now we cannot deploy. It would take us quite a bit of time to build a custom Dockerfile now and this is literally blocking production deployments right now


23 days ago

Completely understand the frustration.
Let me do a bit of digging on this and get back to you


23 days ago

Can you share with me your current nixpacks.toml?


makkojoo
PRO

23 days ago

currently it's this as I tried to get it to find the package by forcing it but the error has been the same all along:

[phases.setup]
nixPkgs = ["sqlcipher", "coreutils", "openssh", "gnutar", "python3Packages.supervisor", "nginx", "gettext", "cairo", "pkg-config", "pango"]

[phases.install]
cmds = [
"python -m venv --copies /opt/venv && . /opt/venv/bin/activate && export PKGCONFIGPATH=\"$PKGCONFIGPATH:/root/.nix-profile/lib/pkgconfig\" && pip install -r requirements.txt"
]


makkojoo
PRO

23 days ago

(ie. we didn't use a custom phases.install earlier)


23 days ago

it looks like in setup its looking for pkgconfig not pkg-config


23 days ago

might be completely missing the point (not crazy familiar with nixpacks myself) but would swapping that or adding it to setup fix?


23 days ago

Let me know if it was that simple haha. The sheer number of times something this simple has happened is insane


makkojoo
PRO

23 days ago

no, the package is pkg-config.. it completely fails if I add pkgconfig


23 days ago

Sounds good. Wanted to rule that out haha.
Doing a bit more investigating


makkojoo
PRO

23 days ago

hmm.. I just noticed that all of our services builder has been changed to Railpack from Nixpacks


makkojoo
PRO

23 days ago

I remember seeing an email that it would be the default builder but we have not changed it on any of our projects


makkojoo
PRO

23 days ago

and it's not changing it back to nixpack no matter what I do


makkojoo
PRO

23 days ago

I change the builder, hit deploy and it changes it back to Railpack


makkojoo
PRO

23 days ago

Ok so here's what's happening:

  1. The Settings UI always shows railpack as the builder but actually it's not

  2. Nixpack builder was broken somehow today

  3. I got the build to work with railpack


makkojoo
PRO

23 days ago

looks like someone's made an oopsie


makkojoo
PRO

22 days ago

did you guys just drop the ball on this one??


22 days ago

Hey there!
Just an FYI the community help is entirely volunteer driven.
I have been working an 18 hour day so far and havent had time to work through these 😁

Will try to get back when im fully able to think about it but somebody else might be in that time!


Anonymous
HOBBY

22 days ago

I have got the same problem. I got ERROR: Dependency "cairo" not found when installing pycairo. But it was working several days ago. Did you find the solution?


makkojoo
PRO

22 days ago

hey no worries man, I didn't know that. This is clearly a Railway error and should not be handled by a volunteer but Railway engineering.


makkojoo
PRO

22 days ago

Something has been broken in the builders.. the only fix was to switch to railpack as a builder. This makes me lose a bit of faith in Railway as a production platform.


iloveitaly
HOBBY

22 days ago

@jmck0644 did you run into any trouble using railpack?

That's the new recommended builder (it's the default going forward).


makkojoo
PRO

22 days ago

no troubles.. it's just the fact that we have 50+ deployments with different versions etc so being forced to switch overnight is not a small feat


Anonymous
HOBBY

21 days ago

can you depoly using railpack? I still got the problem when using railpack.


makkojoo
PRO

19 days ago

yeah, I was able to deploy on railpack once I added the correct libraries to railpack.json aptPackages... now I'm struggling with so many other issues with railpack though. I'm quite angry about this forced migration that literally is keeping us from deploying to 50+ instances.


samgordon
PROTop 1% Contributor

19 days ago

@jmck0644 I'm going to follow up here…

sh -c 'echo deb http://deb.debian.org/debian bookworm-backports main > /etc/apt/sources.list.d/backports.list && apt-get update && apt-get install -y -t bookworm-backports sqlcipher=4.6.1-2~bpo12+1 && node server.js'

Please note the node server.js at the end there- change that to your apps start command.


makkojoo
PRO

19 days ago

so there's no way to get it to actually install it in railpack.json? This seems a bit bonkers


makkojoo
PRO

19 days ago

but as a workaround I just took yout sh command and created a script out of that


19 days ago

At a glance at the docs, it looks like you could put that start command in railpack.json

"deploy": {
    "startCommand": "node dist/index.js"
  }

samgordon
PROTop 1% Contributor

19 days ago

Can’t really find a way, Railway employee confirmed in the other thread as well


19 days ago

Ah then^


Status changed to Solved noahd 19 days ago


iloveitaly
HOBBY

17 days ago

@Sam (Loudbook) Hey, I can help here: what are you running to validate that sqlcipher is running properly? i.e. what JS is running that actually uses this apt package?

What I'd like to do is setup a example project that replicates this problem and then determine the best flow to fix it. I just need some help understanding what the minimum repro of the issue looks like,


samgordon
PROTop 1% Contributor

17 days ago

I believe the user was trying to use this package via SSH CLI? I’m not sure. All I know is they needed the package at runtime.


iloveitaly
HOBBY

17 days ago

@jmck0644 if you have some more details here I can look into building in better support for this (via docs or changes to the core) in railpack.