Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

compiler GD Library Error

I followed exactly the excellent tutorial here:
http://osx.topicdesk.com/content/view/135/41/

i ge following compile error.I have X11 installed, How can help me?

/SourceCache/php-5.2.8/ext/gd][0]$ MACOSX DEPLOYMENTTARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -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 atload" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking for C compiler default output file name...
configure: error: in `/SourceCache/php-5.2.8/ext/gd':
configure: error: C compiler cannot create executables
See `config.log' for more details.

Message was edited by: Rocky_820618

Mac OS X (10.5.8)

Posted on Sep 13, 2009 8:13 AM

Reply
4 replies

Sep 14, 2009 12:21 AM in response to Rocky_820618

Thank you at first.
My Server version is 10.5.8,and I had install newest xcode tools. gcc4.2 and other package.

The bellow is my config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64. Invocation command line was

$ ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6

## --------- ##
## Platform. ##
## --------- ##

hostname = SERVER3.SERVER
uname -m = i386
uname -r = 9.8.0
uname -s = Darwin
uname -v = Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386
Kernel configured for up to 4 processors.
4 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 84 tasks, 482 threads, 4 processors
Load average: 0.16, Mach factor: 3.83
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /opt/local/lib/postgresql83/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/X11/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2729: checking for grep that handles long lines and -e
configure:2787: result: /usr/bin/grep
configure:2792: checking for egrep
configure:2854: result: /usr/bin/grep -E
configure:2859: checking for a sed that does not truncate output
configure:2913: result: /opt/local/bin/gsed
configure:3045: checking for cc
configure:3061: found /usr/bin/cc
configure:3072: result: cc
configure:3103: checking for C compiler version
configure:3112: cc --version >&5
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3123: $? = 0
configure:3112: cc -v >&5
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c +,obj-c+ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)
configure:3123: $? = 0
configure:3112: cc -V >&5
gcc-4.0: argument to `-V' is missing
configure:3123: $? = 1
configure:3112: cc -qversion >&5
i686-apple-darwin9-gcc-4.0.1: no input files
configure:3123: $? = 1
configure:3145: checking for C compiler default output file name
configure:3167: cc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind atload conftest.c >&5
cc1: error: invalid option argument '-Ox'cc1: error: invalid option argument '-Ox'

cc1: error: invalid option argument '-Ox'
cc1: error: invalid option argument '-Ox'
lipo: can't figure out the architecture type of: /var/folders/s0/s0AyzswkHbmoxcVloNjyvk +TI/-Tmp-//cc5gA0ol.out
configure:3171: $? = 1
configure:3208: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
| return ferror (f) || fclose (f) != 0;
|
| ;
| return 0;
| }
configure:3214: error: in `/SourceCache/php-5.2.8/ext/gd':
configure:3218: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac cv_env_CCset=
ac cv_env_CCvalue=
ac cv_env_CFLAGSset=set
ac cv_env_CFLAGSvalue='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -pipe -no-cpp-precomp'
ac cv_env_CPPFLAGSset=
ac cv_env_CPPFLAGSvalue=
ac cv_env_CPPset=
ac cv_env_CPPvalue=
ac cv_env_LDFLAGSset=set
ac cv_env_LDFLAGSvalue='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind atload'
ac cv_env_LIBSset=
ac cv_env_LIBSvalue=
ac cv_env_build_aliasset=
ac cv_env_build_aliasvalue=
ac cv_env_host_aliasset=
ac cv_env_host_aliasvalue=
ac cv_env_target_aliasset=
ac cv_env_target_aliasvalue=
ac cv_pathEGREP='/usr/bin/grep -E'
ac cv_pathGREP=/usr/bin/grep
ac cv_prog_ac_ctCC=cc
lt cv_pathSED=/opt/local/bin/gsed

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AWK=''
CC='cc'
CFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -pipe -no-cpp-precomp'
CONFIGURE_COMMAND=' '\''./configure'\'' '\''--with-zlib-dir=/usr'\'' '\''--with-jpeg-dir=/usr/local/lib'\'' '\''--with-png-dir=/usr/X11R6'\'' '\''--with-freetype-dir=/usr/X11R6'\'' '\''--with-xpm-dir=/usr/X11R6'\'''
CONFIGURE_OPTIONS=' '\''--with-zlib-dir=/usr'\'' '\''--with-jpeg-dir=/usr/local/lib'\'' '\''--with-png-dir=/usr/X11R6'\'' '\''--with-freetype-dir=/usr/X11R6'\'' '\''--with-xpm-dir=/usr/X11R6'\'''
CPP=''
CPPFLAGS=''
DEFS=''
ECHO='/bin/echo'
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP='/usr/bin/grep -E'
EXEEXT=''
GREP='/usr/bin/grep'
LDFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind atload'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RE2C=''
SED='/opt/local/bin/gsed'
SHELL='/bin/sh'
SHLIB DL_SUFFIXNAME=''
SHLIB SUFFIXNAME=''
STRIP=''
ac ctCC='cc'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program transformname='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

Sep 14, 2009 8:49 AM in response to Rocky_820618

Well, this looks like the error...


configure:3167: cc -arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Ox -pipe -no-cpp-precomp -arch ppc -arch ppc64 -arch i386 -arch x86_64 -bindatload conftest.c >&5
cc1: error: invalid option argument '-Ox'cc1: error: invalid option argument '-Ox'
cc1: error: invalid option argument '-Ox'
cc1: error: invalid option argument '-Ox'
lipo: can't figure out the architecture type of: /var/folders/s0/s0AyzswkHbmoxcVloNjyvk+TI/-Tmp-//cc5gA0ol.out


I'd remove whatever Xcode was installed here, and try again with the version of Xcode that was shipped with Leopard. (XCode 3.1.2?) And work through the full sequence from the root user, and then ring up the folks that put together that script, and provide them with a complete listing of what you've done here.

compiler GD Library Error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.