Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#18956 closed defect (fixed)

Unable to build pango with +quartz +no_x11

Reported by: macports@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: dreamind@…, lucian.branescu@…, treaves@…, philipp@…, Damien@…
Port: pango

Description

I am unable to build pango 1.24.0_0 with +no_x11 +quartz. Here's the last output:

/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-pangocairo.o -MD -MP -MF .deps/viewer-pangocairo.Tpo -c -o viewer-pangocairo.o viewer-pangocairo.c
mv -f .deps/viewer-pangocairo.Tpo .deps/viewer-pangocairo.Po
/bin/sh ../libtool --tag=CC   --mode=link /usr/bin/gcc-4.0  -O2 -Wall  -L/opt/local/lib -no-undefined -bind_at_load -o pango-view viewer-render.o viewer-main.o pango-view.o  viewer-pangoft2.o  viewer-cairo.o viewer-pangocairo.o ../pango/libpango-1.0.la -L/opt/local/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv    ../pango/libpangoft2-1.0.la -L/opt/local/lib -lfreetype -lz   -L/opt/local/lib -lfontconfig -lexpat -lfreetype -lz    ../pango/libpangocairo-1.0.la -L/opt/local/lib -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lXrender -lX11 -lXau -lXdmcp   
libtool: link: /usr/bin/gcc-4.0 -O2 -Wall -bind_at_load -o .libs/pango-view viewer-render.o viewer-main.o pango-view.o viewer-pangoft2.o viewer-cairo.o viewer-pangocairo.o  -L/opt/local/lib ../pango/.libs/libpango-1.0.dylib ../pango/.libs/libpangoft2-1.0.dylib ../pango/.libs/libpangocairo-1.0.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_pango/work/pango-1.24.0/pango/.libs/libpangoft2-1.0.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_pango/work/pango-1.24.0/pango/.libs/libpango-1.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib -lc /opt/local/lib/libcairo.dylib /opt/local/lib/libpixman-1.dylib -lm /opt/local/lib/libfontconfig.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libpng12.dylib -lz /opt/local/lib/libXrender.dylib /opt/local/lib/libX11.dylib /opt/local/lib/libXau.dylib /opt/local/lib/libXdmcp.dylib -framework Cocoa -framework CoreFoundation -framework Carbon
Undefined symbols:
  "_x_viewer", referenced from:
      _cairo_x_viewer_iface in viewer-cairo.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [pango-view] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

I'm on an Intel Mac with Leopard and MacPorts 1.7.0.

Change History (28)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

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

comment:2 Changed 15 years ago by blb@…

What is the output from running

port installed cairo

comment:3 Changed 15 years ago by macports@…

It's:

$ port installed cairo
The following ports are currently installed:
  cairo @1.8.6_3+macosx
  cairo @1.8.6_4+macosx (active)
  cairo @1.8.6_4+macosx+quartz

I've discovered that I can leave out +quartz, and same the error still happens:

 port install pango +no_x11

comment:4 Changed 15 years ago by blb@…

The problem is that your currently-active cairo port isn't installed with "+no_x11 +quartz", you need to make sure everything needed by pango is built that way (and you have to do it manually until someone implements ticket #126).

comment:5 Changed 15 years ago by macports@…

Wow, that's an old ticket. Anyway, I installed and activated cairo with +no_x11 +quartz" and tried building pango with the same variants. The build still fails, but a different place:

