Je viens vous faire part d'un problème qui me bloque depuis maintenant quelques heures.
Mon ordinateur personnel est un MacBook Pro, disposant de Mac OS X (10.6.4), et donc de Apache (2.2) et PHP (5.3.2) pré-installé.
Jusque là, tout allais bien, mais ce jour, pour les besoins d'un projet, j'ai eu besoin d'installer APC.
Du coup, procédure standard, je télécharge les sources, je désarchive, un coup de phpize, je lance un ./configure, puis un make.
Mais là, c'est le drame, j'ai une série d'erreur étrange :
Code : Tout sélectionner
mrandy:APC-3.1.4$ make
/bin/sh /Users/mrandy/Downloads/APC-3.1.4/libtool --mode=compile cc -I. -I/Users/mrandy/Downloads/APC-3.1.4 -DPHP_ATOM_INC -I/Users/mrandy/Downloads/APC-3.1.4/include -I/Users/mrandy/Downloads/APC-3.1.4/main -I/Users/mrandy/Downloads/APC-3.1.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/mrandy/Downloads/APC-3.1.4/apc.c -o apc.lo
mkdir .libs
cc -I. -I/Users/mrandy/Downloads/APC-3.1.4 -DPHP_ATOM_INC -I/Users/mrandy/Downloads/APC-3.1.4/include -I/Users/mrandy/Downloads/APC-3.1.4/main -I/Users/mrandy/Downloads/APC-3.1.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/mrandy/Downloads/APC-3.1.4/apc.c -fno-common -DPIC -o .libs/apc.o
In file included from /Users/mrandy/Downloads/APC-3.1.4/apc.c:44:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /Users/mrandy/Downloads/APC-3.1.4/apc.c:44:
/usr/include/php/ext/pcre/php_pcre.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before ‘pcre’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:356: error: expected specifier-qualifier-list before ‘pcre’
/Users/mrandy/Downloads/APC-3.1.4/apc.c: In function ‘apc_regex_compile_array’:
/Users/mrandy/Downloads/APC-3.1.4/apc.c:417: error: ‘apc_regex’ has no member named ‘preg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:417: error: ‘apc_regex’ has no member named ‘preg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:418: error: ‘apc_regex’ has no member named ‘nreg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:418: error: ‘apc_regex’ has no member named ‘nreg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c: In function ‘apc_regex_match_array’:
/Users/mrandy/Downloads/APC-3.1.4/apc.c:450: error: ‘apc_regex’ has no member named ‘preg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:450: error: ‘apc_regex’ has no member named ‘preg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:451: error: ‘apc_regex’ has no member named ‘nreg’
/Users/mrandy/Downloads/APC-3.1.4/apc.c:451: error: ‘apc_regex’ has no member named ‘nreg’
make: *** [apc.lo] Error 1A nouveau quelques recherches et je tombe sur un ligne à taper sous Mac OS X :
Code : Tout sélectionner
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" ./configureMais, à nouveau, c'est le drame, puisqu'en recommençant l'opération de 0 (phpize, puis la commande donnée ci-dessus), j'ai directement une erreur :
Code : Tout sélectionner
mrandy:APC-3.1.4$ 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
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... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... no
configure: error: in `/Users/mrandy/Downloads/APC-3.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Code : Tout sélectionner
lipo: can't open input file: /var/folders/ME/MEt-mlZRHJ06H4rkshxt1++++TI/-Tmp-//ccnEHJIz.out (No such file or directory)
configure:3039: $? = 1
configure:3077: result: no
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. */
ù
ù int
ù main ()
ù é
ù
ù ;
ù return 0;
ù è
configure:3082: error: in `/Users/mrandy/Downloads/APC-3.1.4':
configure:3086: error: C compiler cannot create executables
See `config.log' for more details.Et là, j'avoue que je bloque totalement.
Je ne comprend pas l'erreur avec la procédure standard, je ne comprend pas pourquoi je suis obligé de spécifier que je suis sur une architecture 64bits alors que le système doit le savoir.
Bref, dans tout les cas, je suis bien paumé, mais je voudrais comprendre ce qui ne marche pas.
Du coup, je viens implorer votre aide bienveillante.