WebFaction
Community site: login faq

I'm trying to build ffmpeg with some additional options such as x264.

/home/username/lib/libx264.a /home/username/lib/libx264.so /home/username/lib/libx264.so.116 LD_INCLUDE_PATH="/home/memories/include" LD_LIBRARY_PATH="/home/memories/lib"

./configure --prefix=$HOME --enable-filters --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-static

results in ERROR: libx264 not found

asked 13 Sep '11, 01:46

Paul Egges
1257
accept rate: 0%


Hi,

You would first need to install libx264 using:

    git clone git://git.videolan.org/x264.git
    cd x264 
    ./configure --enable-shared --prefix=$HOME
    export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

You then need to run configure in the same terminal.

permanent link

answered 13 Sep '11, 01:55

neeravk
1.5k3412
accept rate: 41%

I had already installed it (the directory listing shows above. I did not use the --enable-shared since I was trying for a static link). I retried it with the --enabled-shared option you listed above and got the same error.

I did an export for C_INCLUDE_PATH="/home/memories/include" and that partially fixed the problem, but I'm getting almost the same error message. The config.log now has (at the end).

gcc -Wl,--as-needed -o /home/username/tmp/ffconf.efo16505 /home/memories/tmp/ffconf.EHv16509.o -lx264 -lfaac -lm -pthread -lbz2 -lz /usr/bin/ld: cannot find -lx264 collect2: ld returned 1 exit status ERROR: libx264 not found

So it appears that the linker is not finding the file.

(13 Sep '11, 02:36) Paul Egges

I believe the problem maybe because I'm missing the libx264.la from the library directory.

(13 Sep '11, 02:43) Paul Egges

Can you add this to your configure prefixes:

--extra-ldflags=-L$HOME/lib

(13 Sep '11, 02:49) neeravk

thank you very MUCH. Any idea why LD_LIBRARY_PATH was not being used?

(13 Sep '11, 03:04) Paul Egges

I am not really sure, but it looks like that the configure script for ffmpeg does not honor it.

(13 Sep '11, 03:07) neeravk

LD_LIBRARY_PATH is not related to compile-time library search, but is only used to find shared libraries (for execution) at run time. The separate environment variable LIBRARY_PATH can instead be used to that effect. The environment variables honored by gcc are listed here.

(22 Feb '12, 00:12) ryans ♦♦
showing 5 of 6 show 1 more comments

This ffmpeg install guide is now available for building ffmpeg from source. It includes libx264 support along with some other useful additions as well.

permanent link

answered 22 Feb '12, 00:10

ryans ♦♦
5.0k103460
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×8
×6
×4

question asked: 13 Sep '11, 01:46

question was seen: 5,433 times

last updated: 22 Feb '12, 00:13

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM