Unable to compile

Added by Chinghan Yu about 10 years ago

When updating to the newest version of libav, showtime can no longer be compiled successfully on Linux platform. I paste the error message below:

CC    build.linux/src/backend/dvd/dvd.o
cc1: warnings being treated as errors
/home/estellise/showtime/src/backend/dvd/dvd.c: In function ‘dvd_pes’:
/home/estellise/showtime/src/backend/dvd/dvd.c:402:5: error: implicit declaration of function ‘av_rescale_q’
make: *** [build.linux/src/backend/dvd/dvd.o] Error 1

Perhaps libav has modified some function calls in the newest release.


Replies (7)

RE: Unable to compile - Added by Andreas Smas about 10 years ago

Yes, you're best of using

:andoma/libav.git

and checkout branch: showtime

it is the released version of libav 0.7 + a couple of fixes for showtime on top

I really should fix this in the README and att libav as a git submodule now that the API changes so frequently

RE: Unable to compile - Added by Chinghan Yu about 10 years ago

Thanks for your help, now it rocks like a charm again~

How to get this git? - Added by Rob vh about 10 years ago

Yesterday I used the direction in https://github.com/andoma/showtime "How to build for Linux"

cd
mkdir libav
cd libav
git clone git://git.libav.org/libav.git src

But I still get

/usr/local/src/showtime/src/backend/dvd/dvd.c: In function ‘dvd_pes’:
/usr/local/src/showtime/src/backend/dvd/dvd.c:402:5: error: implicit declaration of function ‘av_rescale_q’

Can you tell me what git command to use for "using :andoma/libav.git and checkout branch: showtime"

RE: Unable to compile - Added by Mattias Wadman about 10 years ago

Do something like this:

$ git clone git://github.com/andoma/libav.git
Cloning into libav...
remote: Counting objects: 148973, done.
remote: Compressing objects: 100% (32780/32780), done.
remote: Total 148973 (delta 116178), reused 148667 (delta 115996)
Receiving objects: 100% (148973/148973), 31.38 MiB | 576 KiB/s, done.
Resolving deltas: 100% (116178/116178), done.
$ cd libav
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/release/0.5
  remotes/origin/release/0.6
  remotes/origin/release/0.7
  remotes/origin/showtime
$ git checkout -b showtime remotes/origin/showtime
Branch showtime set up to track remote branch showtime from origin.
Switched to a new branch 'showtime'

Now you should be able to build a working libav for showtime and you should be able to keep your local repos updated with:
$ git pull

RE: Unable to compile - Added by ramaza - about 10 years ago

I have the same problem because I followed the outdated instructions from file "README.markdown".

To solve it I tried (but didn't work)

git clone [email protected]:andoma/libav.git
Cloning into libav...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Instead this seemed better and libav compiled with no error

git clone git://github.com/andoma/libav.git
cd libav
./configure --prefix=${PWD}
make -j2
make install

Afterwards I compiled showtime

cd showtime
./configure --disable-libpulse --disable-gu --disable-avahi --disable-libsmbclient --pkg-config-path=${HOME}/libav/lib/pkgconfig
make -j2

Unfortunately it ends with this error

CC    build.linux/src/fileaccess/fa_libav.o
cc1: warnings being treated as errors
/home/fraboe/showtime/src/fileaccess/fa_libav.c: In function ‘fa_libav_open_format’:
/home/fraboe/showtime/src/fileaccess/fa_libav.c:168:3: error: implicit declaration of function ‘avformat_open_input’
make: *** [build.linux/src/fileaccess/fa_libav.o] Error 1

I think I made something wrong. Perhaps someone can give me a hint.

Thanks in advance!

RE: Unable to compile - Added by Mattias Wadman about 10 years ago

As andoma stated above you currently have to link showtime with the his modified version of libav. Checkout the "showtime" branch of andomas libav repos and build again.

RE: Unable to compile - Added by ramaza - about 10 years ago

I created myself an account at github.com and read some git related instructions. Now it works. Obviously I don't know enough about how to use git correctly. I thought I was already checking out the correct branch.

(1-7/7)