I'm stuck with an installation of ffmpeg-php on my XAMPP under MacOs 10.6 Snow Leopard.
When I start my server, it prompts the following messages to the error_log:
- Code: Select all
dyld: lazy symbol binding failed: Symbol not found: _avcodec_init
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/ffmpeg.so
Expected in: flat namespace
dyld: Symbol not found: _avcodec_init
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/ffmpeg.so
Expected in: flat namespace
These are the steps I've done so far:
1. I installed ffmpeg via macports, it all worked fine. these are my ffmpeg entries I get when typing "ffmpeg" into the terminal (shell):
- Code: Select all
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 22 2011 16:09:09 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --enable-nonfree --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 1.11. 0 / 1.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
2. I downloaded ffmpeg-php from sourceforge and compiled it as 32 bit:
- Code: Select all
./configure CFLAGS="-arch i386 $CFLAGS" CCFLAGS="-arch i386 $CCFLAGS" \
> CXXFLAGS="-arch i386 $CXXFLAGS" LDFLAGS="-arch i386 $LDFLAGS" --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config --with-ffmpeg=/opt/local
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 for C compiler default output file name... rm: a.out.dSYM: is a directory
a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin10.7.0
checking host system type... i386-apple-darwin10.7.0
checking target system type... i386-apple-darwin10.7.0
checking for PHP prefix... /Applications/XAMPP/xamppfiles
checking for PHP includes... -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1 -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/ext -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/ext/date/lib -I/Applications/XAMPP/xamppfiles/include
checking for PHP extension directory... /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers... ...found in /usr/local/include/libavcodec
checking for ffmpeg libavcodec.so... ...found in /usr/lib
checking for ffmpeg swscale support... yes
checking for ld used by cc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
kinesias:ffmpeg-php-0.6.0 matthias_lang$ make
/bin/sh /applications/xampp/xamppfiles/ffmpeg-php-0.6.0/libtool --mode=install cp ./ffmpeg.la /applications/xampp/xamppfiles/ffmpeg-php-0.6.0/modules
cp ./.libs/ffmpeg.so /applications/xampp/xamppfiles/ffmpeg-php-0.6.0/modules/ffmpeg.so
cp ./.libs/ffmpeg.lai /applications/xampp/xamppfiles/ffmpeg-php-0.6.0/modules/ffmpeg.la
----------------------------------------------------------------------
Libraries have been installed in:
/applications/xampp/xamppfiles/ffmpeg-php-0.6.0/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
kinesias:ffmpeg-php-0.6.0 matthias_lang$ make install
Installing shared extensions: /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/
What do you think? Please help me, this problem is driving me nuts....
Thanks, Matthias