/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-pangoft2.o -MD -MP -MF .deps/viewer-pangoft2.Tpo -c -o viewer-pangoft2.o viewer-pangoft2.c
mv -f .deps/viewer-pangoft2.Tpo .deps/viewer-pangoft2.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-cairo.o -MD -MP -MF .deps/viewer-cairo.Tpo -c -o viewer-cairo.o viewer-cairo.c
viewer-cairo.c:34:24: error: cairo-xlib.h: No such file or directory
viewer-cairo.c: In function 'cairo_x_view_iface_create_surface':
viewer-cairo.c:47: warning: implicit declaration of function 'cairo_xlib_surface_create'
viewer-cairo.c:49: warning: return makes pointer from integer without a cast
make[3]: *** [viewer-cairo.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

comment:6 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Did you clean pango before trying again?

sudo port clean pango

"cairo-xlib.h: No such file or directory" means pango is looking for the file cairo-xlib.h, which does not exist, because xlib is part of what you turned off by using the no_x11 variant. Pango is either incompatible with that (unlikely) or did not realize you had changed cairo.

comment:7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Since r47716, pango already included a warning which should have prevented any attempt to install pango +quartz if cairo was not installed with +quartz. In r48569, I now added a similar warning to prevent installing pango +no_x11 if cairo is not installed with +no_x11.

comment:8 Changed 15 years ago by macports@…

Yes, in the beginning I tried building pango without +no_x11 on cairo, this warning worked as intended. Anyway, here's the full clean/deactivate/install:

$ sudo port clean cairo pango && sudo port deactivate pango cairo && sudo port install cairo +no_x11 && sudo port install pango +no_x11
--->  Cleaning cairo
--->  Cleaning pango
--->  Deactivating pango
--->  Deactivating cairo
--->  Fetching cairo
--->  Verifying checksum(s) for cairo
--->  Extracting cairo
--->  Applying patches to cairo
--->  Configuring cairo
--->  Building cairo
--->  Staging cairo into destroot
--->  Installing cairo @1.8.6_4+macosx+no_x11
--->  Activating cairo @1.8.6_4+macosx+no_x11
--->  Cleaning cairo
--->  Fetching pango
--->  Verifying checksum(s) for pango
--->  Extracting pango
--->  Applying patches to pango
--->  Configuring pango
--->  Building pango
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_pango/work/pango-1.24.0" && make all " returned error 2
Command output: libtool: link: /usr/bin/grep -E -e "^script_engine_.*" ".libs/pango-tibetan-fc.exp" > ".libs/pango-tibetan-fc.expT"
libtool: link: mv -f ".libs/pango-tibetan-fc.expT" ".libs/pango-tibetan-fc.exp"
libtool: link: sed -e 's,^,_,' < .libs/pango-tibetan-fc.exp > .libs/pango-tibetan-fc-symbols.expsym
libtool: link: /usr/bin/gcc-4.0  -o .libs/pango-tibetan-fc.so -bundle  .libs/tibetan-fc.o   -L/opt/local/lib ../../pango/.libs/libpango-1.0.dylib ../../pango/.libs/libpangoft2-1.0.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_pango/work/pango-1.24.0/pango/.libs/libpango-1.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib -lc -lm /opt/local/lib/libfontconfig.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libexpat.dylib /opt/local/lib/libfreetype.dylib -lz  -Wl,-dylib_file -Wl,/opt/local/lib/libpango-1.0.0.dylib:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_pango/work/pango-1.24.0/pango/.libs/libpango-1.0.dylib   -framework Carbon -Wl,-exported_symbols_list,.libs/pango-tibetan-fc-symbols.expsym
libtool: link: dsymutil .libs/pango-tibetan-fc.so || :
warning: no debug map in executable (-arch i386)
libtool: link: ar cru .libs/pango-tibetan-fc.a  tibetan-fc.o
libtool: link: ranlib .libs/pango-tibetan-fc.a
libtool: link: ( cd ".libs" && rm -f "pango-tibetan-fc.la" && ln -s "../pango-tibetan-fc.la" "pango-tibetan-fc.la" )
Writing a pango.modules file to use with tests/examples.
Making all in pango-view
cp ./../modules/pangorc pangorc
make  all-am
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-render.o -MD -MP -MF .deps/viewer-render.Tpo -c -o viewer-render.o viewer-render.c
mv -f .deps/viewer-render.Tpo .deps/viewer-render.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-main.o -MD -MP -MF .deps/viewer-main.Tpo -c -o viewer-main.o viewer-main.c
mv -f .deps/viewer-main.Tpo .deps/viewer-main.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT pango-view.o -MD -MP -MF .deps/pango-view.Tpo -c -o pango-view.o pango-view.c
mv -f .deps/pango-view.Tpo .deps/pango-view.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-pangoft2.o -MD -MP -MF .deps/viewer-pangoft2.Tpo -c -o viewer-pangoft2.o viewer-pangoft2.c
mv -f .deps/viewer-pangoft2.Tpo .deps/viewer-pangoft2.Po
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I.. -DG_DISABLE_CAST_CHECKS -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng12   -I/opt/local/include/freetype2 -I/opt/local/include   -I/opt/local/include     -I/opt/local/include -no-cpp-precomp  -O2 -Wall -MT viewer-cairo.o -MD -MP -MF .deps/viewer-cairo.Tpo -c -o viewer-cairo.o viewer-cairo.c
viewer-cairo.c:34:24: error: cairo-xlib.h: No such file or directory
viewer-cairo.c: In function 'cairo_x_view_iface_create_surface':
viewer-cairo.c:47: warning: implicit declaration of function 'cairo_xlib_surface_create'
viewer-cairo.c:49: warning: return makes pointer from integer without a cast
make[3]: *** [viewer-cairo.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

comment:9 Changed 15 years ago by lucian.branescu@…

I was trying to install py25-gtk with +no_x11 +quartz. Basically everything gtk should be +no_x11 +quartz.

$ port installed cairo
The following ports are currently installed:
  cairo @1.8.6_4+macosx+no_x11+quartz (active)

I got the exact same error as on the ticket at first. After a clean, I again get the exact same error as the post above.

comment:10 Changed 15 years ago by dreamind@…

I get also the same error since I tried to upgrade to pango 1.24. Pango 1.22 with +no_x11 and +quartz worked fine.

comment:11 Changed 15 years ago by dreamind@…

Cc: dreamind@… added

Cc Me!

comment:12 Changed 15 years ago by lucian.branescu@…

Cc: lucian.branescu@… added

Cc Me!

comment:13 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: treaves@… added

Has duplicate #19115.

comment:14 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

This problem was brought to the attention of the Pango developers, who suggested using this patch. I will try this soon.

comment:15 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: philipp@… added

Has duplicate #19180.

comment:16 Changed 15 years ago by philipp@…

It builds alright using that patch!!!!

comment:17 in reply to:  16 Changed 15 years ago by lucian.branescu@…

Replying to philipp@…:

It builds alright using that patch!!!!

Could it get included in the port? I'm not sure how to add patches to my own ports and I'm sure there are others in the same situation.

comment:18 Changed 15 years ago by philipp@…

to add a patch to your build, just sudo port install pango +quartz +no_x11 then after it fails do NOT clean, but add the two changed files to pango's build directory /opt/local/var/....... where the are already located in older versions, or use spotlight to find the location of the files... just copy the new one over the old ones then sudo port install pango +quartz +no_x11 again. I guess ryandesign will add the patch to the port once they have tested it thouroughly....., no?

comment:19 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Before I apply a patch I like to reproduce the problem on my system, so that I can verify that the patch fixes it. But I have yet to find any way to cause the problem on my system (Mac OS X 10.5.6 Intel, Xcode 3.1.2, MacPorts 1.7.1). Can someone give me a reproduction recipe? What ports need to be installed with what variants, in order to cause pango (with what variants?) to say "error: cairo-xlib.h: No such file or directory"? And please provide the specific version of Mac OS X and Xcode you are using. Thanks.

comment:20 Changed 15 years ago by philipp@…

Steps to reproduce:

all you need to do is uninstall installed. clean all and sync macports and then install pango +no_x11 +quartz. Because if you have a cairo with x11 installed the error might not happen under certain circumstances where pango's compatibility switches might find out or not whether cairo's installed and activated version is fitting or not. So make sure you only have cairo +no_x11 +quartz installed or cairo not at all installed and then install pango 1.24. macports will try to get the dependencies and install them just fine and fail on pango...

This will install cairo +no_x11 +quartz automatically and pango will fail after....or try to install gimp without x11 so to speak have a clean macports and try to do the following

install macports from macports.org

2) add +quartz +atsui +no_x11 -x11 to /opt/local/etc/macports/variants.conf

3) run:

