Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64001 closed defect (invalid)

Installing librsvg fails with pango errors

Reported by: breun (Nils Breunese) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones), jmroot (Joshua Root)
Port: librsvg

Description

Installing librsvg fails for me on macOS 12.0.1 x86_64:

❯ sudo port upgrade librsvg
--->  Computing dependencies for librsvg
--->  Fetching archive for librsvg
--->  Attempting to fetch librsvg-2.52.4_0.darwin_21.x86_64.tbz2 from https://packages.macports.org/librsvg
--->  Attempting to fetch librsvg-2.52.4_0.darwin_21.x86_64.tbz2 from https://fra.de.packages.macports.org/librsvg
--->  Attempting to fetch librsvg-2.52.4_0.darwin_21.x86_64.tbz2 from https://ema.uk.packages.macports.org/librsvg
--->  Configuring librsvg
Error: Failed to configure librsvg: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/config.log
Error: Failed to configure librsvg: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/main.log contains:

:info:configure checking for    cairo >= 1.16.0                 cairo-png >= 1.16.0             cairo-gobject >= 1.16.0         freetype2 >= 20.0.14            gdk-pixbuf-2.0 >= 2.20  gio-2.0 >= 2.24.0                       glib-2.0 >= 2.50.0              harfbuzz >= 2.0.0               libxml-2.0 >= 2.9.0             pangocairo >= 1.46.0            pangoft2 >= 1.46.0             ... no
:info:configure configure: error: Package requirements (        cairo >= 1.16.0                 cairo-png >= 1.16.0             cairo-gobject >= 1.16.0         freetype2 >= 20.0.14            gdk-pixbuf-2.0 >= 2.20  gio-2.0 >= 2.24.0                       glib-2.0 >= 2.50.0              harfbuzz >= 2.0.0               libxml-2.0 >= 2.9.0             pangocairo >= 1.46.0            pangoft2 >= 1.46.0             ) were not met:
:info:configure Requested 'pangocairo >= 1.46.0' but version of Pango Cairo is 1.42.4
:info:configure Requested 'pangoft2 >= 1.46.0' but version of Pango FT2 and Pango Fc is 1.42.4
:info:configure Consider adjusting the PKG_CONFIG_PATH environment variable if you
:info:configure installed software in a non-standard prefix.
:info:configure Alternatively, you may set the environment variables LIBRSVG_CFLAGS
:info:configure and LIBRSVG_LIBS to avoid the need to call pkg-config.
:info:configure See the pkg-config man page for more details.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4" && ./configure --prefix=/opt/local --enable-vala=yes --disable-silent-rules --disable-Bsymbolic --enable-introspection 
:info:configure Exit code: 1
:error:configure Failed to configure librsvg: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/config.log
:error:configure Failed to configure librsvg: configure failure: command execution failed
:debug:configure Error code: NONE

I've attached the full main.log and config.log files.

Attachments (2)

main.log.gz (3.4 KB) - added by breun (Nils Breunese) 2 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/main.log
config.log.gz (8.0 KB) - added by breun (Nils Breunese) 2 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/config.log

Download all attachments as: .zip

Change History (22)

Changed 2 years ago by breun (Nils Breunese)

Attachment: main.log.gz added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/main.log

Changed 2 years ago by breun (Nils Breunese)

Attachment: config.log.gz added

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/config.log

comment:1 Changed 2 years ago by breun (Nils Breunese)

Owner: set to dbevans
Port: librsvg added
Status: newassigned

comment:2 Changed 2 years ago by cjones051073 (Chris Jones)

works just fine for me here on macOS12 ....

are the rest of your ports up to date ? what does

Oberon ~/Projects/MacPorts/ports > port installed cairo pango
The following ports are currently installed:
  cairo @1.17.4_0+quartz+x11 (active)
  pango @1.48.10_0+quartz+x11 (active)

give you ?

comment:3 Changed 2 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:4 Changed 2 years ago by cjones051073 (Chris Jones)

Also, try running these commands

Oberon ~/Projects/MacPorts/ports > pkg-config pangocairo --modversion
1.48.10
Oberon ~/Projects/MacPorts/ports > pkg-config pangoft2 --modversion
1.48.10

comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)

Owner: changed from dbevans to mascguy

comment:6 Changed 2 years ago by breun (Nils Breunese)

All my ports are updated, sudo port selfupdate && port outdated doesn't list any outdated ports.

Those commands show the same output on my machine:

~ ❯ port installed cairo pango
The following ports are currently installed:
  cairo @1.17.4_0+quartz (active)
  pango @1.48.10_0+quartz (active)
