Installation problems - swscale.h: No such file or directory

1,337 views
Skip to first unread message

Andreas Waltl

unread,
Jan 15, 2009, 11:49:46 AM1/15/09
to ffmpeg-php
I installed ffmpeg with --enable-shared option successfully. But
there occurs an error while compiling ffmpeg-PHP:

/usr/include/php5/ext/ffmpeg-php-0.6.0/ffmpeg-php.c:46:21: error:
swscale.h: No such file or directory
/usr/include/php5/ext/ffmpeg-php-0.6.0/ffmpeg-php.c: In function
âzm_info_ffmpegâ:
/usr/include/php5/ext/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error:
âLIBSWSCALE_IDENTâ undeclared (first use in this function)
/usr/include/php5/ext/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: (Each
undeclared identifier is reported only once
/usr/include/php5/ext/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: for
each function it appears in.)
make: *** [ffmpeg-php.lo] Error 1

Does anybody know what to do now?

Ashley Sheinwald

unread,
Jan 15, 2009, 2:37:01 PM1/15/09
to ffmpe...@googlegroups.com
Can you explain the process of you installed with enabled shared -
take it that was configure command?

Thanks

Andreas Waltl

unread,
Jan 15, 2009, 2:50:23 PM1/15/09
to ffmpeg-php
I followed exactly the steps in the INSTALL file - it was ./configure
&& make

REQUIREMENTS
============

ffmpeg-0.4.9pre1 or higher built with the --enable-shared option and
without the --enable-swscale option (ffmpeg svn recommended)
php-5.0.x or higher. For php-4.x.x, use ffmpeg-php-0.5.1 or older.
gd-2.0.x or higher or the version of GD bundled with PHP

INSTALLATION INSTRUCTIONS
=========================

These instructions are for Linux since I don't have windows. If you
successfully build on windows, let me know how you did it and I'll
update
these instructions.

BUILDING FFMPEG
---------------

cd /path/to/ffmpeg
./configure --enable-shared --prefix=/usr
make clean && make
[become root]
make install


BUILDING FFMPEG-PHP AS A SHARED EXTENSION
-----------------------------------------

1. Build php if not already built or installed by your distro (See the
file INSTALL in your php source directory)

2. Unpack the archive

tar -xjf ffmpeg-php.X.x.x.tbz2 -C /path/to/php_sources/ext/

3. cd into the ffmpeg extension directory

cd /path/to/php_sources/ext/ffmpeg-php.X.X.X/

4. Run phpize (included with your php install) to build configuration
files

phpize

5. Configure and build

./configure && make

6. Install the shared extension

make install (as root)


On 15 Jan., 20:37, Ashley Sheinwald <ashley.sheinw...@gmail.com>
wrote:

Todd Kirby

unread,
Jan 15, 2009, 2:58:54 PM1/15/09
to ffmpe...@googlegroups.com
Did you build ffmpeg from source or is it from an rpm (or other pkg)

-T-

Andreas Waltl

unread,
Jan 15, 2009, 3:19:57 PM1/15/09
to ffmpeg-php
from source: ffmpeg-checkout-2009-01-14 (svn)

Todd Kirby

unread,
Jan 15, 2009, 4:41:41 PM1/15/09
to ffmpe...@googlegroups.com
Try rebuilding ffmpeg with --enable-swscale

-T-

On Thu, Jan 15, 2009 at 12:19 PM, Andreas Waltl <an...@netcu.de> wrote:

from source: ffmpeg-checkout-2009-01-14 (svn)


Andreas Waltl

unread,
Jan 15, 2009, 5:33:42 PM1/15/09
to ffmpeg-php
Id did the rebuilding but the same error occurs yet again. Aaaaarrrgh

On 15 Jan., 22:41, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> Try rebuilding ffmpeg with --enable-swscale
>
> -T-
>

Todd Kirby

unread,
Jan 15, 2009, 5:49:57 PM1/15/09
to ffmpe...@googlegroups.com
Run ldd on your ffmpeg binary to see if it's really building in swscaler

ldd /usr/bin/ffmpeg | grep swscale

-T-

Andreas Waltl

unread,
Jan 16, 2009, 4:09:35 AM1/16/09
to ffmpeg-php
On 15 Jan., 23:49, "Todd Kirby" <ffmpeg....@gmail.com> wrote:
> Run ldd on your ffmpeg binary to see if it's really building in swscaler
>
> ldd /usr/bin/ffmpeg | grep swscale
>
Returns: libswscale.so.0 => not found

Andreas Waltl

unread,
Jan 16, 2009, 4:11:12 AM1/16/09
to ffmpeg-php
I configured ffmpeg with following command:
./configure --enable-shared --enable-swscale --enable-gpl --prefix=/
usr

Todd Kirby

unread,
Jan 16, 2009, 4:24:25 PM1/16/09
to ffmpe...@googlegroups.com
Seems like the libswscale.so.0 and swscale.h file aren't getting installed for some reason. When you run ffmpeg from the commandline does it complain about missing libswscale.so.0?
Reply all
Reply to author
Forward
0 new messages