Description: Robin's Mac notes
Copyright 2008/03/01 Robin Rowe <robin.rowe@cinepaint.org>
License: BSD <http://opensource.org/licenses/bsd-license.php>
Mac OS X: Cheetah/Puma (1), Jaguar (2), Panther (3), Tiger (4), and Leopard (5).

MAC BUILD NOTES

This is incomplete. I'm still working on getting it to build, but there's much info here on settings and where to wget sources that may be useful. I'm trying to build with GTK1 and GTK2 here, but not yet GTK+OSX.

I'm running 10.4.11 Tiger.

This file edited in vi in a terminal window. To su, do 'sudo bash' and provide your login password.

http://developer.apple.com/tools/download/

Download Xcode 2.5 Tiger/Leopard, not Xcode 3.0 unless you want Leopard only.
You need a free ADC account to do so. Sign up and you'll be able to download immediately.

903mb download!

Fink and MacPorts outdated. No libjpeg for fink. Use debian sources instead.

Launch XcodeTools.mpkg when prompted.

Download wget

http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz   

$ tar xvf wget..tar
$ cd wget..
$ ./configure
$ make
$ sudo tcsh
# make install
# exit
$ /usr/local/bin/wget

Build-Depends: autotools-dev, cdbs, debhelper (>= 5.0), dh-buildinfo, libfltk1.1-dev, libgtk1.2-dev, libgutenprint-dev, libgutenprintui1-dev, libjpeg62-dev, liblcms1-dev, libopenexr-dev, libtiff4-dev, libxmu-dev, python-dev, zlib1g-dev, libpng12-dev

/usr/local/bin/wget http://ftp.de.debian.org/debian/pool/main/f/fltk1.1/fltk1.1_1.1.7.orig.tar.gz

http://ftp.de.debian.org/debian/pool/main/g/gtk+1.2/gtk+1.2_1.2.10.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/g/glib1.2/glib1.2_1.2.10.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/g/gutenprint/gutenprint_5.0.0.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/libj/libjpeg6b/libjpeg6b_6b.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/l/lcms/lcms_1.15.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/o/openexr/openexr_1.2.2.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/libp/libpng/libpng_1.2.15~beta5.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_1.2.3.orig.tar.gz
http://ftp.de.debian.org/debian/pool/main/t/tiff/tiff_3.8.2.orig.tar.gz

Make zlib
Make jpeg
Make glib
Make gtk
Make the rest
Make cinepaint

tar xvfz zlib_1.2.3.orig.tar.gz 
tar xvfz zlib-1.2.3/upstream/tarballs/zlib-1.2.3.tar.gz 
cd zlib-1.2.3/
./configure
make
sudo make install

tar xvfz glib1.2_1.2.10.orig.tar.gz 
rowers-power-mac-g5:/data/cinepaint rower$ cd glib-1.2.10/               
rowers-power-mac-g5:/data/cinepaint/glib-1.2.10 rower$ ./configure

ERROR: checking host system type... configure: error: can not guess host type; you must specify one 

uname -r
./configure --host=powerpc-apple-darwin8.11.0

Doesn't work...

Get config.guess and config.sub

http://cvs.savannah.gnu.org/viewvc/config/config/
 cd glib-1.2.10/
rowers-power-mac-g5:/data/cinepaint/glib-1.2.10 rower$ cp ../config.* .

Has build erros. Let's try glib2...

http://ftp.gnome.org/pub/GNOME/sources/glib/2.15/glib-2.15.6.tar.gz

http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.12/gtk+-2.12.8.tar.gz
tar xvfz glib-2.15.6.tar.gz 

 cd glib-2.15.6

./configure

ERROR: needs pkg-config
http://pkgconfig.freedesktop.org/releases/

http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
cd pkg-config-0.23
./configure
make
sudo make install

...back to glib2

./configure

ERROR: still can't find pkgconfig

http://developer.apple.com/unix/crossplatform.html