~ ❯ pkg-config pangocairo --modversion
1.48.10
~ ❯ pkg-config pangoft2 --modversion
1.48.10

But apparently the librsvg install finds Pango 1.42.4 instead of 1.48.10.

comment:7 in reply to:  6 Changed 2 years ago by breun (Nils Breunese)

Replying to breun:

All my ports are updated, sudo port selfupdate && port outdated doesn't list any outdated ports.

Those commands show similar output on my machine, but I don't have the x11 variants installed:

~ ❯ port installed cairo pango
The following ports are currently installed:
  cairo @1.17.4_0+quartz (active)
  pango @1.48.10_0+quartz (active)
~ ❯ pkg-config pangocairo --modversion
1.48.10
~ ❯ pkg-config pangoft2 --modversion
1.48.10

But apparently the librsvg install finds Pango 1.42.4 instead of 1.48.10.

comment:8 in reply to:  6 ; Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to breun:

But apparently the librsvg install finds Pango 1.42.4 instead of 1.48.10.

I don't understand how that can be possible since there should be no pango 1.42.4 on your disk for it to find.

comment:9 in reply to:  8 Changed 2 years ago by cjones051073 (Chris Jones)

Replying to ryandesign:

Replying to breun:

But apparently the librsvg install finds Pango 1.42.4 instead of 1.48.10.

I don't understand how that can be possible since there should be no pango 1.42.4 on your disk for it to find.

Nils - Can you check to see if you have anything on your system user /usr/local that could be interfering here ?

comment:10 Changed 2 years ago by cjones051073 (Chris Jones)

Just to note, none of the buildbots had an issue either with this update

https://ports.macports.org/port/librsvg/builds/

Nils - You must have something installed that is interfering here....

comment:11 Changed 2 years ago by cjones051073 (Chris Jones)

you also could try building under trace-mode ?

comment:12 Changed 2 years ago by breun (Nils Breunese)

I have this issue on two machines.

When I tried to install the update with trace mode enabled this appeared in the output:

Warning: The following files inside the MacPorts prefix not installed by a port were accessed:
  /opt/local/lib/pkgconfig/pango.pc
  /opt/local/lib/pkgconfig/pangocairo.pc

The contents of these files indeed refer to version 1.42.4:

❯ cat /opt/local/lib/pkgconfig/pango.pc
prefix=/opt/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Pango
Description: Internationalized text handling
Version: 1.42.4
Requires: glib-2.0 gobject-2.0
Requires.private: fribidi
Libs: -L${libdir} -lpango-1.0
Libs.private: -lm
Cflags: -I${includedir}/pango-1.0
~ ❯ cat /opt/local/lib/pkgconfig/pangocairo.pc
prefix=/opt/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Pango Cairo
Description: Cairo rendering support for Pango
Version: 1.42.4
Requires: pango cairo
Requires.private:  pangoft2
Libs: -L${libdir} -lpangocairo-1.0 
Cflags: -I${includedir}/pango-1.0

I don't know why these files are here, but according to MacPorts there are not installed by a port. Any ideas about why I would have these files? Should I just delete these files?

comment:13 Changed 2 years ago by cjones051073 (Chris Jones)

Your installation is in a funny state, as those files are provided by a port, namely pango

Oberon ~/Projects/MacPorts/ports > cat /opt/local/lib/pkgconfig/pangocairo.pc
prefix=/opt/local
libdir=${prefix}/lib
includedir=${prefix}/include

Name: Pango Cairo
Description: Cairo rendering support for Pango
Version: 1.48.10
Requires: pango, cairo >=  1.12.10
Requires.private: pangoft2, glib-2.0 >=  2.62, gobject-2.0 >=  2.62, gio-2.0 >=  2.62, fribidi >=  1.0.6, harfbuzz >=  2.2.0, fontconfig >=  2.11.91, freetype2, xrender, xft >=  2.0.0, harfbuzz-gobject >=  2.2.0
Libs: -L${libdir} -lpangocairo-1.0
Libs.private: -lm -framework CoreFoundation -framework ApplicationServices
Cflags: -I${includedir}/pango-1.0
Oberon ~/Projects/MacPorts/ports > cat /opt/local/lib/pkgconfig/pango.pc     
prefix=/opt/local
libdir=${prefix}/lib
includedir=${prefix}/include

