PHP 8.5.0 Alpha 4 available for testing

Compilación de extensiones PECL estáticamente en PHP

Puede ser necesario construir una extensión PECL estáticamente en el binario PHP. Para hacer esto, el código fuente de la extensión necesitará ser colocado bajo el directorio /path/to/php/src/dir/ext/, y el sistema de construcción de PHP necesitará regenerar su script de configuración.

$ cd /path/to/php/src/dir/ext
$ pecl download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname

Esto resultará en el siguiente directorio:

/path/to/php/src/dir/ext/extname

Desde aquí, PHP necesita ser forzado a reconstruir el script de configuración, y luego puede ser construido normalmente:

$ cd /path/to/php/src/dir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install

Nota: Para ejecutar el script buildconf, se necesitarán autoconf 2.68 y automake 1.4+. Versiones más nuevas de autoconf pueden funcionar pero no son compatibles.

Si se usa --enable-extname o --with-extname depende de la extensión. Típicamente, una extensión que no requiere librerías externas usa --enable. Para estar seguro, ejecute lo siguiente después de buildconf:

$ ./configure --help | grep extname
add a note

User Contributed Notes 1 note

up
3
anthon at piwik dot org
12 years ago
Some extensions cannot be statically linked (e.g., xdebug).
To Top