For tcsh or csh: set PATH = ($PATH /usr/sbin /usr/local/bin) 

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir> 
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  PKG_CONFIG  path to pkg-config utility
  PCRE_CFLAGS C compiler flags for PCRE, overriding pkg-config
  PCRE_LIBS   linker flags for PCRE, overriding pkg-config

PKG_CONFIG=/usr/local/bin/pkg-config
export PKG_CONFIG

echo $PKG_CONFIG

ERROR: needs gettext

http://www.gnu.org/software/gettext/gettext.html
http://mirrors.kernel.org/gnu/gettext/gettext-0.17.tar.gz
tar xvfz gettext-0.17.tar.gz 
 cd gettext-0.17
./configure

Configure takes 10x longer than typical...

ERROR: glib2 doesn't find gettext still...

export CPPFLAGS="-I/usr/local/include"

or CFLAGS?

export LDFLAGS="-I/usr/local/lib"

export PATH=$PATH:/usr/local/bin

gettext builds, needed PATH to gettext program.

glib2 builds
viewer-cairo.c:40: warning: return makes pointer from integer without a cast
viewer-cairo.c:40: warning: return makes pointer from integer without a cast
G
viewer-cairo.c:40: warning: return makes pointer from integer without a cast
viewer-cairo.c:40: warning: return makes pointer from integer without a cast
tar xvfz gtk+-2.12.8.tar.gz
 cd gtk+-2.12.8

No package 'atk' found
No package 'pango' found
No package 'cairo' found

Try gtk1...

tar xvfz gtk+1.2_1.2.10.orig.tar.gz 
 cd gtk+-1.2.10/

./configure --host=powerpc-apple-darwin8.11.0

updating cache ./config.cache
loading cache ./config.cache within ltconfig
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed

Back to gtk2...

http://www.icewalkers.com/Linux/Software/526850/Cairo.html

http://ftp.gnome.org/pub/gnome/sources/atk/1.21/atk-1.21.92.tar.gz
http://ftp.gnome.org/pub/GNOME/sources/pango/1.19/pango-1.19.4.tar.gz
http://cairographics.org/releases/cairo-1.4.14.tar.gz

 tar xvfz atk-1.21.92.tar.gz 
 cd atk-1.21.92

tar xvfz pango-1.19.4.tar.gz 
cd pango-1.19.4

tar xvfz cairo-1.4.14.tar.gz 
 cd cairo-1.4.14

configure: WARNING: Could not find libpng in the pkg-config search path
checking whether cairo's PNG backend could be enabled... no
configure: error: requested PNG backend could not be enabled

Need to build libpng first...

tar xvfz libpng_1.2.15~beta5.orig.tar.gz 
 cd libpng-1.2.15beta5/

Back to cairo...

configure: error: Cairo requires at least one font backend.
                  Please install freetype and fontconfig, then try again:
                  http://freetype.org/  http://fontconfig.org/

http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
http://ftp.de.debian.org/debian/pool/main/f/fontconfig/fontconfig_2.5.0.orig.tar.gz

fontconfig wanted me to use git://...

tar xvfz freetype-2.3.5.tar.gz 
cd freetype-2.3.5

tar xvfz fontconfig_2.5.0.orig.tar.gz 
cd fontconfig-2.5.0/

No package 'libxml-2.0' found

ftp://xmlsoft.org/libxml3/
tar xvfz libxml2-2.6.31.tar.gz 
cd libxml2-2.6.31

Back to fontconfig...

Back to cairo...

Configures, but should I enable quartz?

./configure --enable-quartz --enable-atsui --disable-xlib --disable-ft --disable-ps --disable-xcb

tar xvfz fltk1.1_1.1.7.orig.tar.gz 
cd fltk-1.1.7/

tar xvfz gutenprint_5.0.0.orig.tar.gz 
cd gutenprint-5.0.0/

ld: Undefined symbols:
_libintl_dgettext
_libintl_bind_textdomain_codeset
_libintl_bindtextdomain
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed

./configure --disable-nls
make clean

