You are not logged in.

#1 2010-07-01 07:00:07

DrZaius
Member
Registered: 2008-01-02
Posts: 193

[solved] ERROR: libx264 not found

x264 seems to install fine. FFmpeg complains that it can't find libx264 when I use makepkg and the PKGBUILDs below.  However, FFmpeg will find libx264 if:

     * --enable-shared is added to the x264 PKGBUILD, or
     * ./configure (with the same options from the FFmpeg PKGBUILD below) is run manually

This used to work for me until I upgraded the system on June 27 (x86_64). The last previous upgrade was June 10.  I can also duplicate this on a new Arch VM.

Questions
Why can FFmpeg not find a static libx264 when using makepkg?
Why does a manual FFmpeg ./configure find libx264, but makepkg does not?

To Duplicate
1. Install x264 using this PKGBUILD (adapted from x264-git, but without --enable-shared):

pkgname=x264-git
pkgver=20100605
pkgrel=1
pkgdesc="free library for encoding H264/AVC video streams"
arch=('i686' 'x86_64')
license=('GPL')
depends=('glibc')
makedepends=('git' 'yasm')
url="http://www.videolan.org/developers/x264.html"
conflicts=('x264')
provides=("x264=$pkgver")
source=()
md5sums=()

_gitroot="git://git.videolan.org/x264.git"
_gitname="x264"

build() {
  cd $srcdir
  msg "Connecting to the GIT server...."
  
  if [[ -d $srcdir/$_gitname ]] ; then
    cd $_gitname
    git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi
  
  msg "GIT checkout done"
  msg "Starting make..."
  
  rm -rf $srcdir/$_gitname-build
  git clone $srcdir/$_gitname $srcdir/$_gitname-build
  
  cd $srcdir/$_gitname-build

  ./configure --prefix=/usr || return 1
  
  make || return 1
  make DESTDIR=$pkgdir install || return 1
  
  rm -rf $srcdir/$_gitname-build
}

2. Install FFmpeg using this PKGBUILD (adapted from ffmpeg-svn, but pruned of many non-libx264 related dependencies and options):

# Contributor: raubkopierer <mail[dot]sensenmann[at]googlemail[dot]com>

pkgname=ffmpeg-svn
pkgver=23482
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
arch=('i686' 'x86_64')
url="http://ffmpeg.mplayerhq.hu/"
license=('GPL')
depends=('sdl' 'zlib' 'x264-git>=20100605')
makedepends=('subversion')
provides=("ffmpeg=`date +%Y%m%d`" "qt-faststart")
conflicts=('ffmpeg')
source=()
md5sums=()

_svntrunk=svn://svn.ffmpeg.org/ffmpeg/trunk
_svnmod=ffmpeg

build() {
  cd "$srcdir"

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$_svnmod-build"
  mkdir "$_svnmod-build"
  cd "$_svnmod-build"

  "$srcdir/$_svnmod/configure" \
  --prefix=/usr \
  --enable-gpl \
  --enable-libx264 \
  --enable-pthreads \
  --arch=`uname -m` \
  || return 1

  make || return 1
  make doc/ff{mpeg,play,server}.1 || return 1

  make DESTDIR="$pkgdir" install || return 1
  make DESTDIR="$pkgdir" install-man || return 1

  make tools/qt-faststart || return 1
  cp -a tools/qt-faststart $pkgdir/usr/bin
}

FFmpeg should complain with ERROR: libx264 not found.  I added the config.log to pastebin.

Last edited by DrZaius (2010-07-01 17:51:22)

Offline

#2 2010-07-01 08:22:41

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] ERROR: libx264 not found

it might be because of LDFLAGS. do unset LDFLAGS before configure in ffmpeg


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-07-01 17:50:53

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: [solved] ERROR: libx264 not found

Thanks.  You're right and it works now.  I added:

export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"

as shown here: [solved] New LDFLAGS default broke at least one AUR package for me.

Offline

Board footer

Powered by FluxBB