Opened 20 years ago

Closed 20 years ago

#2066 closed defect (invalid)

BUG: gtk2

Reported by: Torsten.Eriksson@… Owned by: mij@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

I recently installed DarwinPorts and installing gtk2 was my first aim (initially I tried compiling it myself). Installing gtk2 results in error (output below with some additional debugging info). I use Mac OS X 10.3.4 on a tibook. Along the way I have had to remove bits and pieces of my previous attempts to compile gtk and its required packages - This may or may not have affected the problem reported here.


tibook:/usr/local/darwinports/dports/gnome root# port -dv install gtk2 DEBUG: Requested variant powerpc is not provided by port gtk2. DEBUG: Requested variant darwin is not provided by port gtk2. DEBUG: Found Dependency: receipt exists for glib2 DEBUG: Found Dependency: receipt exists for tiff DEBUG: Found Dependency: path: /usr/local/lib filename: libpng12.0.dylib regex: libpng12\.0\.dylib$ DEBUG: Found Dependency: receipt exists for atk DEBUG: Found Dependency: path: /usr/local/lib filename: libpango.1.dylib regex: libpango\.1\.dylib$ DEBUG: Found Dependency: path: /usr/local/lib filename: libintl.3.dylib regex: libintl\.3\.dylib$ DEBUG: Found Dependency: path: /usr/X11R6/lib filename: libX11.6.dylib regex: libX11\.6\.dylib$ DEBUG: Found Dependency: path: /usr/X11R6/lib filename: libX11.6.dylib regex: libX11\.6\.dylib$ DEBUG: Skipping completed com.apple.main (gtk2) DEBUG: Skipping completed com.apple.fetch (gtk2) DEBUG: Skipping completed com.apple.checksum (gtk2) DEBUG: setting option extract.cmd to /usr/bin/bzip2 DEBUG: Skipping completed com.apple.extract (gtk2) DEBUG: Skipping completed com.apple.patch (gtk2) DEBUG: Skipping completed com.apple.configure (gtk2) ---> Building gtk2 with target all DEBUG: Executing com.apple.build (gtk2) DEBUG: Assembled command: 'cd "/usr/local/darwinports/dports/x11/gtk2/work/gtk+-2.4.1" && make all CFLAGS+="-I/usr/X11R6/include"' make all-recursive Making all in po make[2]: Nothing to be done for `all'. Making all in po-properties make[2]: Nothing to be done for `all'. Making all in gdk-pixbuf make all-recursive Making all in pixops make[4]: Nothing to be done for `all'. Making all in gdk make all-recursive Making all in x11 if /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -DXTHREADS -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/ include -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/ X11R6/include -I/usr/local/include -no-cpp-precomp -DX_LOCALE -I/usr/X11R6/include -MT gdkasync.lo -MD -MP -MF ".deps/gdkasync.Tpo" \

-c -o gdkasync.lo test -f 'gdkasync.c' || echo './'gdkasync.c; \

then mv -f ".deps/gdkasync.Tpo" ".deps/gdkasync.Plo"; \ else rm -f ".deps/gdkasync.Tpo"; exit 1; \ fi

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../

gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -DXTHREADS -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/ include/freetype2 -I/usr/X11R6/include -I/usr/local/include -no-cpp-precomp -DX_LOCALE -I/usr/ X11R6/include -MT gdkasync.lo -MD -MP -MF .deps/gdkasync.Tpo -c gdkasync.c -fno-common -DPIC -o .libs/gdkasync.o In file included from /usr/X11R6/include/X11/Xft/Xft.h:35,

from ../../gdk/x11/gdkdrawable-x11.h:35, from ../../gdk/x11/gdkwindow-x11.h:30, from gdkprivate-x11.h:36, from gdkx.h:78, from gdkasync.c:49:

/usr/local/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!" /usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files." /usr/local/include/freetype2/freetype/freetype.h:22:2: #error "Example:" /usr/local/include/freetype2/freetype/freetype.h:23:2: #error " #include <ft2build.h>" /usr/local/include/freetype2/freetype/freetype.h:24:2: #error " #include FT_FREETYPE_H" make[4]: * [gdkasync.lo] Error 1 make[3]: * [all-recursive] Error 1 make[2]: * [all] Error 2 make[1]: * [all-recursive] Error 1 make: * [all] Error 2 Error: Target com.apple.build returned: shell command "cd "/usr/local/darwinports/dports/x11/gtk2/ work/gtk+-2.4.1" && make all CFLAGS+="-I/usr/X11R6/include"" returned error 2 Command output: make[2]: Nothing to be done for `all'. Making all in gdk-pixbuf make all-recursive Making all in pixops make[4]: Nothing to be done for `all'. Making all in gdk make all-recursive Making all in x11 if /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -DXTHREADS -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/ include -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/ X11R6/include -I/usr/local/include -no-cpp-precomp -DX_LOCALE -I/usr/X11R6/include -MT gdkasync.lo -MD -MP -MF ".deps/gdkasync.Tpo" \