make install put some stuff in /usr/share...


ms_1.15.orig.tar.gz 
cd lcms-1.15/

Wants libtiff...

tar xvfz tiff_3.8.2.orig.tar.gz 
tar xvfz tiff-3.8.2/tiff-3.8.2.tar.gz 
cd tiff-3.8.2/

Wants libjpeg...

 tar xvfz libjpeg6b_6b.orig.tar.gz 
 cd jpeg-6b/

Back to libtiff...

Still says no JPEG, moving on...

Back to lcms...

tar xvfz openexr_1.2.2.orig.tar.gz 
cd OpenEXR-1.2.2/

tar xvf cinepaint-0.22-1.tar 
cd cinepaint-0.22-1

   Jpeg plug-in:                no     CinePaint will not build without

Back to libjpeg...

Doesn't seem to install lib, trying source from IJPG...

wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar xvfz jpegsrc.v6b.tar.gz 

No, that didn't help...

sudo make install-lib

libjpeg uses non-standard install syntax...

Back to libtiff...

Yes, it found JPEG support...

Back to cinepaint...

!!! ERROR: FLTK has no threads support !!!
           Configure FLTK with the --enable-threads option and recompile.

Back to FLTK...

Back to cinepaint...

checking for GTK - version >= 1.2.8... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: WARNING: Test for GTK failed. See the file 'INSTALL' for help.

/usr/local/bin/pkg-config --list-all

No GTK... Oops, forgot...

Back to gtk...

checking for XRenderQueryExtension... no
configure: error: *** libXrender not found. Check 'config.log' for more details.

Had to comment out check in configure. Comment says it tests for X11 aas a requirement even though unneeded...

*** Pango not found. Pango built with Cairo support is required

Says I need to build Cairo BEFORE Pango...

Back to pango...

Pango configure says found FreeType Cairo backend...

Back to cairo...

configure: error:
*** Can't find cairo-ps.h. You must build Cairo with the
*** postscript backend enabled.

 ./configure --enable-quartz --enable-atsui --disable-xlib --disable-xcb


cairo will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          no (disabled, use --enable-xlib to enable)
  Xlib Xrender:  no (requires --enable-xlib)
  Quartz:        yes
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  glitz:         no (disabled, use --enable-glitz to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)

the following font backends:

  FreeType:      yes
  Win32:         no (requires a Win32 platform)
  ATSUI:         yes

the following features:
  PNG functions: yes

