Build Failure (Linux, Cross-Compile)

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
arrmo
Posts: 28
Joined: Tue Jan 10, 2012 1:59 am

Build Failure (Linux, Cross-Compile)

Post by arrmo »

Hi,

I am able to get the CLI to build under Linux (good news there ... :-)). However, if I try to cross-compile to Windows (using the command provided in the HandBrake wiki), I get the following error ...

Code: Select all

 : /usr/bin/i686-w64-mingw32-g++ -pipe -Wl,-S -shared -Wl,--enable-auto-import -static -Wl,--out-implib,./libhb/hb.lib -fmessage-length=0 -Wall -g0 -O3 -D__LIBHB__ -DUSE_PTHREAD -DSYS_MINGW -DPTW32_STATIC_LIB -I./libhb/ -I./contrib/include -o libhb/hb.dll -Wl,--start-group libhb/denoise.o libhb/decsrtsub.o libhb/deinterlace.o libhb/decvobsub.o libhb/bd.o libhb/batch.o libhb/downmix.o libhb/decmpeg2.o libhb/eedi2.o libhb/dvd.o libhb/encvorbis.o libhb/deblock.o libhb/stream.o libhb/deccc608sub.o libhb/hb.o libhb/dectx3gsub.o libhb/declpcm.o libhb/common.o libhb/ports.o libhb/decssasub.o libhb/mcdeint.o libhb/decavcodec.o libhb/encavcodecaudio.o libhb/enclame.o libhb/muxmkv.o libhb/sync.o libhb/rotate.o libhb/deca52.o libhb/fifo.o libhb/scan.o libhb/decomb.o libhb/lang.o libhb/encx264.o libhb/decmetadata.o libhb/update.o libhb/decutf8sub.o libhb/dvdnav.o libhb/muxcommon.o libhb/encfaac.o libhb/demuxmpeg.o libhb/enctheora.o libhb/encavcodec.o libhb/work.o libhb/detelecine.o libhb/muxmp4.o libhb/encvobsub.o libhb/render.o libhb/decdca.o libhb/reader.o ./contrib/lib/liba52.a ./contrib/lib/libass.a ./contrib/lib/libavcodec.a ./contrib/lib/libavformat.a ./contrib/lib/libavutil.a ./contrib/lib/libdca.a ./contrib/lib/libdvdnav.a ./contrib/lib/libdvdread.a ./contrib/lib/libfaac.a ./contrib/lib/libfontconfig.a ./contrib/lib/libfreetype.a ./contrib/lib/libmkv.a ./contrib/lib/libmpeg2.a ./contrib/lib/libmp3lame.a ./contrib/lib/libmp4v2.a ./contrib/lib/libogg.a ./contrib/lib/libsamplerate.a ./contrib/lib/libswscale.a ./contrib/lib/libtheora.a ./contrib/lib/libvorbis.a ./contrib/lib/libvorbisenc.a ./contrib/lib/libx264.a ./contrib/lib/libxml2.a ./contrib/lib/libbluray.a ./contrib/lib/libiconv.a ./contrib/lib/libfribidi.a ./contrib/lib/libpthreadGC2.a ./contrib/lib/libbz2.a ./contrib/lib/libz.a -liberty -lws2_32 -Wl,--end-group
  : /usr/lib64/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32/bin/ld: cannot find -liberty
  : collect2: ld returned 1 exit status
  : gmake: *** [libhb/hb.dll] Error 1

So it seems that the library libiberty is mising somehow for MinGW. Any thoughts how to correct this?

Thanks!
Last edited by Anonymous on Tue Jan 24, 2012 12:25 am, edited 1 time in total.
Reason: Logs should be enclosed in [code] blocks
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Build Failure (Linux, Cross-Compile)

Post by TedJ »

Moving to *nix. The Development forum is for developer discussion and patch submission only.

If you're having trouble compiling, you may have more luck visiting our IRC channel.
arrmo
Posts: 28
Joined: Tue Jan 10, 2012 1:59 am

Re: Build Failure (Linux, Cross-Compile)

Post by arrmo »

Hi,

I found the problem - it's because some (many?) Linux distributions are not including libiberty.a as part of the MinGW install. I downloaded and built binutils, then added the resulting libiberty.a to the MinGW library - and now it builds (and runs, cross-compiled for Windows!).

It's obviously the developers call, but it may be worth considering including this as part of the build.

Thanks!
Post Reply