Skip to main content
added 15 characters in body
Source Link

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )

PS: I've checked patch sources in guardian-project and I've found this:

# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass.  The Android NDK does
# not provide any kind of pkg-config.

but doesn't OSXDoes it mean I have ato move to Linux ? Isn't pkg-config installed on OSX ?

algakzru$ pkg-config --version
0.28

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )

PS: I've checked patch sources in guardian-project and I've found this:

# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass.  The Android NDK does
# not provide any kind of pkg-config.

but doesn't OSX have a pkg-config?

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

Thanks in advance ( and sorry for my poor english )

PS: I've checked patch sources in guardian-project and I've found this:

# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass.  The Android NDK does
# not provide any kind of pkg-config.

Does it mean I have to move to Linux ? Isn't pkg-config installed on OSX ?

algakzru$ pkg-config --version
0.28
added 323 characters in body
Source Link

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )

PS: I've checked patch sources in guardian-project and I've found this:

# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass.  The Android NDK does
# not provide any kind of pkg-config.

but doesn't OSX have a pkg-config?

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )

PS: I've checked patch sources in guardian-project and I've found this:

# this is a fake pkg-config since ffmpeg requires pkg-config if you want to
# include external libraries like libfreetype or libass.  The Android NDK does
# not provide any kind of pkg-config.

but doesn't OSX have a pkg-config?

Source Link

How to build FFmpeg with Freetype2 for Android

On OSX Yosemite I'm trying to build FFmpeg with freetype library included ( I need it for drawtext filter ). Unfortunately I cannot configure ffmpeg properly and every try ends with "freetype not found" error.

  1. Building plain FFmpeg-2.5.3 without freetype works perfectly well (followed this tutorial)
  2. Building Freetype-2.5.3 also works fine (followed this tutorial)
  3. Included extra library locations, where built freetype is located,

like this:

--extra-ldflags="-L$PREFIX/lib" 
--extra-cflags="-I$PREFIX/include -I$PREFIX/include/freetype2"
  1. ./build_android.sh ends up with ERROR: freetype2 not found

build_android.sh:

#!/bin/bash
NDK=$HOME/Desktop/adt/android-ndk-r10d
SYSROOT=$NDK/platforms/android-9/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
function build_one
{
./configure \
 --prefix=$PREFIX \
 --enable-shared \
 --disable-static \
 --enable-libfreetype \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --target-os=linux \
 --arch=arm \
 --enable-cross-compile \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
 --extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}

CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -I$PREFIX/include"
ADDI_LDFLAGS="-L$PREFIX/lib"
build_one

Last 3 lines of config.log :

require_libfreetype
false --exists --print-errors freetype2
ERROR: freetype2 not found

pkg-config is installed:

algakzru$ pkg-config --version
0.28

Thanks in advance ( and sorry for my poor english )