Back to gtk2...

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -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/cairo -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng12 -I/usr/local/include -I/usr/local/include -Wall -MT gdkdrawable-x11.lo -MD -MP -MF .deps/gdkdrawable-x11.Tpo -c gdkdrawable-x11.c  -fno-common -DPIC -o .libs/gdkdrawable-x11.o
gdkdrawable-x11.c:32:24: error: cairo-xlib.h: No such file or directory
gdkdrawable-x11.c: In function '_gdk_x11_drawable_update_size':
gdkdrawable-x11.c:238: warning: implicit declaration of function 'cairo_xlib_surface_set_size'
gdkdrawable-x11.c: In function 'gdk_x11_ref_cairo_surface':
gdkdrawable-x11.c:1469: warning: implicit declaration of function 'cairo_xlib_surface_create'
gdkdrawable-x11.c:1472: warning: assignment makes pointer from integer without a cast
gdkdrawable-x11.c:1474: warning: implicit declaration of function 'cairo_xlib_surface_create_for_bitmap'
gdkdrawable-x11.c:1477: warning: assignment makes pointer from integer without a cast
make[4]: *** [gdkdrawable-x11.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


 ./configure --with-gdktarget=quartz


print_gimp.h:51:42: error: gutenprintui2/gutenprintui.h: No such file or directory

Back to gutenprint...

wget http://downloads.sourceforge.net/gimp-print/gutenprint-5.1.6.tar.bz2?modtime=1199362428&big_mirror=1

tar xvfj gutenprint-5.1.6.tar.bz2 
./configure --disable-nls --enable-libgutenprintui2
l


Release: gutenprint 5.1.6 generated on 02 Jan 2008

  Features:
    Build CUPS:                                 yes, installing in /usr
        Build CUPS 1.2 enhancements:            no
        Build CUPS PPD files:                   yes
            Build translated CUPS PPD files:    yes
            Build simplified CUPS PPD files:    no
            Install CUPS PPDs at top level:     no
        Generate PS level 3 CUPS PPD files:     yes
        Build genppd statically:                yes
    Build Ghostscript IJS driver:               no
    Build Foomatic data:                        no
    Build enhanced Print plugin for GIMP:       no
    Build EPSON Stylus utility:                 yes
    Build test programs:                        yes
    Build testpattern generator:                yes

Installation summary:
    Installation prefix:                        /usr/local
    Data directory:                             /usr/local/share/gutenprint
    Library directory:                          /usr/local/lib/gutenprint
    XML data directory:                         /usr/local/share/gutenprint/5.1.6/xml
    Module directory:                           /usr/local/lib/gutenprint/5.1.6/modules
    Install sample images:                      yes

General configuration:
    Compiler options:                           -Disfinite=finite -I/usr/local/include -O6  -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=1048576
    Build static libraries:                     yes
    Build shared libraries:                     yes
    Maintainer mode:                            no
    Use i18n:                                   no
    Generate profiling information:             no
    Generate debugging symbols:                 no
    Use modules:                                static
    Use readline libraries:                     yes, extra arguments: -lncurses
================================================================

Back to cinepaint...

Success!

Runs, but text missing from some buttons and screen doesn't redraw quickly enougth for paintbrush to be usable. Layer dialog updates sooner than main window. Forum traffic says just not enough implemented. Sigh...

Back to Cairo and GTK2, build w/o quartz flags...


cairo will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          yes
  Xlib Xrender:  yes
  Quartz:        no (disabled, use --enable-quartz to enable)
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  glitz:         no (disabled, use --enable-glitz to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)

the following font backends:
  FreeType:      yes
  Win32:         no (requires a Win32 platform)
  ATSUI:         no (disabled, use --enable-atsui to enable)

the following features:
  PNG functions: yes

Build fails...

ld: Undefined symbols:
_XMissingExtension
_XextAddDisplay
_XextFindDisplay
_XextRemoveDisplay
ld: warning weak symbol references not set in output with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
ld: warning weak referenced symbols:
_getaddrinfo
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
make[2]: *** [libcairo.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


./configure --enable-xlib-xrender=no


cairo will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          yes
  Xlib Xrender:  no (disabled, use --enable-xlib-xrender to enable)
  Quartz:        no (disabled, use --enable-quartz to enable)
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  glitz:         no (disabled, use --enable-glitz to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)

the following font backends:
  FreeType:      yes
  Win32:         no (requires a Win32 platform)
  ATSUI:         no (disabled, use --enable-atsui to enable)

the following features:
  PNG functions: yes


No joy...

ld: Undefined symbols:
_XRenderAddGlyphs
_XRenderChangePicture
_XRenderComposite
_XRenderCompositeText16
_XRenderCompositeText32
_XRenderCompositeText8
_XRenderCompositeTrapezoids
_XRenderCreateGlyphSet
_XRenderCreatePicture
_XRenderFillRectangle
_XRenderFillRectangles
_XRenderFindStandardFormat
_XRenderFindVisualFormat
_XRenderFreeGlyphSet
_XRenderFreeGlyphs
_XRenderFreePicture
_XRenderQueryVersion
_XRenderSetPictureClipRectangles
_XRenderSetPictureFilter
_XRenderSetPictureTransform
_XRenderQueryExtension
_XRenderQuerySubpixelOrder
ld: warning weak symbol references not set in output with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
ld: warning weak referenced symbols:
_getaddrinfo
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
make[2]: *** [libcairo.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

make clean
./configure

Bad makefile... Needs -lXext.

cd src


/bin/sh ../libtool --tag=CC --mode=link gcc  -I/usr/local/include  -I/usr/local/lib -o libcairo.la -rpath /usr/local/lib -version-info 13:7:11 -no-undefined  cairo.lo cairo-arc.lo cairo-array.lo cairo-base85-stream.lo cairo-bentley-ottmann.lo cairo-cache.lo cairo-clip.lo cairo-color.lo cairo-debug.lo cairo-fixed.lo cairo-font-face.lo cairo-font-options.lo cairo-freelist.lo cairo-gstate.lo cairo-hash.lo cairo-hull.lo cairo-image-surface.lo cairo-lzw.lo cairo-matrix.lo cairo-mutex.lo cairo-operator.lo cairo-path.lo cairo-path-bounds.lo cairo-path-fill.lo cairo-path-fixed.lo cairo-path-stroke.lo cairo-pen.lo cairo-polygon.lo cairo-rectangle.lo cairo-region.lo cairo-scaled-font.lo cairo-skiplist.lo cairo-slope.lo cairo-spline.lo cairo-stroke-style.lo cairo-surface.lo cairo-surface-fallback.lo cairo-traps.lo cairo-pattern.lo cairo-unicode.lo cairo-output-stream.lo cairo-wideint.lo cairo-meta-surface.lo cairo-paginated-surface.lo cairo-analysis-surface.lo  cairo-ft-font.lo cairo-ps-surface.lo cairo-pdf-surface.lo cairo-deflate-stream.lo cairo-png.lo cairo-svg-surface.lo  cairo-cff-subset.lo cairo-truetype-subset.lo cairo-type1-fallback.lo cairo-scaled-font-subsets.lo cairo-type1-subset.lo cairo-xlib-surface.lo cairo-xlib-display.lo cairo-xlib-screen.lo        ../pixman/src/libpixman.la -lz -lz -L/usr/local/lib -lfreetype -lz   -L/usr/local/lib -lfontconfig   -L/usr/local/lib -lpng12   -lXrender -lXext -lSM -lICE  -L/usr/X11R6/lib -lX11     


cd ..
make

Cairo builds...
Moving on to gtk2

make clean
./configure


configuration:
        target: x11

Not quartz this time...

Won't link...I think I need to rebuild pango, too.

In file included from pangocairo-atsui.h:27,
                 from pangocairo-fontmap.c:29:
/usr/local/include/cairo/cairo-atsui.h:55:3: error: #error Cairo was not compiled with support for the atsui font backend
make[4]: *** [libpangocairo_1_0_la-pangocairo-fontmap.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Back to Cairo...

make clean
./configure --enable-atsui

cairo will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          yes
  Xlib Xrender:  yes
  Quartz:        no (disabled, use --enable-quartz to enable)
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  glitz:         no (disabled, use --enable-glitz to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)

the following font backends:
  FreeType:      yes
  Win32:         no (requires a Win32 platform)
  ATSUI:         yes

the following features:
  PNG functions: yes

and the following debug options:
  gcov support:  no
  test surfaces: no
  pdf testing:   no (requires poppler-glib >= 0.4.1)
  svg testing:   no (requires librsvg-2.0 >= 2.15.0)

using CFLAGS:
-I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/local/include/libpng12 -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter -fno-strict-aliasing


*** The ATSUI backend is still under active development and
*** is included in this release only as a preview. It does not
*** fully work yet and incompatible changes may yet be made
*** to ATSUI-backend specific API.

Found on web:
cairo tests (make test; open test/index.html)
Says atsui is toy...

Back to pango...

./configure
configuration:
        backends: FreeType X Cairo

Oops, cairo needed before pango...

Back to cairo...

Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), Quartz, and XCB.

./configure

Still have to use -lExt hack to build...

Back to cairo...

./configure

configuration:
        backends: FreeType X Cairo

Pango still messed up looking for atsui...
Too bleeding edge, try stable...
wget http://ftp.gnome.org/pub/GNOME/sources/pango/1.18/pango-1.18.4.tar.gz
 cd pango-1.18.4

Pango builds....

Back to gtk2...

configure: error: *** libXrender not found. Check 'config.log' for more details.

Keep ignoring this error...

gtk2 builds, i think wo error this time...

Back to CinePaint...

Back to cinepaint...
./configure   --enable-gtk2

/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning -L: directory name (/sw/lib) does not exist

This is X11 version, not quartz...

cinepaintdy

ld: Library not loaded: /usr/local/lib/libpangoft2-1.0.0.dylib  Referenced from: /usr/local/lib/libgtk-quartz-2.0.0.dylib  Reason: Incompatible library version: libgtk-quartz-2.0.0.dylib requires version 1905.0.0 or later, but libpangoft2-1.0.0.dylib provides version 1801.0.0Trace/BPT trap

http://0xfe.blogspot.com/2006/03/how-os-x-executes-applications.html

otool -L /usr/local/lib/libpangoft2-1.0.0.dylib
/usr/local/lib/libpangoft2-1.0.0.dylib:
        /usr/local/lib/libpangoft2-1.0.0.dylib (compatibility version 1801.0.0, current version 1801.4.0)
        /usr/local/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.31.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10)
        /usr/local/lib/libpango-1.0.0.dylib (compatibility version 1801.0.0, current version 1801.4.0)
        /usr/local/lib/libgobject-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libgmodule-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libglib-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/local/lib/libfontconfig.1.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.16.0)





otool -L /usr/local/lib/libgtk-quartz-2.0.0.dylib
/usr/local/lib/libgtk-quartz-2.0.0.dylib:
        /usr/local/lib/libgtk-quartz-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.8.0)
        /usr/local/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.8.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10)
        /usr/local/lib/libgdk-quartz-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.8.0)
        /usr/local/lib/libpangoft2-1.0.0.dylib (compatibility version 1905.0.0, current version 1905.0.0)
        /usr/local/lib/libfontconfig.1.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.16.0)
        /usr/local/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.31.0)
        /usr/local/lib/libpng12.0.dylib (compatibility version 16.0.0, current version 16.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
        /usr/local/lib/libpangocairo-1.0.0.dylib (compatibility version 1905.0.0, current version 1905.0.0)
        /usr/local/lib/libpango-1.0.0.dylib (compatibility version 1905.0.0, current version 1905.0.0)
        /usr/local/lib/libatk-1.0.0.dylib (compatibility version 2202.0.0, current version 2202.1.0)
        /usr/local/lib/libgobject-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libgmodule-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libglib-2.0.0.dylib (compatibility version 1507.0.0, current version 1507.0.0)
        /usr/local/lib/libcairo.2.dylib (compatibility version 14.0.0, current version 14.7.0)
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/local/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)

