The php4-ffmpeg and php5-ffmpeg module used by apache20/php is broken. It seems to be a pthread problem with ports/multimedia/ffmpeg. Compile ports/multimedia/ffmpeg without -pthread or using ffmpeg-2007.05.30_1 still works. httpd-error.log gives: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/ffmpeg.so' - /usr/local/lib/libavcodec.so.1: Undefined symbol "pthread_join" in Un known on line 0 [notice] Apache/2.0.59 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_ssl/2.0.59 OpenSSL/0.9.8e configured -- resuming normal operations Fix: Not a fix, maybe only a workaround or debug hint: Compile ports/multimedia/ffmpeg without -pthread or using ffmpeg-2007.05.30_1 still works. How-To-Repeat: cd /usr/ports/graphics/php5-ffmpeg make install clean (will install ports/multimedia/ffmpeg as a dependencie) (same error with php4) /usr/local/etc/rc.d/apache2.sh restart will lead to an error in httpd-error.log: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/ffmpeg.so' - /usr/local/lib/libavcodec.so.1: Undefined symbol "pthread_join" in Un known on line 0 [notice] Apache/2.0.59 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_ssl/2.0.59 OpenSSL/0.9.8e configured -- resuming normal operations
Responsible Changed From-To: freebsd-ports-bugs->acm Over to maintainer
"Not a fix, maybe only a workaround or debug hint: Compile ports/multimedia/ffmpeg without -pthread or using ffmpeg-2007.05.30_1 still works." How do I do this?
You (Marjo van Lier) wrote on Fri, Aug 31, 2007 at 12:27:41PM CEST: > "Not a fix, maybe only a workaround or debug hint: > Compile ports/multimedia/ffmpeg without -pthread or using > ffmpeg-2007.05.30_1 still works." > > > > How do I do this? Edit the Makefile for the ffmpeg port and remove the --enable-pthreads flag. But I am not sure about unwanted effects of this "workaround".
unwanted effects of this "workaround".?? What do you mean by this? On 8/31/07, Andy Hilker <ahilker@inotronic.de> wrote: > > You (Marjo van Lier) wrote on Fri, Aug 31, 2007 at 12:27:41PM CEST: > > "Not a fix, maybe only a workaround or debug hint: > > Compile ports/multimedia/ffmpeg without -pthread or using > > ffmpeg-2007.05.30_1 still works." > > > > > > > > How do I do this? > > Edit the Makefile for the ffmpeg port and remove the --enable-pthreads > flag. But I am not sure about unwanted effects of this "workaround". >
I have the same problem. Any idea when it will be fixed?
Found under http://groups.google.com/group/ffmpeg-php/ (topic: Success compiling ffmpeg-php on freebsd ), tried and worked. Find the patch for /usr/ports/graphics/php4-ffmpeg/Makefile below. > I would recommend just adding -lpthread to the ffmpeg-php Makefile > after -lavcodec. The libavcodec doesn't link to the pthreads library > itself but rather expects that the binary linking to it will instead. > Adding the option to the makefile will make sure ffmpeg.so is linked > to pthreads and can therefore load the library when libavcodec makes > the call. > > Hope that helps! --- Makefile Fri Feb 22 14:58:11 2008 +++ Makefile.fixed Fri Feb 22 14:58:05 2008 @@ -27,6 +27,6 @@ USE_PHPEXT= yes IGNORE_WITH_PHP?=5 DEFAULT_PHP_VER?=4 -CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include +CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include -lpthread .include <bsd.port.mk>
Sorry, the last provided patch will trigger the "segfault on kill -HUP" problem described in PR ports/120409. The before described workaround by removing "--enable-pthreads" from /usr/ports/multimedia/ffmpeg/Makefile still works.
State Changed From-To: open->closed Closed in favor of ports/120409.