Home Forums OS X Server and Client Discussion Web PHP5, libjpeg (for GD2), 10.5 Server

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #370595
    Bill Eccles
    Participant

    OK, I’m totally frustrated now.

    I’m trying to build PHP5 as a universal binary (hence all the -arch switches below) so I don’t have to worry about what Apache2 wants to load. When building libjpeg, I can’t get both shared libraries and multiple architectures to happen at the same time.

    Here’s what happens:
    [code]
    shr-g5:jpeg-6b admin$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –enable-shared
    checking for gcc… gcc
    checking whether the C compiler (gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load) works… yes
    checking whether the C compiler (gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load) is a cross-compiler… no
    checking whether we are using GNU C… yes
    checking how to run the C preprocessor… gcc -E
    checking for function prototypes… yes
    checking for stddef.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for size_t… yes
    checking for type unsigned char… yes
    checking for type unsigned short… yes
    checking for type void… yes
    checking for working const… yes
    checking for inline… __inline__
    checking for broken incomplete types… ok
    checking for short external names… ok
    checking to see if char is signed… yes
    checking to see if right shift is signed… yes
    checking to see if fopen accepts b spec… yes
    checking for a BSD compatible install… /usr/bin/install -c
    checking for ranlib… ranlib
    checking host system type… powerpc-apple-darwin9.1.0
    checking for ranlib… ranlib
    checking for gcc… gcc
    checking whether we are using GNU C… yes
    checking for gcc option to produce PIC… -fPIC
    checking if gcc PIC flag -fPIC works… yes
    checking if gcc static flag -static works… none
    checking whether ln -s works… yes
    checking for ld used by GCC… /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld
    checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) is GNU ld… no
    checking whether the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) supports shared libraries… no
    checking for BSD-compatible nm… /usr/bin/nm -p
    checking command to parse /usr/bin/nm -p output… no
    checking how to hardcode library paths into programs… unsupported
    checking for /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld option to reload object files… -r
    checking dynamic linker characteristics… no
    checking if libtool supports shared libraries… no
    checking whether to build shared libraries… no
    checking whether to build static libraries… yes
    checking for objdir… .libs
    creating libtool
    checking libjpeg version number… 62
    creating ./config.status
    creating Makefile
    creating jconfig.h

    [/code]
    Note that ltconfig thinks it can’t make the dynamic libraries. Anyway, make results in…
    [code]

    shr-g5:jpeg-6b admin$ make
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c
    echo timestamp > jcapimin.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapistd.c
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapistd.c
    echo timestamp > jcapistd.lo

    8< snip! (I cut out most of the compiling. Suffice it to say, there are no errors and each .c gets happily turned into a .o or .lo or whatever it becomes.) ./libtool --mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemnobs.c gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemnobs.c echo timestamp > jmemnobs.lo
    ./libtool –mode=link gcc -o libjpeg.la jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \
    -rpath /usr/local/lib -version-info 62
    mkdir .libs
    ar cru .libs/libjpeg.a jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o
    ranlib .libs/libjpeg.a
    creating libjpeg.la
    (cd .libs && ln -s ../libjpeg.la libjpeg.la)
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cjpeg.c
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cjpeg.c
    echo timestamp > cjpeg.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdppm.c

    8< snip! (more compiling...) ./libtool --mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cdjpeg.c gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cdjpeg.c echo timestamp > cdjpeg.lo
    ./libtool –mode=link gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o cjpeg cjpeg.lo rdppm.lo rdgif.lo rdtarga.lo rdrle.lo rdbmp.lo rdswitch.lo cdjpeg.lo libjpeg.la
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o cjpeg cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o .libs/libjpeg.a
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./djpeg.c
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./djpeg.c
    echo timestamp > djpeg.lo

    8< snip! (more compiling...) ./libtool --mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdcolmap.c gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdcolmap.c echo timestamp > rdcolmap.lo
    ./libtool –mode=link gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o djpeg djpeg.lo wrppm.lo wrgif.lo wrtarga.lo wrrle.lo wrbmp.lo rdcolmap.lo cdjpeg.lo libjpeg.la
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o djpeg djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o cdjpeg.o .libs/libjpeg.a
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jpegtran.c
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jpegtran.c
    echo timestamp > jpegtran.lo

    8< snip! (more compiling...) ./libtool --mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./wrjpgcom.c gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./wrjpgcom.c echo timestamp > wrjpgcom.lo
    ./libtool –mode=link gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o wrjpgcom wrjpgcom.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o wrjpgcom wrjpgcom.o

    [/code]
    !! Finally !! Time to make install
    [code]

    shr-g5:jpeg-6b admin$ sudo make install
    Password:
    /usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h
    /usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h
    /usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h
    /usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h
    ./libtool –mode=install /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
    /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
    /usr/bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a
    ranlib /usr/local/lib/libjpeg.a
    chmod 644 /usr/local/lib/libjpeg.a
    Libraries have been installed in:
    /usr/local/lib

    To link against installed libraries in a given directory, LIBDIR,
    you must use the `-LLIBDIR’ flag during linking.

    You will also need to do one of the following:

    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ./libtool –mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
    /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
    ./libtool –mode=install /usr/bin/install -c djpeg /usr/local/bin/djpeg
    /usr/bin/install -c djpeg /usr/local/bin/djpeg
    ./libtool –mode=install /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
    /usr/bin/install -c jpegtran /usr/local/bin/jpegtran
    ./libtool –mode=install /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
    /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom
    ./libtool –mode=install /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
    /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom
    /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1
    /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1
    /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1
    /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1
    /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1

    [/code]
    As you can see, only the static libraries are built. Well, what do we do about that?! According to a tip found in an AFP548 article, the libtool that comes with libjpeg is out of date, so it recommends copying a version from the gd source. (See https://www.afp548.com/article.php?story=20041104230209410&mode=print.)

    I’ll make a long story shorter: if I copy libtool over after the ./configure of above, I do manage to get twice as much compiling going on, like this sample shows:
    [code]

    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c
    mkdir .libs
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c -fno-common -DPIC -o .libs/jcapimin.o
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c -o jcapimin.o >/dev/null 2>&1

    [/code]
    But it ends, Alas! in failure, as this sample shows:
    [code]
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    collect2: ld returned 1 exit status
    ld: warning in ./.libs/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture x86_64:

    [/code]
    OK, what happens if I copy libtool over before the ./configure? (Funny you should ask…) No changes to jconfig.h, and libtool is overwritten, so that doesn’t make any difference.

    Somehow, I accidentally managed to discover that if I issue a plain old ./configure –enable-shared –enable-static and then copy over the libtool from gd, I manage to get dylibs!

    But they don’t contain enough architectures, because PHP’s configure gripes, as always, with this:
    [code]
    configure:37492: gcc -o conftest -O -g -arch i386 -arch ppc -arch ppc64 -arch x86_64 -pipe -no-cpp-precomp -no-cpp-precomp -Wl,-rpath,/usr/local/lib -L/usr/local/lib -arch i386 -arch ppc -arch ppc64 -arch x86_64 -bind_at_load co
    nftest.c -ljpeg -lssl -lcrypto -lcurl -lz -lssl -lcrypto -lm -lxml2 -lz -licucore -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -lz -lxml2 -lz -licucore -lm 1>&5
    ld: warning in /usr/local/lib/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture x86_64:
    “_jpeg_read_header”, referenced from:
    _main in ccW5jAeh.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    ld: warning in /usr/local/lib/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture i386:
    “_jpeg_read_header”, referenced from:
    _main in cceN0mpf.o
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    ld: warning in /usr/local/lib/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture ppc64:
    “_jpeg_read_header”, referenced from:
    _main in ccO23NVJ.o
    ld: symbol(s) not found for architecture ppc64
    collect2: ld returned 1 exit status
    lipo: can’t open input file: /var/tmp//cceEaa65.out (No such file or directory)
    configure: failed program was:
    #line 37481 “configure”
    #include “confdefs.h”
    /* Override any gcc2 internal prototype to avoid an error. */
    /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply. */
    char jpeg_read_header();

    int main() {
    jpeg_read_header()
    ; return 0; }
    [/code]
    (The above came from php/config.log.)

    [b]BOTTOM LINE[/b]
    Obviously, I want everything: I want a libjpeg compiled for all four architectures (since that’s what I’m doing with PHP), and I want it to be a dynamic library, too.

    That’s the bottom line. Can anybody help?!

    /Bill

    #370597
    Bill Eccles
    Participant

    After Googling… a lot… I found this page

    http://finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod

    which has links to replacements for ltmain.sh and ltconfig. If I drop them into the mess, I get this:

    [code]
    shr-g5:jpeg-6b admin$ MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –enable-shared –enable-static
    checking for gcc… gcc
    checking whether the C compiler (gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load) works… yes
    checking whether the C compiler (gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load) is a cross-compiler… no
    checking whether we are using GNU C… yes
    checking how to run the C preprocessor… gcc -E
    checking for function prototypes… yes
    checking for stddef.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for size_t… yes
    checking for type unsigned char… yes
    checking for type unsigned short… yes
    checking for type void… yes
    checking for working const… yes
    checking for inline… __inline__
    checking for broken incomplete types… ok
    checking for short external names… ok
    checking to see if char is signed… yes
    checking to see if right shift is signed… yes
    checking to see if fopen accepts b spec… yes
    checking for a BSD compatible install… /usr/bin/install -c
    checking for ranlib… ranlib
    checking host system type… powerpc-apple-darwin9.1.0
    checking for ranlib… ranlib
    checking for gcc… gcc
    checking whether we are using GNU C… yes
    checking for object suffix… o
    checking for executable suffix… no
    checking for gcc option to produce PIC… -fno-common
    checking if gcc PIC flag -fno-common works… yes
    checking if gcc supports -c -o file.o… yes
    checking if gcc supports -c -o file.lo… yes
    checking if gcc supports -fno-rtti -fno-exceptions … no
    checking if gcc static flag -static works… none
    checking whether ln -s works… yes
    checking for ld used by GCC… /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld
    checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) is GNU ld… no
    checking whether the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) supports shared libraries… yes
    checking for BSD-compatible nm… /usr/bin/nm -p
    checking command to parse /usr/bin/nm -p output… ok
    checking how to hardcode library paths into programs… unsupported
    checking for /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld option to reload object files… -r
    checking dynamic linker characteristics… darwin9.1.0 dyld
    checking if libtool supports shared libraries… yes
    checking whether to build shared libraries… yes
    checking whether to build static libraries… yes
    checking for objdir… .libs
    creating libtool
    checking libjpeg version number… 62
    creating ./config.status
    creating Makefile
    creating jconfig.h
    jconfig.h is unchanged
    shr-g5:jpeg-6b admin$ make
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c
    mkdir .libs
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c -fno-common -DPIC -o .libs/jcapimin.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapimin.c -o jcapimin.o >/dev/null 2>&1
    mv -f .libs/jcapimin.lo jcapimin.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapistd.c
    rm -f .libs/jcapistd.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapistd.c -fno-common -DPIC -o .libs/jcapistd.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcapistd.c -o jcapistd.o >/dev/null 2>&1
    mv -f .libs/jcapistd.lo jcapistd.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jctrans.c
    rm -f .libs/jctrans.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jctrans.c -fno-common -DPIC -o .libs/jctrans.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jctrans.c -o jctrans.o >/dev/null 2>&1
    mv -f .libs/jctrans.lo jctrans.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcparam.c
    rm -f .libs/jcparam.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcparam.c -fno-common -DPIC -o .libs/jcparam.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcparam.c -o jcparam.o >/dev/null 2>&1
    mv -f .libs/jcparam.lo jcparam.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatadst.c
    rm -f .libs/jdatadst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatadst.c -fno-common -DPIC -o .libs/jdatadst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatadst.c -o jdatadst.o >/dev/null 2>&1
    mv -f .libs/jdatadst.lo jdatadst.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcinit.c
    rm -f .libs/jcinit.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcinit.c -fno-common -DPIC -o .libs/jcinit.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcinit.c -o jcinit.o >/dev/null 2>&1
    mv -f .libs/jcinit.lo jcinit.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmaster.c
    rm -f .libs/jcmaster.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmaster.c -fno-common -DPIC -o .libs/jcmaster.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmaster.c -o jcmaster.o >/dev/null 2>&1
    mv -f .libs/jcmaster.lo jcmaster.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmarker.c
    rm -f .libs/jcmarker.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmarker.c -fno-common -DPIC -o .libs/jcmarker.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmarker.c -o jcmarker.o >/dev/null 2>&1
    mv -f .libs/jcmarker.lo jcmarker.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmainct.c
    rm -f .libs/jcmainct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmainct.c -fno-common -DPIC -o .libs/jcmainct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcmainct.c -o jcmainct.o >/dev/null 2>&1
    mv -f .libs/jcmainct.lo jcmainct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcprepct.c
    rm -f .libs/jcprepct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcprepct.c -fno-common -DPIC -o .libs/jcprepct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcprepct.c -o jcprepct.o >/dev/null 2>&1
    mv -f .libs/jcprepct.lo jcprepct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccoefct.c
    rm -f .libs/jccoefct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccoefct.c -fno-common -DPIC -o .libs/jccoefct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccoefct.c -o jccoefct.o >/dev/null 2>&1
    mv -f .libs/jccoefct.lo jccoefct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccolor.c
    rm -f .libs/jccolor.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccolor.c -fno-common -DPIC -o .libs/jccolor.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jccolor.c -o jccolor.o >/dev/null 2>&1
    mv -f .libs/jccolor.lo jccolor.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcsample.c
    rm -f .libs/jcsample.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcsample.c -fno-common -DPIC -o .libs/jcsample.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcsample.c -o jcsample.o >/dev/null 2>&1
    mv -f .libs/jcsample.lo jcsample.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jchuff.c
    rm -f .libs/jchuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jchuff.c -fno-common -DPIC -o .libs/jchuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jchuff.c -o jchuff.o >/dev/null 2>&1
    mv -f .libs/jchuff.lo jchuff.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcphuff.c
    rm -f .libs/jcphuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcphuff.c -fno-common -DPIC -o .libs/jcphuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcphuff.c -o jcphuff.o >/dev/null 2>&1
    mv -f .libs/jcphuff.lo jcphuff.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcdctmgr.c
    rm -f .libs/jcdctmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcdctmgr.c -fno-common -DPIC -o .libs/jcdctmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcdctmgr.c -o jcdctmgr.o >/dev/null 2>&1
    mv -f .libs/jcdctmgr.lo jcdctmgr.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctfst.c
    rm -f .libs/jfdctfst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctfst.c -fno-common -DPIC -o .libs/jfdctfst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctfst.c -o jfdctfst.o >/dev/null 2>&1
    mv -f .libs/jfdctfst.lo jfdctfst.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctflt.c
    rm -f .libs/jfdctflt.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctflt.c -fno-common -DPIC -o .libs/jfdctflt.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctflt.c -o jfdctflt.o >/dev/null 2>&1
    mv -f .libs/jfdctflt.lo jfdctflt.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctint.c
    rm -f .libs/jfdctint.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctint.c -fno-common -DPIC -o .libs/jfdctint.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jfdctint.c -o jfdctint.o >/dev/null 2>&1
    mv -f .libs/jfdctint.lo jfdctint.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapimin.c
    rm -f .libs/jdapimin.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapimin.c -fno-common -DPIC -o .libs/jdapimin.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapimin.c -o jdapimin.o >/dev/null 2>&1
    mv -f .libs/jdapimin.lo jdapimin.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapistd.c
    rm -f .libs/jdapistd.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapistd.c -fno-common -DPIC -o .libs/jdapistd.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdapistd.c -o jdapistd.o >/dev/null 2>&1
    mv -f .libs/jdapistd.lo jdapistd.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdtrans.c
    rm -f .libs/jdtrans.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdtrans.c -fno-common -DPIC -o .libs/jdtrans.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdtrans.c -o jdtrans.o >/dev/null 2>&1
    mv -f .libs/jdtrans.lo jdtrans.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatasrc.c
    rm -f .libs/jdatasrc.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatasrc.c -fno-common -DPIC -o .libs/jdatasrc.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdatasrc.c -o jdatasrc.o >/dev/null 2>&1
    mv -f .libs/jdatasrc.lo jdatasrc.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmaster.c
    rm -f .libs/jdmaster.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmaster.c -fno-common -DPIC -o .libs/jdmaster.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmaster.c -o jdmaster.o >/dev/null 2>&1
    mv -f .libs/jdmaster.lo jdmaster.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdinput.c
    rm -f .libs/jdinput.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdinput.c -fno-common -DPIC -o .libs/jdinput.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdinput.c -o jdinput.o >/dev/null 2>&1
    mv -f .libs/jdinput.lo jdinput.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmarker.c
    rm -f .libs/jdmarker.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmarker.c -fno-common -DPIC -o .libs/jdmarker.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmarker.c -o jdmarker.o >/dev/null 2>&1
    mv -f .libs/jdmarker.lo jdmarker.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdhuff.c
    rm -f .libs/jdhuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdhuff.c -fno-common -DPIC -o .libs/jdhuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdhuff.c -o jdhuff.o >/dev/null 2>&1
    mv -f .libs/jdhuff.lo jdhuff.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdphuff.c
    rm -f .libs/jdphuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdphuff.c -fno-common -DPIC -o .libs/jdphuff.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdphuff.c -o jdphuff.o >/dev/null 2>&1
    mv -f .libs/jdphuff.lo jdphuff.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmainct.c
    rm -f .libs/jdmainct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmainct.c -fno-common -DPIC -o .libs/jdmainct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmainct.c -o jdmainct.o >/dev/null 2>&1
    mv -f .libs/jdmainct.lo jdmainct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcoefct.c
    rm -f .libs/jdcoefct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcoefct.c -fno-common -DPIC -o .libs/jdcoefct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcoefct.c -o jdcoefct.o >/dev/null 2>&1
    mv -f .libs/jdcoefct.lo jdcoefct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdpostct.c
    rm -f .libs/jdpostct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdpostct.c -fno-common -DPIC -o .libs/jdpostct.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdpostct.c -o jdpostct.o >/dev/null 2>&1
    mv -f .libs/jdpostct.lo jdpostct.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jddctmgr.c
    rm -f .libs/jddctmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jddctmgr.c -fno-common -DPIC -o .libs/jddctmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jddctmgr.c -o jddctmgr.o >/dev/null 2>&1
    mv -f .libs/jddctmgr.lo jddctmgr.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctfst.c
    rm -f .libs/jidctfst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctfst.c -fno-common -DPIC -o .libs/jidctfst.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctfst.c -o jidctfst.o >/dev/null 2>&1
    mv -f .libs/jidctfst.lo jidctfst.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctflt.c
    rm -f .libs/jidctflt.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctflt.c -fno-common -DPIC -o .libs/jidctflt.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctflt.c -o jidctflt.o >/dev/null 2>&1
    mv -f .libs/jidctflt.lo jidctflt.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctint.c
    rm -f .libs/jidctint.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctint.c -fno-common -DPIC -o .libs/jidctint.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctint.c -o jidctint.o >/dev/null 2>&1
    mv -f .libs/jidctint.lo jidctint.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctred.c
    rm -f .libs/jidctred.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctred.c -fno-common -DPIC -o .libs/jidctred.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jidctred.c -o jidctred.o >/dev/null 2>&1
    mv -f .libs/jidctred.lo jidctred.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdsample.c
    rm -f .libs/jdsample.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdsample.c -fno-common -DPIC -o .libs/jdsample.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdsample.c -o jdsample.o >/dev/null 2>&1
    mv -f .libs/jdsample.lo jdsample.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcolor.c
    rm -f .libs/jdcolor.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcolor.c -fno-common -DPIC -o .libs/jdcolor.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdcolor.c -o jdcolor.o >/dev/null 2>&1
    mv -f .libs/jdcolor.lo jdcolor.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant1.c
    rm -f .libs/jquant1.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant1.c -fno-common -DPIC -o .libs/jquant1.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant1.c -o jquant1.o >/dev/null 2>&1
    mv -f .libs/jquant1.lo jquant1.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant2.c
    rm -f .libs/jquant2.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant2.c -fno-common -DPIC -o .libs/jquant2.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jquant2.c -o jquant2.o >/dev/null 2>&1
    mv -f .libs/jquant2.lo jquant2.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmerge.c
    rm -f .libs/jdmerge.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmerge.c -fno-common -DPIC -o .libs/jdmerge.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jdmerge.c -o jdmerge.o >/dev/null 2>&1
    mv -f .libs/jdmerge.lo jdmerge.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcomapi.c
    rm -f .libs/jcomapi.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcomapi.c -fno-common -DPIC -o .libs/jcomapi.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jcomapi.c -o jcomapi.o >/dev/null 2>&1
    mv -f .libs/jcomapi.lo jcomapi.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jutils.c
    rm -f .libs/jutils.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jutils.c -fno-common -DPIC -o .libs/jutils.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jutils.c -o jutils.o >/dev/null 2>&1
    mv -f .libs/jutils.lo jutils.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jerror.c
    rm -f .libs/jerror.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jerror.c -fno-common -DPIC -o .libs/jerror.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jerror.c -o jerror.o >/dev/null 2>&1
    mv -f .libs/jerror.lo jerror.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemmgr.c
    rm -f .libs/jmemmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemmgr.c -fno-common -DPIC -o .libs/jmemmgr.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemmgr.c -o jmemmgr.o >/dev/null 2>&1
    mv -f .libs/jmemmgr.lo jmemmgr.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemnobs.c
    rm -f .libs/jmemnobs.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemnobs.c -fno-common -DPIC -o .libs/jmemnobs.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./jmemnobs.c -o jmemnobs.o >/dev/null 2>&1
    mv -f .libs/jmemnobs.lo jmemnobs.lo
    ./libtool –mode=link gcc -o libjpeg.la jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \
    -rpath /usr/local/lib -version-info 62
    rm -fr .libs/libjpeg.la .libs/libjpeg.* .libs/libjpeg.*
    gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
    (cd .libs && rm -f libjpeg.62.dylib && ln -s libjpeg.62.0.0.dylib libjpeg.62.dylib)
    (cd .libs && rm -f libjpeg.dylib && ln -s libjpeg.62.0.0.dylib libjpeg.dylib)
    ar cru .libs/libjpeg.a jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o
    ranlib .libs/libjpeg.a
    creating libjpeg.la
    (cd .libs && rm -f libjpeg.la && ln -s ../libjpeg.la libjpeg.la)
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cjpeg.c
    rm -f .libs/cjpeg.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cjpeg.c -fno-common -DPIC -o .libs/cjpeg.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cjpeg.c -o cjpeg.o >/dev/null 2>&1
    mv -f .libs/cjpeg.lo cjpeg.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdppm.c
    rm -f .libs/rdppm.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdppm.c -fno-common -DPIC -o .libs/rdppm.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdppm.c -o rdppm.o >/dev/null 2>&1
    mv -f .libs/rdppm.lo rdppm.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdgif.c
    rm -f .libs/rdgif.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdgif.c -fno-common -DPIC -o .libs/rdgif.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdgif.c -o rdgif.o >/dev/null 2>&1
    mv -f .libs/rdgif.lo rdgif.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdtarga.c
    rm -f .libs/rdtarga.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdtarga.c -fno-common -DPIC -o .libs/rdtarga.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdtarga.c -o rdtarga.o >/dev/null 2>&1
    mv -f .libs/rdtarga.lo rdtarga.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdrle.c
    rm -f .libs/rdrle.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdrle.c -fno-common -DPIC -o .libs/rdrle.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdrle.c -o rdrle.o >/dev/null 2>&1
    mv -f .libs/rdrle.lo rdrle.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdbmp.c
    rm -f .libs/rdbmp.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdbmp.c -fno-common -DPIC -o .libs/rdbmp.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdbmp.c -o rdbmp.o >/dev/null 2>&1
    mv -f .libs/rdbmp.lo rdbmp.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdswitch.c
    rm -f .libs/rdswitch.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdswitch.c -fno-common -DPIC -o .libs/rdswitch.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./rdswitch.c -o rdswitch.o >/dev/null 2>&1
    mv -f .libs/rdswitch.lo rdswitch.lo
    ./libtool –mode=compile gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cdjpeg.c
    rm -f .libs/cdjpeg.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cdjpeg.c -fno-common -DPIC -o .libs/cdjpeg.lo
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -I. -c ./cdjpeg.c -o cdjpeg.o >/dev/null 2>&1
    mv -f .libs/cdjpeg.lo cdjpeg.lo
    ./libtool –mode=link gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o cjpeg cjpeg.lo rdppm.lo rdgif.lo rdtarga.lo rdrle.lo rdbmp.lo rdswitch.lo cdjpeg.lo libjpeg.la
    gcc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load -o .libs/cjpeg cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o -L.libs -ljpeg
    ld: warning in .libs/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture ppc64:
    “_jpeg_quality_scaling”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_set_defaults”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_colorspace”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_stdio_dest”, referenced from:
    _main in cjpeg.o
    “_jpeg_add_quant_table”, referenced from:
    _read_quant_tables in rdswitch.o
    “_jpeg_simple_progression”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_default_colorspace”, referenced from:
    _main in cjpeg.o
    “_jpeg_finish_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_std_error”, referenced from:
    _main in cjpeg.o
    “_jpeg_start_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_write_scanlines”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_quality”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_destroy_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_CreateCompress”, referenced from:
    _main in cjpeg.o
    ld: symbol(s) not found for architecture ppc64
    collect2: ld returned 1 exit status
    ld: warning in .libs/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture x86_64:
    “_jpeg_quality_scaling”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_set_defaults”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_colorspace”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_stdio_dest”, referenced from:
    _main in cjpeg.o
    “_jpeg_add_quant_table”, referenced from:
    _read_quant_tables in rdswitch.o
    “_jpeg_simple_progression”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_default_colorspace”, referenced from:
    _main in cjpeg.o
    “_jpeg_finish_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_std_error”, referenced from:
    _main in cjpeg.o
    “_jpeg_start_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_write_scanlines”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_quality”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_destroy_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_CreateCompress”, referenced from:
    _main in cjpeg.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    ld: warning in .libs/libjpeg.dylib, file is not of required architecture
    Undefined symbols for architecture i386:
    “_jpeg_quality_scaling”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_set_defaults”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_colorspace”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_stdio_dest”, referenced from:
    _main in cjpeg.o
    “_jpeg_add_quant_table”, referenced from:
    _read_quant_tables in rdswitch.o
    “_jpeg_simple_progression”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_default_colorspace”, referenced from:
    _main in cjpeg.o
    “_jpeg_finish_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_std_error”, referenced from:
    _main in cjpeg.o
    “_jpeg_start_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_write_scanlines”, referenced from:
    _main in cjpeg.o
    “_jpeg_set_quality”, referenced from:
    _parse_switches in cjpeg.o
    “_jpeg_destroy_compress”, referenced from:
    _main in cjpeg.o
    “_jpeg_CreateCompress”, referenced from:
    _main in cjpeg.o
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    lipo: can’t open input file: /var/tmp//ccv9xkbx.out (No such file or directory)
    make: *** [cjpeg] Error 1
    [/code]

    Closer, but still no cigar. Now it looks like the dynamic library, libjpeg.dylib, doesn’t contain stuff that cjpeg (and presumably other code) will require.

    What’s going on?

    /Bill

    #370598
    Bill Eccles
    Participant

    Got it.

    I have followed the instructions for compiling PHP from source and have arrived at the conclusion that there’s a flaw in them, a nice resolution for which I haven’t quite discovered, but perhaps you’ll know some trickery which will work well.

    Remember my original problem: I want to compile PHP universally with universal libraries.

    In building libjpeg and libiconv, neither of them builds with multiple architectures. Using others’ suggestions, the LDFLAGS which contain more than one -arch specification do nothing except build with the first -arch specified. Updating ltconfig and ltmain.sh from fink, does indeed build dylibs (which is a good thing) but they are single, “thin” architecture libraries.

    The ugly solution, of course, is to use the linking command gleaned from the make process four times and then use lipo to combine the thin files into one fat file. Here’s how I did it for libjpeg:

    [code]
    shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdt shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib.ppc -arch ppc jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version
    gcc-4.0: argument to `-compatibility_version’ is missing
    shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib.ppc -arch ppc jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
    shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib.ppc64 -arch ppc64 jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
    shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib.i386 -arch i386 jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
    shr-g5:jpeg-6b admin$ gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libjpeg.62.0.0.dylib.x86_64 -arch x86_64 jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo -lc -install_name /usr/local/lib/libjpeg.62.dylib -compatibility_version 63 -current_version 63.0
    shr-g5:jpeg-6b admin$ cd .libs
    shr-g5:.libs admin$ ls
    libjpeg.62.0.0.dylib libjpeg.62.0.0.dylib.ppc libjpeg.62.0.0.dylib.x86_64 libjpeg.dylib libjpeg.lai
    libjpeg.62.0.0.dylib.i386 libjpeg.62.0.0.dylib.ppc64 libjpeg.62.dylib libjpeg.la
    shr-g5:.libs admin$ lipo libjpeg.62.0.0.dylib.ppc libjpeg.62.0.0.dylib.x86_64 libjpeg.62.0.0.dylib.ppc libjpeg.62.0.0.dylib.i386 -create -output libjpeg.62.0.0.dylib
    lipo: libjpeg.62.0.0.dylib.ppc and libjpeg.62.0.0.dylib.ppc have the same architectures (ppc7400) and can’t be in the same fat output file
    shr-g5:.libs admin$ lipo libjpeg.62.0.0.dylib.ppc64 libjpeg.62.0.0.dylib.x86_64 libjpeg.62.0.0.dylib.ppc libjpeg.62.0.0.dylib.i386 -create -output libjpeg.62.0.0.dylib
    shr-g5:.libs admin$ file libjpeg.62.0.0.dylib
    libjpeg.62.0.0.dylib: Mach-O universal binary with 4 architectures
    libjpeg.62.0.0.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64
    libjpeg.62.0.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    libjpeg.62.0.0.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc
    libjpeg.62.0.0.dylib (for architecture i386): Mach-O dynamically linked shared library i386
    shr-g5:.libs admin$
    [/code]

    I then could go on and reissue “make” and it finished the job, allowing me to make install and putting the libjpeg where it belongs.

    Of course, I guess the simple solution is to pare down the LDFLAGS list to only the single architecture that I need, namely ppc64, and hope that everything else running on the server is also ppc64.

    Is there any way to tell which architecture httpd is running?

    /Bill

    #370619
    Bill Eccles
    Participant

    Done.

    (I feel like I’m talking to a giant vacuum, but hey, if someone Googles with similar problems, I hope some of this might help when they see this thread.)

    I’ve installed PHP5.2.4 with native GD extensions and with FreeType 2 without the Carbon API which causes Apache to crash, and here’s how I did it.

    First, install libjpeg using the notes I posted previously in this thread. Don’t forget to copy over the he ltconfig and ltmain.sh from Fink as noted.

    Second, install libiconv. There’s an excellent tutorial out there on the web which discusses doing this on 64-bit platforms.

    Third, install FreeType 2 without the Mac-specific extensions. These extensions make it possible for FT2 to access fonts stored in a font suitcase, something which is unnecessary if you use plain “.ttf” fonts from other sources. Here’s how I did that:

    Get FT2 and expand the tarball:
    (in Sources–my version of /SourceCache):
    curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
    cd ..
    tar xvfp Sources/freetype-2.3.5.tar.gz

    Configure FT2 and make it:
    MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –with-fsspec=no –with-fsref=no –with-quickdraw-toolbox=no –with-quickdraw-carbon=no
    make
    sudo make install

    Libraries end up in /usr/local/lib.

    Get PHP5.2.4 and expand the tarball.

    Configure PHP for universal binaries, native GD, and a few other font-specific options turned on:

    sh
    CFLAGS=-DBIND_8_COMPAT
    export CFLAGS
    MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –disable-dependency-tracking –with-apxs2=/usr/sbin/apxs –with-ldap=/usr –with-kerberos=/usr –enable-cli –with-zlib-dir=/usr –enable-trans-sid –with-xml –enable-exif –enable-ftp –enable-mbstring –enable-mbregex –enable-dbx –enable-sockets –with-iodbc=/usr –with-curl=/usr –with-config-file-path=/etc –sysconfdir=/private/etc –with-mysql-sock=/var/mysql –with-mysqli=/usr/bin/mysql_config –with-mysql=/usr –with-openssl –with-xmlrpc –with-xsl=/usr –without-pear –with-freetype-dir=/usr/local/lib –with-jpeg-dir=/usr/local/lib –with-png-dir=/usr/X11R6 –with-xpm-dir=/usr/X11R6 –with-gd –with-ttf –with-iconv=/usr/local/lib –enable-gd-imgstrttf –enable-gd-native-ttf

    (Note that I didn’t use an external libgd. That just caused more headaches than it was worth. I never, for example, got libgd to make without looking for libfreetype.la in /usr/X11/lib/somethingorother. Letting PHP do the heavy lifting worked out OK. The only question I have is, can I now remove the php source tree or does PHP load GD from there?)

    Make PHP and test it:
    make
    make test

    Preserve Apple PHP versions

    sudo cp /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.apple
    sudo cp /usr/bin/php /usr/bin/php.apple

    Install custom PHP in place of Apple’s install:
    sudo make install

    Edit httpd.conf to remove extraneous PHP5 LoadModule:
    sudo emacs /etc/apache2/httpd.conf

    (Remove the the first instance of LoadModule php5_module libexec/apache2/libphp5.so in this file. The next time you need to rebuild PHP because Apple updated it, the install step will probably not add another LoadModule for php5. In any case, this step isn’t really required because it only causes a warning at Apache2 startup.)

    Restart Apache2:
    sudo apachectl restart

    Voila! GD2.0.35 and PHP5.2.4 with a minimum amount of fuss.

    /Bill

    #370854
    Lukasha
    Participant

    Just so you don’t think you’re talking to no one, thanks for all your hard work. That’s an excellent discovery!

    Jeff

    #370863
    Bill Eccles
    Participant

    Thanks for the appreciation! It’s good to know somebody has gotten (or might get) something from it.

    In any case, I suppose part of the reasoning for my posting is selfish: if I have the problem again and lose my notes, I can always Google my own answer!

    /Bill

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Comments are closed