Bug 286096 - graphics/librsvg2-rust: doesn't compile, cairo.pc not found but exists
Summary: graphics/librsvg2-rust: doesn't compile, cairo.pc not found but exists
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-14 14:18 UTC by PG
Modified: 2025-04-18 04:47 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments
compile log + pkg-static info -g -Ea + meson-log.txt (93.78 KB, text/plain)
2025-04-14 14:18 UTC, PG
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description PG 2025-04-14 14:18:00 UTC
Created attachment 259547 [details]
compile log + pkg-static info -g -Ea + meson-log.txt

Hi,

I try to compile some ports from source, and everything seems correct up to graphics/librsvg2-rust

# uname -r
14.2-RELEASE-p1

# cd /usr/ports/
# git log --date=iso8601-strict -n 1 --pretty=format:'%cI %H'
2025-04-13T21:38:35+02:00 dd3766b3fc0794abca3182d2dcbf691329610b92

# make -C /usr/ports/graphics/librsvg2-rust/ clean
===>  Cleaning for librsvg2-rust-2.60.0_1
# make -C /usr/ports/graphics/librsvg2-rust/ missing
# make -C /usr/ports/graphics/librsvg2-rust/ install
[... full log in attachment ... ]
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cargo found: YES 1.86.0 1.86.0 (/usr/local/bin/cargo)
Program meson/cargo_wrapper.py found: YES (/usr/ports/graphics/librsvg2-rust/work/librsvg-2.60.0/meson/cargo_wrapper.py)
Program cargo-cbuild found: YES 0.10.12 0.10.12 (/usr/local/bin/cargo-cbuild)
Program rustc found: YES 1.86.0 1.86.0 (/usr/local/bin/rustc)
Program meson/makedef.py found: YES (/usr/ports/graphics/librsvg2-rust/work/librsvg-2.60.0/meson/makedef.py)
Program python3 found: YES (/usr/local/bin/python3.11)
Found pkg-config: YES (/usr/local/bin/pkgconf) 2.3.0
Run-time dependency cairo found: YES 1.18.2
Found CMake: /usr/local/bin/cmake (3.31.6)
Run-time dependency cairo-gobject found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency cairo-gobject

meson.build:70:17: ERROR: Neither a subproject directory nor a cairo.wrap file was found.

A full log can be found at /usr/ports/graphics/librsvg2-rust/work/librsvg-2.60.0/_build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
===>  Script "configure" failed unexpectedly.
#

# pkg which /usr/local/libdata/pkgconfig/cairo.pc
/usr/local/libdata/pkgconfig/cairo.pc was installed by package cairo-1.18.2,3

I tried with PKG_CONFIG_PATH = /usr/local/libdata/pkgconfig/ exported, and also the same variable defined in /usr/local/etc/pkg.conf, but with no changed detected.

Thanks in advance
Comment 1 PG 2025-04-17 17:58:28 UTC
Ok, I think I got it...

To trigger the problem, just install cairo unchecking the GLIB option.
I did it before in an attempt to work around the apparent circular dependency between glib20 and gobject-introspection, and forgot it later.
Reinstalling cairo with the GLIB option made the problem disappear.

IMHO, to prevent such problem the dependencies should specify the required options. But I don't know if it's possible and how to do it.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2025-04-18 04:47:11 UTC
(In reply to PG from comment #1)
> IMHO, to prevent such problem the dependencies should specify the required options. But I don't know if it's possible and how to do it.

No, this is not possible for OPTIONS, but FLAVORS are essentially dependable options.

I don't see a strong reason to flavorize cairo, though.