Name: Pango
Description: Internationalized text handling
Version: 1.48.10
Requires: gobject-2.0 >=  2.62, harfbuzz >=  2.2.0
Requires.private: glib-2.0 >=  2.62, gio-2.0 >=  2.62, fribidi >=  1.0.6, fontconfig >=  2.11.91, freetype2, xrender, xft >=  2.0.0, cairo >=  1.12.10
Libs: -L${libdir} -lpango-1.0
Libs.private: -lm -framework CoreFoundation -framework ApplicationServices
Cflags: -I${includedir}/pango-1.0
Oberon ~/Projects/MacPorts/ports > port contents pango | grep pkgconfig
  /opt/local/lib/pkgconfig/pango.pc
  /opt/local/lib/pkgconfig/pangocairo.pc
  /opt/local/lib/pkgconfig/pangofc.pc
  /opt/local/lib/pkgconfig/pangoft2.pc
  /opt/local/lib/pkgconfig/pangoot.pc
  /opt/local/lib/pkgconfig/pangoxft.pc

yes, at this point you need to resolve this by hand.

Last edited 2 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:14 Changed 2 years ago by breun (Nils Breunese)

The pango port is not installed on my system:

❯ port contents pango                 
Port pango is not installed.

After removing /opt/local/lib/pkgconfig/pango.pc and /opt/local/lib/pkgconfig/pangocairo.pc the installation of librsvg wanted to install the Xft2 and pango ports. This failed because /opt/local/include/X11/Xft/Xft.h already exists and does not belong to a registered port. After a bunch more removing unowned files and forcing port activations I now have it working again. I do wonder how I got both of my machines into this state.

I guess this happened with the upgrade to macOS 12. I wonder if I have more files under /opt/local without a port that owns them. Do you happen to know if there is a way to check this for all files under /opt/local?

comment:15 Changed 2 years ago by cjones051073 (Chris Jones)

Resolution: invalid
Status: assignedclosed

librsvg declares a dependency on pango so unless you did something ill-advised, it should not be possible to have it installed without also having pango installed.

When you upgraded to macOS12 did you correctly follow the migration guide, to reinstall all your ports for the new OS ?

It does sound like your system is in a bit of a mess. At this point I would probably consider wiping it out and reinstalling from scratch.

Closing this, as it isn't a port bug.

comment:16 Changed 2 years ago by breun (Nils Breunese)

It is possible to have librsvg installed without having pango installed, because librsvg depends on the presence of lib/pkgconfig/pango.pc (which I had on my system, but not the expected version), which the pango port as a fallback for when that file does not exist (https://github.com/macports/macports-ports/blob/master/graphics/librsvg/Portfile#L26):

path:lib/pkgconfig/pango.pc:pango

If this was port:pango, then I would have probably found out sooner what was up.

But yes, it seems something funky happened on my MacPorts installations.

Version 0, edited 2 years ago by breun (Nils Breunese) (next)

comment:17 in reply to:  16 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: jmroot added

Replying to breun:

It is possible to have librsvg installed without having pango installed, because librsvg depends on the presence of lib/pkgconfig/pango.pc (which I had on my system, but not the expected version), with the pango port as a fallback for when that file does not exist (https://github.com/macports/macports-ports/blob/master/graphics/librsvg/Portfile#L26):

path:lib/pkgconfig/pango.pc:pango

If this was port:pango, then I would have probably found out sooner what was up.

But yes, it seems something funky happened on my MacPorts installations.

That's a good point, as the existence of lib/pkgconfig/pango.pc would theoretically satisfy the dependency.

@jmroot, can you confirm? And any other general thoughts on this ticket?

comment:18 Changed 2 years ago by cjones051073 (Chris Jones)

Yes, I should have checked the dependency type librsvg was using, but a path style dep. like path:lib/pkgconfig/pango.pc:pango would explain how pango wasn't installed, if there was a zombie file left over for some reason that satisfied the path dependency, as I do not believe it is a requirement that the file satisfying it belongs to a port (for good reasons).

How Nils go into the state he was in on his system only he can really answer though.

Last edited 2 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:19 Changed 2 years ago by kencu (Ken)

I have from time to time run a "sanity check" on my /opt/local/lib and /opt/local/include folders, iterating over each file and running them through xargs to run a "port provides" on them, to make sure that no cruft has made it's way into those folders.

It is simple to do as a "one liner" manually in the terminal, but no doubt someone could run up a quick little shell script to do it too.

It would be great if such things became part of 'port diagnose' some day, along with a few other things of a similar nature that have come to mind over the years.

Would save people like Nils a lot of indigestion.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:20 Changed 2 years ago by breun (Nils Breunese)

Thanks for the pointer:

❯ find /opt/local/lib /opt/local/include -type f | xargs port provides | grep -v ' is provided by: '                
/opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache is not provided by a MacPorts port.
/opt/local/lib/.turd_MacPorts is not provided by a MacPorts port.
/opt/local/include/.turd_MacPorts is not provided by a MacPorts port.
Note: See TracTickets for help on using tickets.