From: John H. <jd...@gm...> - 2007-11-13 03:41:05
|
On Nov 4, 2007 1:06 PM, Boyd Waters <bw...@nr...> wrote: > I believe that "generic" autoconf would pick up CFLAGS: > > CFLAGS="-arch ppc -arch i386" Worked for zlib and freetype, but failed for libpng with: gcc -DHAVE_CONFIG_H -I. -I. -I. -DPNG_CONFIGURE_LIBPNG -arch ppc -arch i386 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c png.c -fno-common -DPIC -o .libs/libpng12_la-png.o gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags But, following your suggestion, I built everything with : 536 export ARCHFLAGS="-arch i386" 537 export MACOSX_DEPLOYMENT_TARGET=10.5 538 export CFLAGS="-arch i386" 543 export LDFLAGS="-arch i386" 546 export CXXFLAGS="-arch i386" but am still getting a failure. command history and build output below. It appears the failure is happening at link time when the build tries to link. The code at http://mail.python.org/pipermail/python-checkins/2006-June/054322.html suggests that both platforms are being unconditionally added in the ARCHLIST but I am not sure if that is relevant here. In any case, if I could fix the libpng problem above, I wouldn't have to worry about it. ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.90.1 python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.0.4.dev4380 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.3.0 * WxAgg extension not required for wxPython >= 2.8 Qt: no Qt4: no Cairo: no libpng: found, but unknown version (no pkg-config) OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: matplotlib will provide [Edit setup.cfg to suppress the above messages] ============================================================================ running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.5-i386-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.backends._tkagg' extension C compiler: gcc -DNDEBUG -g -O3 -arch i386 compile options: '-I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders -I/System/Library/Frameworks/Tk.framework/Headers -I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders -I/usr/local/include -I/usr/include -I. -Isrc -Iswig -Iagg23/include -I. -I/usr/local/include -I/usr/include -I. -I/System/Library/Frameworks/Tcl.framework/Headers/freetype2 -I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders/freetype2 -I/System/Library/Frameworks/Tk.framework/Headers/freetype2 -I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 -Isrc/freetype2 -Iswig/freetype2 -Iagg23/include/freetype2 -I./freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c' extra options: '-framework Tcl -framework Tk' g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -arch i386 -arch i386 build/temp.macosx-10.5-i386-2.5/src/_tkagg.o build/temp.macosx-10.5-i386-2.5/CXX/cxx_extensions.o build/temp.macosx-10.5-i386-2.5/CXX/cxxsupport.o build/temp.macosx-10.5-i386-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.5-i386-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.5-i386-2.5/matplotlib/backends/_tkagg.so -framework Tcl -framework Tk ld: warning in build/temp.macosx-10.5-i386-2.5/src/_tkagg.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxx_extensions.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxxsupport.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/IndirectPythonInterface.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxxextensions.o, file is not of required architecture ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libpng.dylib, file is not of required architecture ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libfreetype.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/qT/qTRms9cJHNqoYnbs9+TwVk+++TI/-Tmp-//ccnIc3Eg.out (No such file or directory) ld: warning in build/temp.macosx-10.5-i386-2.5/src/_tkagg.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxx_extensions.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxxsupport.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/IndirectPythonInterface.o, file is not of required architecture ld: warning in build/temp.macosx-10.5-i386-2.5/CXX/cxxextensions.o, file is not of required architecture ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libpng.dylib, file is not of required architecture ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libfreetype.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/qT/qTRms9cJHNqoYnbs9+TwVk+++TI/-Tmp-//ccnIc3Eg.out (No such file or directory) error: Command "g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup -arch i386 -arch i386 build/temp.macosx-10.5-i386-2.5/src/_tkagg.o build/temp.macosx-10.5-i386-2.5/CXX/cxx_extensions.o build/temp.macosx-10.5-i386-2.5/CXX/cxxsupport.o build/temp.macosx-10.5-i386-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.5-i386-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.5-i386-2.5/matplotlib/backends/_tkagg.so -framework Tcl -framework Tk" failed with exit status 1 |