sudo port -d sync sudo port install gimp2 +without_gnome -dbus sudo port install gimp-user-manual macfile-gimp macclipboard-gimp icns-gimp

4) download GIMPskel.zip from gimp-app.sf.net and extract

5) load ScriptExecCocoa/ScriptExec.xcodeproj with Xcode and click build

6) run gimpguts.sh

This will definitely fail pango 1.24 +no_x11 +quartz

Yes -> Mac OS 10.5.6, XCode 3.1.2, MacPorts 1.7.1.

The whole issue seems to be much older though. I found some bug reports from 2006 that were fixed, and from 2007 as well. It seems that pango development neglects the wish to install without x11 again and again and therefore has to fix this bug (same from user perspective, even if always on a different part in code...) again and again...

comment:21 in reply to:  20 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to philipp@…:

all you need to do is uninstall installed. clean all and sync macports and then install pango +no_x11 +quartz.

I was unable to reproduce the problem on Tiger running "sudo port install pango +no_x11 +quartz" in a clean MacPorts 1.7.1 environment with no prior ports installed. (I did run into #18958 but this isn't related.) I will try again on Leopard.

Because if you have a cairo with x11 installed the error might not happen under certain circumstances where pango's compatibility switches might find out or not whether cairo's installed and activated version is fitting or not.

If you have cairo with X11 support (cairo without the +no_x11 variant), MacPorts will not allow you to install pango +no_x11. I added specific checks for this in r48569.

comment:22 Changed 15 years ago by philipp@…

Yes Leopard 10.5.6! Yes you added the checks, but when I tried numerous times, at one time they didn't succeed. I couldn't reproduce that particular circumstances again, after I uninstalled and cleaned cairo without +no_x11 and reinstalled it with +no_x11 +quartz. With the patch it builds fine.

comment:23 Changed 15 years ago by lucian.branescu@…

Mac OS X 10.5.6 Intel, Xcode 3.1.2, MacPorts 1.7.1 With a clean macports install, ports install py25-gtk +no_x11 +quartz reveals the bug

I've tried the patch, it worked fine. PyGTK hello world runs. The patch itself is tiny, it just change an #ifdef and adds two more, all related to X and X_LIB.

comment:24 Changed 15 years ago by Damien@…

Cc: Damien@… added

Cc Me!

comment:25 in reply to:  23 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to lucian.branescu@…:

Mac OS X 10.5.6 Intel, Xcode 3.1.2, MacPorts 1.7.1 With a clean macports install, ports install py25-gtk +no_x11 +quartz reveals the bug

I am unable to reproduce the problem with a clean MacPorts 1.7.1 install on Mac OS X 10.5.6 Intel (MacBookPro2,2) with Xcode 3.1.2 by typing "port install py25-gtk +no_x11 +quartz". cairo +no_x11 +quartz and pango +no_x11 +quartz were installed without incident.

Instructions for using the patch, should someone need it, are here. However, if anyone finds they need the patch, please first run "sudo port selfupdate" to ensure you have the latest ports, and if you then still experience the issue, please provide as much information as you can about how I might be able to reproduce the problem on my system.

comment:26 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

On second thought, I've committed the patch in r49546 with the rationale that several people have experienced the problem and have verified that the patch fixes it, and the patch has already been included upstream and will be in the next version of pango anyway.

I still cannot figure out why anyone is experiencing the issue, since the top of the patch states it fixes compiling pango without X support if cairo is compiled with X support, but that combination should already never be possible in MacPorts because of r48569.

comment:27 Changed 15 years ago by philipp@…

I don't know if that helps to reproduce the bug, but on my machine x11 is installed (not using MAcports). I have the Native Version delivered by Apple as well as the Quartz project version 2.3.2 installed. For Gimp needs it. My intention is to get Gimp running without X11 using Macports Version... Which seems to work with the patch for pango (wheres Keyboard shortcuts don't work as supposed to in Gimp without X11).

comment:28 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.