[cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)

Kevin Layer layer at franz.com
Tue Nov 9 09:16:12 PST 2010


Andrea Canciani <ranma42 at gmail.com> wrote:

>> the 10.4 sdk cannot be used to build for 64 bits targets. Maybe the dev
>> environment you're using defaults to using the 10.4 sdk. If the previous
>> configuration works, you maight want to try:
>> 
>> export MACOSX_DEPLOYMENT_TARGET=10.5
>> export LDFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64
>> -isysroot /Developer/SDKs/MacOSX10.5.sdk"
>> export CFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64 -isysroot
>> /Developer/SDKs/MacOSX10.5.sdk"

Fails:

$ make
make  all-recursive
Making all in src
make  all-am
  CC     cairo-analysis-surface.lo
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[3]: *** [cairo-analysis-surface.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$ 


The full monty:

$ export MACOSX_DEPLOYMENT_TARGET=10.5
$ export LDFLAGS="-arch ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
$ export CFLAGS="-arch ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i386-apple-darwin9.8.0
checking host system type... i386-apple-darwin9.8.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether to build gtk-doc documentation... no
checking for gtkdoc-check... /opt/local/bin/gtkdoc-check
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for find... /usr/bin/find
checking for xargs... /usr/bin/xargs
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether gcc and cc understand -c and -o together... yes
checking for inline... inline
checking for pkg-config... (cached) /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for supported warning flags... 
checking whether gcc supports -Werror... yes
checking whether gcc supports -errwarn... no
checking whether gcc supports -Wall... yes
checking whether gcc supports -Wextra... yes
checking whether gcc supports -Wold-style-definition... yes
checking whether gcc supports -Wdeclaration-after-statement... yes
checking whether gcc supports -Wmissing-declarations... yes
checking whether gcc supports -Werror-implicit-function-declaration... yes
checking whether gcc supports -Wnested-externs... yes
checking whether gcc supports -Wpointer-arith... yes
checking whether gcc supports -Wwrite-strings... yes
checking whether gcc supports -Wsign-compare... yes
checking whether gcc supports -Wstrict-prototypes... yes
checking whether gcc supports -Wmissing-prototypes... yes
checking whether gcc supports -Wpacked... yes
checking whether gcc supports -Wswitch-enum... yes
checking whether gcc supports -Wmissing-format-attribute... no
checking whether gcc supports -Wbad-function-cast... yes
checking whether gcc supports -Wvolatile-register-var... no
checking whether gcc supports -Wstrict-aliasing=2... yes
checking whether gcc supports -Winit-self... yes
checking whether gcc supports -Wunsafe-loop-optimizations... no
checking whether gcc supports -Wno-missing-field-initializers... yes
checking whether gcc supports -Wno-unused-parameter... yes
checking whether gcc supports -Wno-attributes... no
checking whether gcc supports -Wno-long-long... yes
checking whether gcc supports -Winline... yes
checking whether gcc supports -Wlogical-op... no
checking whether gcc supports -erroff=E_ENUM_TYPE_MISMATCH_ARG... no
checking whether gcc supports -erroff=E_ENUM_TYPE_MISMATCH_OP... no
checking whether gcc supports -fno-strict-aliasing... yes
checking whether gcc supports -fno-common... yes
checking whether gcc supports -flto... no
checking whether gcc supports -Wp,-D_FORTIFY_SOURCE=2... yes
checking which warning flags were supported...  -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Werror-implicit-function-declaration -Wnested-externs -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wpacked -Wswitch-enum -Wbad-function-cast -Wstrict-aliasing=2 -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Wno-long-long -Winline -fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2
checking how to enable unused result warnings... 
checking how to allow undefined symbols in shared libraries used by test suite... checking whether gcc supports -Wl,--allow-shlib-undefined... no

checking for native atomic primitives... checking atomic_ops.h usability... no
checking atomic_ops.h presence... no
checking for atomic_ops.h... no
checking libkern/OSAtomic.h usability... yes
checking libkern/OSAtomic.h presence... yes
checking for libkern/OSAtomic.h... yes
OSAtomic
checking whether atomic ops require a memory barrier... no
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of size_t... 8
checking for native Win32... no
checking for Sun Solaris (non-POSIX ctime_r)... no
checking for sched_yield in -lrt... no
checking for shm_open in -lrt... no
checking for connect in -lsocket... no
checking for __builtin_return_address(0)... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking sys/int_types.h usability... no
checking sys/int_types.h presence... no
checking for sys/int_types.h... no
checking for uint64_t... yes
checking for uint128_t... no
checking for __uint128_t... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for sys/stat.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for alarm... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking for sched_getaffinity... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for clock_gettime... no
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking for feenableexcept... no
checking for fedisableexcept... no
checking for feclearexcept... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking for signal.h... (cached) yes
checking setjmp.h usability... yes
checking setjmp.h presence... yes
checking for setjmp.h... yes
checking for fenv.h... (cached) yes
checking for vasnprintf... no
checking for link... yes
checking for ctime_r... yes
checking for drand48... yes
checking for flockfile... yes
checking for ffs... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for sys/stat.h... (cached) yes
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for mkdir... yes
checking mkdir variant... mkdir(path, mode)
checking for fork... yes
checking for waitpid... yes
checking for raise... yes
checking for VALGRIND... no
no
checking for compress in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for dlsym in -ldl... yes
checking for dlfcn.h... (cached) yes
checking for X... libraries /usr/X11/lib, headers /usr/X11/include
checking for cairo's Xlib surface backend feature... 
checking for xlib... yes
checking whether cairo's Xlib surface backend feature could be enabled... yes
checking for cairo's Xlib Xrender surface backend feature... 
checking for xlib_xrender... yes
checking whether cairo's Xlib Xrender surface backend feature could be enabled... yes
checking for cairo's XCB/SHM functions feature... 
checking whether cairo's XCB/SHM functions feature could be enabled... no (requires both --enable-xcb)
checking for cairo's Quartz surface backend feature... 
checking ApplicationServices/ApplicationServices.h usability... yes
checking ApplicationServices/ApplicationServices.h presence... yes
checking for ApplicationServices/ApplicationServices.h... yes
checking whether cairo's Quartz surface backend feature could be enabled... yes
checking for cairo's Quartz font backend feature... 
checking whether cairo's Quartz font backend feature could be enabled... yes
checking for cairo's Microsoft Windows surface backend feature... 
checking whether cairo's Microsoft Windows surface backend feature could be enabled... no (requires a Win32 platform)
checking for cairo's Microsoft Windows font backend feature... 
checking whether cairo's Microsoft Windows font backend feature could be enabled... no (requires a Win32 platform)
checking for cairo's PNG functions feature... 
checking for png... yes
checking whether cairo's PNG functions feature could be enabled... yes
checking for cairo's EGL functions feature... 
checking whether cairo's EGL functions feature could be enabled... no (not required by any backend)
checking for cairo's GLX functions feature... 
checking whether cairo's GLX functions feature could be enabled... no (not required by any backend)
checking for cairo's WGL functions feature... 
checking whether cairo's WGL functions feature could be enabled... no (not required by any backend)
checking for cairo's FreeType font backend feature... 
checking for FREETYPE... yes
checking whether cairo's FreeType font backend feature could be enabled... yes
checking for cairo's Fontconfig font backend feature... 
checking for FONTCONFIG... yes
checking whether cairo's Fontconfig font backend feature could be enabled... yes
checking for FT_Bitmap_Size.y_ppem... yes
checking for FT_GlyphSlot_Embolden... no
checking for FT_Load_Sfnt_Table... no
checking for FT_Library_SetLcdFilter... no
checking for FcInit... no
checking for FcFini... no
checking for cairo's PostScript surface backend feature... 
checking whether cairo's PostScript surface backend feature could be enabled... yes
checking for gs... no
configure: WARNING: PS backend will not be tested since ghostscript is not available
checking for LIBSPECTRE... no
checking for cairo's PDF surface backend feature... 
checking whether cairo's PDF surface backend feature could be enabled... yes
checking for POPPLER... no
configure: WARNING: PDF backend will not be tested since poppler >= 0.13.3 is not available
checking for cairo's SVG surface backend feature... 
checking whether cairo's SVG surface backend feature could be enabled... yes
checking for LIBRSVG... no
configure: WARNING: SVG backend will not be tested since librsvg >= 2.15.0 is not available
checking for cairo's image surface backend feature... 
checking for pixman... yes
checking whether cairo's image surface backend feature could be enabled... yes
checking for cairo's recording surface backend feature... 
checking whether cairo's recording surface backend feature could be enabled... yes
checking for cairo's user font backend feature... 
checking whether cairo's user font backend feature could be enabled... yes
checking for cairo's pthread feature... 
checking whether cairo's pthread feature could be enabled... yes
checking for cairo's gobject functions feature... 
checking for GOBJECT... yes
checking whether cairo's gobject functions feature could be enabled... yes
checking for GOBJECT... yes
checking for cairo's cairo-trace feature... 
checking whether cairo's cairo-trace feature could be enabled... yes
checking for cairo's cairo-script-interpreter feature... 
checking whether cairo's cairo-script-interpreter feature could be enabled... yes
checking for bfd_openr in -lbfd... no
checking libiberty.h usability... no
checking libiberty.h presence... no
checking for libiberty.h... no
checking for cairo's symbol-lookup feature... 
checking whether cairo's symbol-lookup feature could be enabled... no (requires bfd)
checking for glib... yes
checking for shm_open in -lrt... (cached) no
checking for gtk... no
configure: creating ./config.status
config.status: creating src/cairo.pc
config.status: creating cairo-uninstalled.pc
config.status: creating src/cairo-xlib.pc
config.status: creating cairo-xlib-uninstalled.pc
config.status: creating src/cairo-xlib-xrender.pc
config.status: creating cairo-xlib-xrender-uninstalled.pc
config.status: creating src/cairo-quartz.pc
config.status: creating cairo-quartz-uninstalled.pc
config.status: creating src/cairo-quartz-font.pc
config.status: creating cairo-quartz-font-uninstalled.pc
config.status: creating src/cairo-png.pc
config.status: creating cairo-png-uninstalled.pc
config.status: creating src/cairo-ft.pc
config.status: creating cairo-ft-uninstalled.pc
config.status: creating src/cairo-fc.pc
config.status: creating cairo-fc-uninstalled.pc
config.status: creating src/cairo-ps.pc
config.status: creating cairo-ps-uninstalled.pc
config.status: creating src/cairo-pdf.pc
config.status: creating cairo-pdf-uninstalled.pc
config.status: creating src/cairo-svg.pc
config.status: creating cairo-svg-uninstalled.pc
config.status: creating src/cairo-gobject.pc
config.status: creating cairo-gobject-uninstalled.pc
config.status: creating Makefile
config.status: creating boilerplate/Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating test/pdiff/Makefile
config.status: creating perf/Makefile
config.status: creating util/Makefile
config.status: creating util/cairo-fdr/Makefile
config.status: creating util/cairo-gobject/Makefile
config.status: creating util/cairo-script/Makefile
config.status: creating util/cairo-script/examples/Makefile
config.status: creating util/cairo-sphinx/Makefile
config.status: creating util/cairo-trace/Makefile
config.status: creating util/cairo-trace/cairo-trace
config.status: creating doc/Makefile
config.status: creating doc/public/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing ./build/Makefile.win32.features commands
config.status: creating ./build/Makefile.win32.features
config.status: ./build/Makefile.win32.features is unchanged
config.status: executing ./src/Makefile.am.features commands
config.status: creating ./src/Makefile.am.features
config.status: ./src/Makefile.am.features is unchanged
config.status: executing ./src/Makefile.win32.features commands
config.status: creating ./src/Makefile.win32.features
config.status: ./src/Makefile.win32.features is unchanged
config.status: executing ./boilerplate/Makefile.am.features commands
config.status: creating ./boilerplate/Makefile.am.features
config.status: ./boilerplate/Makefile.am.features is unchanged
config.status: executing ./boilerplate/Makefile.win32.features commands
config.status: creating ./boilerplate/Makefile.win32.features
config.status: ./boilerplate/Makefile.win32.features is unchanged
config.status: executing src/cairo-features.h commands
config.status: creating src/cairo-features.h
config.status: executing src/cairo-supported-features.h commands
config.status: creating src/cairo-supported-features.h
config.status: executing ./build/Makefile.win32.features-h commands
config.status: creating ./build/Makefile.win32.features-h
config.status: ./build/Makefile.win32.features-h is unchanged

cairo (version 1.10.0 [release]) will be compiled with:

The following surface backends:
  Image:         yes (always builtin)
  Meta:          yes (always builtin)
  Tee:           yes (always builtin)
  XML:           no (disabled, use --enable-xml to enable)
  Skia:          no (disabled, use --enable-skia to enable)
  Xlib:          yes
  Xlib Xrender:  yes
  Qt:            no (disabled, use --enable-qt to enable)
  Quartz:        yes
  Quartz-image:  no (disabled, use --enable-quartz-image to enable)
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  CairoScript:   no (disabled, use --enable-script to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  OpenGL:        no (disabled, use --enable-gl to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)
  OpenVG:        no (disabled, use --enable-vg to enable)
  DRM:           no (disabled, use --enable-drm to enable)

The following font backends:
  User:          yes (always builtin)
  FreeType:      yes
  Fontconfig:    yes
  Win32:         no (requires a Win32 platform)
  Quartz:        yes

The following functions:
  PNG functions:   yes
  GLEW functions:  no (not required by any backend)
  GLX functions:   no (not required by any backend)
  WGL functions:   no (not required by any backend)
  EGL functions:   no (not required by any backend)
  X11-xcb functions: no (disabled, use --enable-xlib-xcb to enable)
  XCB-drm functions: no (disabled, use --enable-xcb-drm to enable)
  XCB-shm functions: no (requires both --enable-xcb)
  DRM-Xr functions: no (disabled, use --enable-drm-xr to enable)

The following features and utilities:
  cairo-trace:                yes
  cairo-script-interpreter:   yes

And the following internal features:
  pthread:       yes
  gtk-doc:       no
  gcov support:  no
  symbol-lookup: no (requires bfd)
  test surfaces: no (disabled, use --enable-test-surfaces to enable)
  ps testing:    no (requires libspectre)
  pdf testing:   no (requires poppler-glib >= 0.13.3)
  svg testing:   no (requires librsvg-2.0 >= 2.15.0)


$ make
make  all-recursive
Making all in src
make  all-am
  CC     cairo-analysis-surface.lo
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make[3]: *** [cairo-analysis-surface.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$ 


More information about the cairo mailing list