-c -o gdkasync.lo test -f 'gdkasync.c' || echo './'gdkasync.c; \

then mv -f ".deps/gdkasync.Tpo" ".deps/gdkasync.Plo"; \ else rm -f ".deps/gdkasync.Tpo"; exit 1; \ fi

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../

gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -DXTHREADS -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/ include/freetype2 -I/usr/X11R6/include -I/usr/local/include -no-cpp-precomp -DX_LOCALE -I/usr/ X11R6/include -MT gdkasync.lo -MD -MP -MF .deps/gdkasync.Tpo -c gdkasync.c -fno-common -DPIC -o .libs/gdkasync.o In file included from /usr/X11R6/include/X11/Xft/Xft.h:35,

from ../../gdk/x11/gdkdrawable-x11.h:35, from ../../gdk/x11/gdkwindow-x11.h:30, from gdkprivate-x11.h:36, from gdkx.h:78, from gdkasync.c:49:

/usr/local/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!" /usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files." /usr/local/include/freetype2/freetype/freetype.h:22:2: #error "Example:" /usr/local/include/freetype2/freetype/freetype.h:23:2: #error " #include <ft2build.h>" /usr/local/include/freetype2/freetype/freetype.h:24:2: #error " #include FT_FREETYPE_H" make[4]: * [gdkasync.lo] Error 1 make[3]: * [all-recursive] Error 1 make[2]: * [all] Error 2 make[1]: * [all-recursive] Error 1 make: * [all] Error 2

Warning: the following items did not execute (for gtk2): com.apple.activate com.apple.build com.apple.destroot com.apple.install

---

tibook:/usr/local/darwinports/dports/gnome root# port installed The following ports are currently installed:

atk 1.6.1_0 (active) expat 1.95.7_0 (active) fontconfig 2.2.2_1 (active) freetype 2.1.7_0 (active) glib2 2.4.0_0 (active) jpeg 6b_0 (active) pango 1.4.0_2 (active) render 0.8_1 (active) tiff 3.6.1_0 (active) Xft2 2.1.6_0 (active) xrender 0.8.4_0 (active)

Change History (5)

comment:1 Changed 20 years ago by olegb@…

we are at gtk2 2.4.9 do you still have this problem ?

comment:2 Changed 20 years ago by lwa@…

I got the same problem. It's a combinason of multiple factors :

  • GCC 3.3 is used as compiled by Apple
  • You have fontconfig headers installed in /usr/X11R6/include
  • Darwinports are installed in /usr/local (instead of the default /opt)
  • for some reason, Darwinports is unable to recognise most already installed libraries

With GCC 3.3, you are no more able to change the order of the system header and Apple compiled it with /usr/local as a system header (which is wrong)

Fix: choose

  • use another GCC version, for example compile the port with

CC=gcc3 port build (you need to have it installed as an option of xtool install kit) gcc3 (version 3.0) allow to change system header order.

  • recompile your GCC 3.3 to remove /usr/local/include from the system header

or adding /usr/X11R6/include as a system header

  • compile GTK by hand out of darwinport with /usr/X11R6/include headers

(you will have further trouble with this, because darwinports will not recognise your library and try to install another one over it)

  • Reinstall X11R6 dev toolkit (Apple's one are outdated)

The first one allow the compilation for me, it's the most easier. But next I have conflict with old Xrender library (in /usr/X11R6) and the new one installed by darwinports.

comment:3 Changed 20 years ago by secretmojo@…

It was actually simpler for me: I copied a file. THIS IS WHAT I DID TO GET gtk2 to build. (remember: my install PREFIX is /usr/local/) The problem is in port Xft2.

After uninstalling, then re-installing port Xft2 (a dependency of gtk2), I copied its header into the X11R6 includes: # first, backup current header cd /usr/X11R6/include/X11/Xft/ sudo mv Xft.h Xft.backup.h # now copy darwinports-installed header into X directory sudo cp /usr/local/include/X11/Xft/Xft.h .

After this, I could build gtk2, and get bluefish & cannonsmash running on top of it. If you're squeamish about replacing a header, then all you really need to do is change this line from /usr/X11R6/include/X11/Xft/Xft.h: #include <freetype/freetype.h> to: #include <ft2build.h> #include FT_FREETYPE_H

to reflect the new freetype change, as done in the darwinports version.

comment:4 Changed 20 years ago by snu@…

Owner: changed from darwinports-bugs@… to mij@…
Summary: BUG: gtk+-2.4.1BUG: gtk2

comment:5 Changed 20 years ago by mij@…

Resolution: invalid
Status: newclosed

We're now at GTK 2.6.0 and I can't (and never have been able to) reproduce this problem.

Note: See TracTickets for help on using tickets.