Page 1 of 1

Need list of dependencies to compile on linux

Posted: Tue Jul 15, 2008 1:09 am
by Polygon
I am trying to compile handbrake on linux with the new gtk gui, but for some reason its not compiling, most likely cause of a dependency is missing.

the trac page http://trac.handbrake.fr/wiki/CompileGuide says the only thing i need is gcc and g++ and thats obviously not the case as i have both of those installed and i get this:

Code: Select all

...skipped libhb.a for lack of libhb.a(encx264.o)...
...skipped HandBrakeCLI for lack of libhb.a...
...failed updating 2 target(s)...
...skipped 2 target(s)...
...updated 17 target(s)...
here is the list that i have installed (taken from various posts from this and other forums)

libgtk2.0-dev
libglib2.0-dev
libhal-storage1
libhal-storage-dev
libhal-dev
autoconf
automake
devscripts
g++ (included in build-essential)
gcc (included in build-essential)
jam
make
makedev
libtool
yasm
zlib1g-dev

any idea on what i could be missing, or something from this list that i installed that I don't need? thanks

Re: Need list of dependencies to compile on linux

Posted: Tue Jul 15, 2008 8:49 am
by s55
um, I'd recommend you come on IRC if you can. We don't actually document any unofficial builds, so the compile guide is for 0.9.2
Also, if you don't mind, can you post the entire compile log.

Re: Need list of dependencies to compile on linux

Posted: Thu Jul 17, 2008 7:44 pm
by xanders
Hi Guys
I'm having the same situation linking the HandBrakeCLI, i could resolve the rest of the dependencies like autoconf, automake, libtool and i could compile the faad2 in the contrib folder. my problem is when is linking the HandbrakeCLI throws an error "/usr/bin/ld: cannot find -lbz2". :shock: i googled for that lib and i could not find anything maybe with your experience could help me.

Thanks All.

Machine: Inter Centrino Duo 1.6 Ghz
RAM: 2 GB
OS: Ubuntu (Hardy)
Handbrake Version: SVN Revision 1571

Code: Select all

xanders@xanders-laptop:~/Develop/HBDev$ jam
...found 326 target(s)...
...updating 1 target(s)...
Link HandBrakeCLI 
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status

g++  -o HandBrakeCLI  test/test.o test/parsecsv.o libhb/libhb.a contrib/lib/liba52.a contrib/lib/libavformat.a contrib/lib/libavcodec.a contrib/lib/libavutil.a contrib/lib/libdca.a contrib/lib/libdvdread.a contrib/lib/libmp4v2.a contrib/lib/libfaac.a contrib/lib/libmp3lame.a contrib/lib/libmpeg2.a contrib/lib/libvorbis.a contrib/lib/libvorbisenc.a contrib/lib/libogg.a contrib/lib/libsamplerate.a contrib/lib/libx264.a contrib/lib/libxvidcore.a contrib/lib/libmkv.a contrib/lib/libswscale.a contrib/lib/libtheora.a contrib/lib/libfaad.a -lz -lbz2 -lpthread -ldl 

...failed Link HandBrakeCLI ...
...failed updating 1 target(s)...


Re: Need list of dependencies to compile on linux

Posted: Thu Jul 17, 2008 7:52 pm
by s55
/usr/bin/ld: cannot find -lbz2
Your missing a library. Not sure if that comes under zlib1g-dev, you should check if you have that installed.

Re: Need list of dependencies to compile on linux

Posted: Thu Jul 17, 2008 8:43 pm
by xanders
sr55 wrote:
/usr/bin/ld: cannot find -lbz2
Your missing a library. Not sure if that comes under zlib1g-dev, you should check if you have that installed.
Is not in that package, I already have that installed. another idea?

Thank You.

Code: Select all

xanders@xanders-laptop:~$ sudo apt-get install zlib1g-dev
[sudo] password for xanders: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zlib1g-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  libaudio-dev comerr-dev libqt4-qt3support libxmu-headers mesa-common-dev
  libkrb5-dev libglu1-xorg-dev libsqlite0-dev libqt4-dev devhelp-common
  libglu1-mesa-dev libssl-dev libxt-dev libxmu-dev libjpeg62-dev
  libgbf-1-common libgl1-mesa-dev liblcms1-dev libpq-dev libkadm55 libmng-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Re: Need list of dependencies to compile on linux