Back to gtk2...

2.12.8 is too new, latest is .6...

wget ftp://ftp.gtk.org/pub/gtk/2.12/gtk+-2.12.6.tar.bz2
tar xvfj gtk+-2.12.6.tar.bz2 
cd gtk+-2.12.6
./configure
configure: error: *** libXrender not found. Check 'config.log' for more details.

Modify configure again...

Still won't load pango...

Back to pango...

wget ftp://ftp.gtk.org/pub/pango/1.19/pango-1.19.2.tar.gz
tar xvfz pango-1.19.2.tar.gz 

 cd pango-1.19.2

.2 won't build because cairo not built with atusi...
trying .1...

pango 1.19.1 builds...
cinepaint
dyld: Library not loaded: /usr/local/lib/libpangoft2-1.0.0.dylib
  Referenced from: /usr/local/lib/libgtk-quartz-2.0.0.dylib
  Reason: Incompatible library version: libgtk-quartz-2.0.0.dylib requires version 1905.0.0 or later, but libpangoft2-1.0.0.dylib provides version 1901.0.0
Trace/BPT trap


Arghh!

Go back to gtk2.10

wget ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-2.10.14.tar.bz2

Go back to pango 1.18.4...

tar xvfj gtk+-2.10.14.tar.bz2 
 cd gtk+-2.10.14

