Opened 5 years ago

Closed 3 years ago

#51081 closed defect (worksforme)

pango @1.40.0 - build failing

Reported by: rbubley Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: pango


Pango build is failing (for me) with the following error:

:info:build In file included from pangocairo-coretextfont.c:32:
:info:build ./pangocairo-coretext.h:28:10: fatal error: 'cairo-quartz.h' file not found

The compile step failing is

/usr/bin/clang -arch x86_64 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Pango\" -DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE -DSYSCONFDIR=\"/Volumes/MacHD/opt/local/etc\" -DLIBDIR=\"/Volumes/MacHD/opt/local/lib\" -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/Volumes/MacHD/opt/local/include/glib-2.0 -I/Volumes/MacHD/opt/local/lib/glib-2.0/include -I/Volumes/MacHD/opt/local/include -I/opt/X11/include -I/opt/X11/include/freetype2 -I/Volumes/MacHD/opt/local/include/freetype2 -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/libpng16 -I/opt/X11/include -I/opt/X11/include/cairo -I/Volumes/MacHD/opt/local/include/pixman-1 -I/opt/X11/include -I/opt/X11/include/freetype2 -I/Volumes/MacHD/opt/local/include/freetype2 -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/libpng16 -I/opt/X11/include -I/Volumes/MacHD/opt/local/include/harfbuzz -I/Volumes/MacHD/opt/local/include/glib-2.0 -I/Volumes/MacHD/opt/local/lib/glib-2.0/include -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/freetype2 -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/libpng16 -I/opt/X11/include -I/opt/X11/include/freetype2 -I/Volumes/MacHD/opt/local/include/freetype2 -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/libpng16 -I/Volumes/MacHD/opt/local/include -pipe -Os -arch x86_64 -Wall -MT pangocoretext-shape.lo -MD -MP -MF .deps/pangocoretext-shape.Tpo -c pangocoretext-shape.c -o pangocoretext-shape.o >/dev/null 2>&1

cairo-quartz.h does exist on my system as I have cairo @1.14.6_0+quartz+x11 installed, but this puts the file into /opt/local/include/cairo/cairo-quartz.h, which is not on the list of paths included on the compile command.

Attachments (2)

main.log (264.2 KB) - added by rbubley 5 years ago.
config.log (55.4 KB) - added by rbubley 5 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: pango added

Please attach the main.log file. I see occurrences of "/opt/X11" in the failing compile step, which is not supposed to be there; the main.log file might explain why that happened.

Changed 5 years ago by rbubley

Attachment: main.log added

comment:2 Changed 5 years ago by ryandesign (Ryan Schmidt)

Hmm, I don't see any reason why /opt/X11 starts appearing in the build phase of that log. There's no mention of that location in the configure phase. The pango port does specify that X11 includes and libraries should be found in ${prefix} so it shouldn't be looking in /opt/X11.

Could you attach the config.log as well? (It's somewhere beneath the work directory, whose location is printed by the command port work pango)

Changed 5 years ago by rbubley

Attachment: config.log added

comment:3 Changed 5 years ago by ryandesign (Ryan Schmidt)

Ok, so /opt/X11 first appears in the config.log at the point where it is checking for FcWeightFromOpenType. What's the output of:

/Volumes/MacHD/opt/local/bin/pkg-config fontconfig --cflags --libs

Also, I just updated pango to 1.40.1. It includes a change to how pkg-config is used. If you wait 30 minutes and then run sudo port selfupdate to get that update, does you still see the problem with pango 1.40.1?

comment:4 Changed 5 years ago by rbubley

The output is

$ /Volumes/MacHD/opt/local/bin/pkg-config fontconfig --cflags --libs
-I/opt/X11/include -I/opt/X11/include/freetype2 -I/Volumes/MacHD/opt/local/include/freetype2 -I/Volumes/MacHD/opt/local/include -I/Volumes/MacHD/opt/local/include/libpng16 -L/opt/X11/lib -L/Volumes/MacHD/opt/local/lib -lfontconfig -lfreetype

And going one step further, I've checked /opt/local/lib/pkgconfig/fontconfig.pc, and this file contains the line "prefix=/opt/X11"


$ port provides /opt/local/lib/pkgconfig/fontconfig.pc 
/Volumes/MacHD/opt/local/lib/pkgconfig/fontconfig.pc is provided by: fontconfig

I uninstalled/reinstalled fontconfig, and it now points to the right location (prefix=/Volumes/MacHD/opt/local) – no idea how it came to be pointing at a different location previously.

But that too turned out not to be enough. I uninstalled and reinstalled cairo, and finally pango compiles cleanly.

So, it seems that there was some oddity with my system that is now resolved, but in any case hopefully this ticket will assist anyone else encountering a similar issue in the future.

In summary, what fixed it for me:

port -f uninstall fontconfig; port install fontconfig
port -f uninstall cairo; port install cairo

comment:5 Changed 3 years ago by ryandesign (Ryan Schmidt)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.