#19350 closed defect (fixed)
gtk2 variant dependecy
Reported by: | frankalahan@… | Owned by: | nox@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.1 |
Keywords: | no_x11 quartz | Cc: | |
Port: | gtk2 |
Description (last modified by mf2k (Frank Schima))
To install gtk2 +no_x11 its library dependencies pango and cairo must be compiled with the variant "+quartz" or it will fail to compile:
port install cairo +no_x11 +quartz port install pango +no_x11 +quartz
It seems the "+quartz" was not passed when I did
port install gtk2 +no_x11
The installation failed with:
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -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/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -xobjective-c -I/opt/local/include -DX_LOCALE -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -fstrict-aliasing -Wall -MT gdkdrawable-quartz.lo -MD -MP -MF .deps/gdkdrawable-quartz.Tpo -c gdkdrawable-quartz.c -fno-common -DPIC -o .libs/gdkdrawable-quartz.o gdkdrawable-quartz.c:22:26: error: cairo-quartz.h: No such file or directory gdkdrawable-quartz.c: In function 'gdk_quartz_ref_cairo_surface': gdkdrawable-quartz.c:69: warning: implicit declaration of function 'cairo_quartz_surface_create_for_cg_context' gdkdrawable-quartz.c:69: warning: assignment makes pointer from integer without a cast make[4]: *** [gdkdrawable-quartz.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
However I solved that reinstalling pango and cairo with "+quartz"
Change History (8)
comment:1 Changed 16 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to nox@… |
Port: | gtk2 added |
comment:2 follow-up: 4 Changed 16 years ago by dbevans (David B. Evans)
Keywords: | no_x11 quartz added |
---|
comment:3 Changed 16 years ago by dbevans (David B. Evans)
Please substitute the word "dependencies" for "dependents" above. We really need a way to edit comments after they have been submitted! Or I do anyway.
comment:4 Changed 16 years ago by frankalahan@…
Hi, I think I still have a problem!
when I do port install gtk2 +no_x11
I see cariro and pango being, installed and then gtk2 starts building, which fails. To fix this I have to do:
port uninstall pango port uninstall cairo
port install pango +no_x11 +quartz port install cairo +no_x11 +quartz
port install gtk2 +no_x11
... and then this works!
The problem is, that port install gtk2 +no_x11 will not work from a fresh install (whith no other ports installed)
Replying to devans@…:
This is really an issue/misunderstanding about the port command itself rather than gtk2
First, if you want to build gtk2 with quartz rendering then you need to use
port install gtk2 +no_x11 +quartzas +no_x11 just says no X11 rendering and doesn't imply what you're going to use instead, +quartz says use quartz.
Second, if you want to build gtk+ ports/applications using quartz rendering then you have to ensure that the port in question AND all of its dependencies are built with +no_x11 +quartz too. Additionally, because +x11 and +quartz versions of ports may have common dependents, you cannot successfully mix ports built with +quartz and ports built with +x11 (the defacto default for most ports) in the same instance of MacPorts.
You have to decide before installing any ports whether you are going use X11 rendering or quartz rendering in the instance of MacPorts that you are installing. If you need both types of apps then you must install separate instances of MacPorts for each with different prefixes such as /opt/local for X11 and /opt/quartz for quartz rendering.
Installing multiple instances of MacPorts is described in the MacPorts Guide.
Assuming you are installing a new +quartz instance from scratch, the easiest way to make sure that all ports are built +no_x11 +quartz is to add
+no_x11 +quartzto the configuration file ${prefix}/etc/macports/variants.conf where ${prefix} is the installation prefix for your MacPorts quartz instance.
Then you can install gtk2 by using
sudo port install gtk2and gtk2 and all its dependents will be built with +no_x11 +quartz and you should be in business.
If you have already mixed +x11 and +quartz ports in the same instance, then you are in trouble and the only clean and certain way to recover is to remove all installed ports and start over as described above.
sudo port -f uninstall installedI hope this helps.
comment:5 Changed 16 years ago by dbevans (David B. Evans)
Yes, that is consistent with what I said above. You need to build gtk2 and its dependencies with both +no_x11 and +quartz. And this is true for any other ports you want to build that way. So put +no_x11 +quartz in ${prefix}/etc/macports/variants.conf and MacPorts will do it automatically for you for each port that is built.
comment:6 Changed 16 years ago by nox@…
Status: | new → assigned |
---|
comment:7 Changed 16 years ago by nox@…
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
cairo variants are now checked in r49818.
This is really an issue/misunderstanding about the port command itself rather than gtk2
First, if you want to build gtk2 with quartz rendering then you need to use
as +no_x11 just says no X11 rendering and doesn't imply what you're going to use instead, +quartz says use quartz.
Second, if you want to build gtk+ ports/applications using quartz rendering then you have to ensure that the port in question AND all of its dependencies are built with +no_x11 +quartz too. Additionally, because +x11 and +quartz versions of ports may have common dependents, you cannot successfully mix ports built with +quartz and ports built with +x11 (the defacto default for most ports) in the same instance of MacPorts.
You have to decide before installing any ports whether you are going use X11 rendering or quartz rendering in the instance of MacPorts that you are installing. If you need both types of apps then you must install separate instances of MacPorts for each with different prefixes such as /opt/local for X11 and /opt/quartz for quartz rendering.
Installing multiple instances of MacPorts is described in the MacPorts Guide.
Assuming you are installing a new +quartz instance from scratch, the easiest way to make sure that all ports are built +no_x11 +quartz is to add
to the configuration file ${prefix}/etc/macports/variants.conf where ${prefix} is the installation prefix for your MacPorts quartz instance.
Then you can install gtk2 by using
and gtk2 and all its dependents will be built with +no_x11 +quartz and you should be in business.
If you have already mixed +x11 and +quartz ports in the same instance, then you are in trouble and the only clean and certain way to recover is to remove all installed ports and start over as described above.
I hope this helps.