Edit configure for Xrender...

Remember, order is cairo, pango, gtk2...


Can't find any combo of libs that works...
Back to gtk1...

cd  gtk+-1.2.10/
cp ../config.guess .
cp ../config.sub .
rm config.cache
wget ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz
tar xvfz glib-1.2.10.tar.gz 
cd glib-1.2.10

checking host system type... configure: error: can not guess host type; you must specify one

cp ../config.guess .
cp ../config.sub .
rm config.cache

/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib   -I/usr/local/include  -I/usr/local/include -Wall  -D_REENTRANT -c gstrfuncs.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -I/usr/local/include -I/usr/local/include -Wall -D_REENTRANT -c gstrfuncs.c -o gstrfuncs.o
gstrfuncs.c: In function 'g_printf_string_upper_bound':
gstrfuncs.c:870: error: parse error before string constant
gstrfuncs.c:1037: error: parse error before string constant
gstrfuncs.c:1080: error: parse error before string constant
gstrfuncs.c:1111: error: parse error before string constant
gstrfuncs.c: In function 'g_strdown':
gstrfuncs.c:1139: warning: pointer targets in assignment differ in signedness
gstrfuncs.c: In function 'g_strup':
getrfuncs.c:1155: warning: pointer targets in assignment differ in signedness
gstrfuncs.c: In function 'g_strchug':
gstrfuncs.c:1314: warning: pointer targets in assignment differ in signedness
gstrfuncs.c:1317: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
make[2]: *** [gstrfuncs.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

Can't figure out what's wrong...looks ok...

Try glib .8...

cp config...

Success...

Back to gtk+-1.2.10

Success!

Back to cinepaint...

ld: warning -L: directory name (/sw/lib) does not exist
ld: multiple definitions of symbol _g_array_append_vals
.libs/libcinepaint.lax/libwire.a/garray.o definition of _g_array_append_vals in section (__TEXT,__text)
.libs/libcinepaint.lax/libglib.a/garray.o definition of _g_array_append_vals in section (__TEXT,__text)
ld: multiple definitions of symbol _g_array_free
.libs/libcinepaint.lax/libwire.a/garray.o definition of _g_array_free in section (__TEXT,__text)
.libs/libcinepaint.lax/libglib.a/garray.o definition of _g_array_free in section (__TEXT,__text)
ld: multiple definitions of symbol _g_array_insert_vals

Back to gtk...

Maybe gtk version should match glib version?

wget ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.8.tar.gz
tar xvfz  gtk+-1.2.8.tar.gz 
 cd gtk+-1.2.8

cp config...

Back to CinePaint...

Still won't link to glib...

Back to glib...

Try different glib?

wget ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.9.tar.gz
tar xvfz glib-1.2.9.tar.gz 
cd  glib-1.2.9        
cp config..

Same errors as .10...

Back to glib2...
$ cd glib-2.15.6

Back to cinepaint...
checking for GTK - version >= 1.2.8... no
*** Could not run GTK test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK was incorrectly installed
*** or that you have moved GTK since it was installed. In the latter case, you
*** may want to edit the gtk-config script: /usr/local/bin/gtk-config

 ./configure --includedir=/usr/local/lib/glib-2.0/include --includedir=/usr/local/lib/glib-2.0

That didn't work...

Tried faking glib1.2 include with soft ln...didn't work...

Back to glib 1.2.8...
Back to gtk 1.2.10...
Back to cinepaint...
  
./configure --disable-gtktest   --enable-ansi 



re.c: In function 'wire_read':
wire.c:289: error: parse error before '/' token
wire.c:284: warning: unused variable 'erg'
wire.c:322: warning: control reaches end of non-void function
wire.c: At top level:
wire.c:324: error: parse error before 'return'
wire.c: In function 'wire_write_int32':
wire.c:601: error: parse error before '/' token

Using // in .c file...

Strict ansi causes too many warnings...try without...

Can't figure out GTK1 link problem...
Go back and see how GTK2 works...

READ: GTK2 steps...

Back to Cairo...
cd cairo-1.4.14
 ./configure --enable-quartz --enable-atsui --disable-xlib --disable-xcb

Back to Pango...
cd pango-1.19.4       
./configure --with-x=no

Back to GTK2...
cd gtk+-2.10.14
 ./configure --with-gdktarget=quartz

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -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/cairo -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng12 -xobjective-c -I/usr/local/include -I/usr/local/include -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: In function 'gdk_quartz_ref_cairo_surface':
gdkdrawable-quartz.c:64: error: incompatible type for argument 1 of 'cairo_quartz_surface_create'
gdkdrawable-quartz.c:64: error: too many arguments to function 'cairo_quartz_surface_create'

Back to pango...

./configure
       backends: FreeType X Cairo

In file included from viewer-cairo.c:27:
/usr/local/include/cairo/cairo-xlib.h:97:3: error: #error Cairo was not compiled with support for the xlib backend
viewer-cairo.c: In function 'cairo_x_view_create_surface':
viewer-cairo.c:38: warning: implicit declaration of function 'cairo_xlib_surface_create'
viewer-cairo.c:40: warning: return makes pointer from integer without a cast

Huh???

http://lists.macosforge.org/pipermail/macports-users/2007-March/002189.html
Need newest cairo...

Back to glib2
Back to cairo
Back to pango
Back to gtk2

        target: quartz

Back to cairo
http://cairographics.org/snapshots/cairo-1.5.10.tar.gz
tar xvfz
cd cairo-1.5.10

Needs pixman...

wget http://cairographics.org/releases/pixman-0.9.6.tar.gz
tar xvfz pixman-0.9.6.tar.gz 
cd pixman-0.9.6
./configure

Back to Cairo...
Back to Pango...
Back to gtk2...

still broken
 tar xvfz gtk+-2.12.8.tar.gz 
cd gtk+-2.12.8

Cannot load module /Volumes/Macintosh HD/data/cinepaint/gtk+-2.12.8/modules/input/im-am-et.la: dlopen(/Volumes/Macintosh HD/data/cinepaint/gtk+-2.12.8/modules/input/.libs/im-am-et.so, 10): Symbol not found: __cg_TIFFWriteDirectory
  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libTIFF.dylib



echo $DYLD_LIBRARY_PATH
thing to be done for `all-am'.
Making all in demos
GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ../gdk-pixbuf/gdk-pixbuf-csource --raw --build-list                \
        apple_red  ./apple-red.png      \
                gnome_foot ./gnome-foot.png     \
        > test-inline-pixbufs.h                         \
|| (rm -f test-inline-pixbufs.h && false)
failed to load "./apple-red.png": Couldn't recognize the image file format for file './apple-red.png'
make[2]: *** [test-inline-pixbufs.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

/usr/local/lib
echo $LD_LIBRARY_PATH
/usr/local/lib


gcc_select
Current default compiler:
gcc version 4.0.1 (Apple Computer, Inc. build 5370)

gtk2 builds (2.12.8) but fails runtime test...

make[3]: Nothing to be done for `all-am'.
Making all in demos
GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ../gdk-pixbuf/gdk-pixbuf-csource --raw --build-list                \
        apple_red  ./apple-red.png      \
                gnome_foot ./gnome-foot.png     \
        > test-inline-pixbufs.h                         \
|| (rm -f test-inline-pixbufs.h && false)
failed to load "./apple-red.png": Couldn't recognize the image file format for file './apple-red.png'
make[2]: *** [test-inline-pixbufs.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2




Back to cinepaint...

./configure   --enable-gtk2




http://macosx.forked.net/comp.html
http://developer.apple.com/opensource/buildingopensourceuniversal.html
http://lists.apple.com/mailman/listinfo/unix-porting