Posted: Thu Jul 17, 2008 8:53 pm
by JohnAStebbins
packabe libbz2-dev
and if your running 64bit you might need lib64bz2-dev

Re: Need list of dependencies to compile on linux

Posted: Thu Jul 17, 2008 9:57 pm
by xanders
JohnAStebbins wrote:packabe libbz2-dev
and if your running 64bit you might need lib64bz2-dev
That Works.
Thanks for the Help.

I have another problem maybe is that i need another lib installed.
if I find the Solution i will post the solution.

Code: Select all

xanders@xanders-laptop:~/Develop/HBDev$ jam
...found 326 target(s)...
...updating 1 target(s)...
Link HandBrakeCLI 
contrib/lib/libavcodec.a(ac3enc.o): In function `output_frame_end':
/home/xanders/Develop/HBDev/contrib/ffmpeg/libavcodec/ac3enc.c:1129: undefined reference to `av_crc_get_table'
/home/xanders/Develop/HBDev/contrib/ffmpeg/libavcodec/ac3enc.c:1136: undefined reference to `av_crc_get_table'
contrib/lib/libavcodec.a(flac.o): In function `decode_frame':
/home/xanders/Develop/HBDev/contrib/ffmpeg/libavcodec/flac.c:567: undefined reference to `av_crc_get_table'
contrib/lib/libavcodec.a(flacenc.o): In function `output_frame_footer':
/home/xanders/Develop/HBDev/contrib/ffmpeg/libavcodec/flacenc.c:1424: undefined reference to `av_crc_get_table'
contrib/lib/libavcodec.a(flacenc.o): In function `output_frame_header':
/home/xanders/Develop/HBDev/contrib/ffmpeg/libavcodec/flacenc.c:1281: undefined reference to `av_crc_get_table'
collect2: ld returned 1 exit status

g++  -o HandBrakeCLI  test/test.o test/parsecsv.o libhb/libhb.a contrib/lib/liba52.a contrib/lib/libavformat.a contrib/lib/libavcodec.a contrib/lib/libavutil.a contrib/lib/libdca.a contrib/lib/libdvdread.a contrib/lib/libmp4v2.a contrib/lib/libfaac.a contrib/lib/libmp3lame.a contrib/lib/libmpeg2.a contrib/lib/libvorbis.a contrib/lib/libvorbisenc.a contrib/lib/libogg.a contrib/lib/libsamplerate.a contrib/lib/libx264.a contrib/lib/libxvidcore.a contrib/lib/libmkv.a contrib/lib/libswscale.a contrib/lib/libtheora.a contrib/lib/libfaad.a -lz -lbz2 -lpthread -ldl 

...failed Link HandBrakeCLI ...
...failed updating 1 target(s)...


Re: Need list of dependencies to compile on linux

Posted: Fri Jul 18, 2008 1:30 am
by JohnAStebbins
Looks like something may not have built right in ffmpeg. You can try rebuilding it.
First clean up the ffmpeg contrib:

Code: Select all

rm contrib/config.cache
rm contrib/lib/libav* contrib/lib/libswscale.a
rm -rf contrib/ffmpeg
then jam

Re: Need list of dependencies to compile on linux

Posted: Sun Jul 20, 2008 6:50 pm
by xanders
JohnAStebbins wrote:Looks like something may not have built right in ffmpeg. You can try rebuilding it.
First clean up the ffmpeg contrib:

Code: Select all

rm contrib/config.cache
rm contrib/lib/libav* contrib/lib/libswscale.a
rm -rf contrib/ffmpeg
then jam
Thanks. it's working

Re: Need list of dependencies to compile on linux

Posted: Tue Sep 23, 2008 6:46 pm
by SnorreSelmer
I went through the list in the OP, and here's what I had to install for Ubuntu 8.10 (in my case, the x86_64 version, but the list should be the same for 32-bit too).

Code: Select all

sudo apt-get install build-essential libgtk2.0-dev libhal-dev libhal-storage-dev autoconf devscripts jam libbz2-dev intltool yasm libtool
yasm can be downloaded from the repository as of Ubuntu 8.10.

This will at least compile the latest SVN with the gtk GUI. For some reason I can't compile the 0.9.2 release.