Little help compiling in Linux

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
J. Scott Elblein
Posts: 7
Joined: Sun Oct 11, 2015 10:59 pm

Little help compiling in Linux

Post by J. Scott Elblein »

Admittedly, I'm not a Linux guru, and following this guide, I'm trying to compile the libhb.dll and cli in Linux Mint 17. I'm mainly trying to re-add FDK-AAC, but also read another guy's comment somewhere else, that it's also possible to compile so 10 and 12 Bit HEVC are added. I want to be able to also do 10 Bit HEVC (not sure how to do that part yet, either).
<snip> compiling Handbrake from scratch with FDK enabled. Also, if you compile the nightline you get the ability to use HEVC 8, 10, and 12 bit. Also, AVC 10bit.
Image

I figured I'd use the latest Nighty's GUI along with the 2 files I compiled myself, so that I don't have to manually compile the GUI, but even if I have to, that part is a non-issue for me.

I'm getting some errors though, that I'm not sure how to resolve ...

If there was any exception or error displayed, please copy it and paste it here:

I'm running this configure command:

Code: Select all

./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-hwd --enable-fdk --launch-jobs=1 --launch
In the terminal, I get this error:

Code: Select all

: configure: error: in `/home/osboxes/HandBrake/build/contrib/fdkaac/fdk-aac-0.1.4':
: configure: error: C++ preprocessor "/lib/cpp" fails sanity check
In the Verbose log, I get this: http://pastebin.com/iT7jMaZy

I've looked in the HandBrake/Downloads folder and do see the fdk-aac.gz file there, so it looks like it at least downloaded fine.

Anyone have any advice to get me over this hump?

TIA
J. Scott Elblein
Posts: 7
Joined: Sun Oct 11, 2015 10:59 pm

Re: Little help compiling in Linux

Post by J. Scott Elblein »

Anyone?

Bueller?

Bueller ... ?

Bueller ....... ?

J/K ... nevermind. Got it figured out.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Little help compiling in Linux

Post by mduell »

Great! Thanks for sharing the solution with the community!
chumanga
Posts: 12
Joined: Tue Jul 22, 2014 1:13 am

Re: Little help compiling in Linux

Post by chumanga »

J. Scott Elblein wrote:Anyone?

Bueller?

Bueller ... ?

Bueller ....... ?

J/K ... nevermind. Got it figured out.
How do you solve the problem? I'm having same error while trying to compile in Ubuntu 14.04 for Windows.
chumanga
Posts: 12
Joined: Tue Jul 22, 2014 1:13 am

Re: Little help compiling in Linux

Post by chumanga »

Code: Select all

/bin/grep: /home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib/libstdc++.la: No such file or directory
 : /bin/sed: can't read /home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib/libstdc++.la: No such file or directory
  : libtool:   error: '/home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib/libstdc++.la' is not a valid libtool archive
  : make[3]: ** [libass.la] Erro 1
  : make[3]: Saindo do diretório `/home/ubuntu/HandBrake/build/contrib/libass/libass-0.13.2/libass'
  : make[2]: ** [all-recursive] Erro 1
  : make[2]: Saindo do diretório `/home/ubuntu/HandBrake/build/contrib/libass/libass-0.13.2'
  : make[1]: ** [all] Erro 2
  : make[1]: Saindo do diretório `/home/ubuntu/HandBrake/build/contrib/libass/libass-0.13.2'
  : make: ** [contrib/libass/.stamp.build] Erro 2
-------------------------------------------------------------------------------
time end: Tue May 31 03:13:57 2016
duration: 11 minutes, 18 seconds (678.13s)
result: FAILURE (code 2)
Someone can give some advise?
chumanga
Posts: 12
Joined: Tue Jul 22, 2014 1:13 am

Re: Little help compiling in Linux

Post by chumanga »

Ok i found the problem. The directory inside libstdc++.la file has this place(/home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib/) which dont exist in my system and i need to change it to real directory which is /home/ubuntu/mingw/mingw/lib/libstdc++.la. Now it worked sucessfully.
hotbbq
Posts: 13
Joined: Tue Feb 11, 2014 3:26 am

Re: Little help compiling in Linux

Post by hotbbq »

chumanga wrote:Ok i found the problem. The directory inside libstdc++.la file has this place(/home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib/) which dont exist in my system and i need to change it to real directory which is /home/ubuntu/mingw/mingw/lib/libstdc++.la. Now it worked sucessfully.
I'm having the same issue. What file did you have to change to point to the correct directory?
stryfewalker
Posts: 18
Joined: Thu Feb 18, 2010 4:26 pm

Re: Little help compiling in Linux

Post by stryfewalker »

I just started a thread yesterday that mentioned this problem.

The libstdc++.la is an editable text file. At the bottom of that file is a reference to the directory that is causing the problem. You need to replace the directory that is specified to the correct directory. On my setup and chumanga's setup it was "/home/<USER>/mingw/mingw/lib/" where <USER> is most likely a unique name. For chumanga his was ubuntu, for me it was my first name.

Hopefully, this will help you out.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Little help compiling in Linux

Post by BradleyS »

You're probably using a prebuilt mingw toolchain, configured with a sysroot that doesn't match its location on your system. Hint: delete all the .la files, or fix the paths in them.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Little help compiling in Linux

Post by BradleyS »

I should add, if you'd like to build a proper mingw toolchain, try the bash script included with HandBrake's source at scripts/mingw-w64-build. This is what is used as the cross-compilation toolchain for the nightly builds.

Note that there is currently an issue with image previews on Windows that we hope to resolve soon; see https://github.com/HandBrake/HandBrake/issues/246. Video previews work fine.
ByteShare
Posts: 35
Joined: Fri Aug 07, 2015 1:21 am

Re: Little help compiling in Linux

Post by ByteShare »

I had this same issue (Error 2).
I had to edit:

Code: Select all

libstdc++.la
Located (for me):

Code: Select all

/home/test/mingw/x86_64-w64-mingw32/lib
Change from (Last option in file):

Code: Select all

'/home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib'
Change To:

Code: Select all

'/home/test/mingw/x86_64-w64-mingw32/lib'
Deleted User 11865

Re: Little help compiling in Linux

Post by Deleted User 11865 »

To make things simpler, you can just remove all .la files from your MinGW toolchain folder.
ByteShare
Posts: 35
Joined: Fri Aug 07, 2015 1:21 am

Re: Little help compiling in Linux

Post by ByteShare »

Rodeo wrote:To make things simpler, you can just remove all .la files from your MinGW toolchain folder.
Really? I'll have to try that. Didn't know that wouldn't screw things up.
Post Reply