ID: 48911 Updated by: j...@php.net Reported By: thomas at koch dot ro -Status: Open +Status: Closed Bug Type: Compile Failure Operating System: Debian Lenny PHP Version: 5.3.0 New Comment:
This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-07-28 21:07:43] s...@php.net Automatic comment from SVN on behalf of jani Revision: http://svn.php.net/viewvc/?view=revision&revision=286468 Log: - Fixed bug #48911 (embed sapi misses SAPI_API) ------------------------------------------------------------------------ [2009-07-14 07:16:45] thomas at koch dot ro Description: ------------ I try the most simple program that uses the embed sapi. Due to missing SAPI_API macros the symbols int php_embed_init(int argc, char **argv PTSRMLS_DC); void php_embed_shutdown(TSRMLS_D); extern sapi_module_struct php_embed_module; get visibility hidden in the resulting libphp5.so. Fix: put SAPI_API before these symbols in sapi/embed/php_embed.c. (Also in php_embed.h ?) Thanks to ScottMac for the hint on IRC! Reproduce code: --------------- #include <sapi/embed/php_embed.h> int main(int argc, char *argv[]) { PHP_EMBED_START_BLOCK(argc,argv) PHP_EMBED_END_BLOCK() return 0; } Expected result: ---------------- should compile without problems Actual result: -------------- gcc -c -I/usr/local/include/php/ -I/usr/local/include/php/main - I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM -Wall -g -o worker.o worker.c gcc -L/usr/local/lib -lphp5 -o worker worker.o worker.o: In function `main': /var/checkouts/gearman-php-worker/worker.c:5: undefined reference to `php_embed_init' /var/checkouts/gearman-php-worker/worker.c:6: undefined reference to `php_embed_shutdown' collect2: ld returned 1 exit status make: *** [all] Error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48911&edit=1