Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

New formula: handbrake #7268

Closed
wants to merge 1 commit into from
Closed

New formula: handbrake #7268

wants to merge 1 commit into from

Conversation

stack
Copy link

@stack stack commented Aug 29, 2011

HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
transcoder, available for MacOS X, Linux and Windows.

HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
transcoder, available for MacOS X, Linux and Windows.
@Sharpie
Copy link
Contributor

Sharpie commented Aug 30, 2011

I get build errors on both Leopard and Snow Leopard:

@trevor
Copy link
Contributor

trevor commented Aug 31, 2011

(sidenote - worked for me on lion)

shot in the dark, but from looking at the logs, is this an architecture issue? i notice the hardware is 64bit, but the kernel is i386. i don't have anything handy to replicate the errors.


CompileC ../build/macosx/HandBrakeCLI.build/Objects-normal/x86_64/fakexcode.o ../test/fakexcode.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2
    cd /tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx
    setenv LANG en_US.US-ASCII
    /usr/bin/cc -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -fvisibility=hidden -fvisibility-inlines-hidden -I/tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../build/macosx/HandBrakeCLI.build/HandBrakeCLI.hmap -F../build -F../macosx -I../build/include -I../build/libhb -I/tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../build/macosx/HandBrakeCLI.build/DerivedSources/x86_64 -I/tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../build/macosx/HandBrakeCLI.build/DerivedSources -c /tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../test/fakexcode.cpp -o /tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../build/macosx/HandBrakeCLI.build/Objects-normal/x86_64/fakexcode.o

Ld ../build/HandBrakeCLI normal x86_64
    cd /tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx
    /usr/bin/cc -arch x86_64 -L../build -L../build/libhb -L../build/contrib/lib -F../build -F../macosx -filelist /tmp/homebrew-handbrake-0.9.5-56ef/HandBrake-0.9.5/macosx/../build/macosx/HandBrakeCLI.build/Objects-normal/x86_64/HandBrakeCLI.LinkFileList ../build/contrib/lib/libbluray.a ../build/contrib/lib/liba52.a ../build/contrib/lib/libass.a ../build/contrib/lib/libavcodec.a ../build/contrib/lib/libavformat.a ../build/contrib/lib/libavutil.a ../build/contrib/lib/libavcore.a ../build/contrib/lib/libdca.a ../build/contrib/lib/libdvdnav.a ../build/contrib/lib/libdvdread.a ../build/contrib/lib/libfaac.a ../build/contrib/lib/libfaad.a ../build/contrib/lib/libfontconfig.a ../build/contrib/lib/libfreetype.a ../build/contrib/lib/libmkv.a ../build/contrib/lib/libmp3lame.a ../build/contrib/lib/libmp4v2.a ../build/contrib/lib/libogg.a ../build/contrib/lib/libmpeg2.a ../build/contrib/lib/libsamplerate.a ../build/contrib/lib/libswscale.a ../build/contrib/lib/libtheora.a ../build/contrib/lib/libvorbis.a ../build/contrib/lib/libvorbisenc.a ../build/contrib/lib/libx264.a ../build/contrib/lib/libxml2.a -framework CoreServices -framework AudioToolbox -framework IOKit -lhb -liconv -lbz2 -lz -o ../build/HandBrakeCLI

Undefined symbols:
  "std::__throw_length_error(char const*)", referenced from:
      std::vector<unsigned int, std::allocator<unsigned int> >::_M_insert_aux(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > >, unsigned int const&)in libmp4v2.a(generic.o)

[...]

** BUILD FAILED **


The following build commands failed:
HandBrakeCLI:
    Ld ../build/HandBrakeCLI normal x86_64
HandBrake:
    Ld ../build/HandBrake.app/Contents/MacOS/HandBrake normal x86_64
(2 failures)

make: *** [macosx.build] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/handbrake.rb#L21
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 1b358b72eedfcd03f64ba9c0459f28b0bb2508bf
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: single-core 64-bit penryn
OS X: 10.6.8
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
 Xcode: 3.2.6

@Sharpie
Copy link
Contributor

Sharpie commented Aug 31, 2011

It aslo failed on a machine with 64 bit hardware and 64 bit kernel.

@jacknagel
Copy link
Contributor

Relevant: #2387, the gist of which is: the build process includes downloading a bunch of stuff that is already in Homebrew.

@trevor
Copy link
Contributor

trevor commented Aug 31, 2011

i also don't like it downloading the contrib/* sources, but i think they're choosing the best option. none of it is left outside of the compiled application, so there's no clutter in homebrew. i think it can be viewed as the HandBrake-0.9.5.tar.bz2 file simply hasn't included a section of the sources it needs in order to be a lighter download depending on the audience.

handbrake requires many specific source packages with custom patches. it would get crufty for homebrew to attempt to maintain parallel versions of these packages, it would also increase the likelihood of bugs with handbrake which they wouldn't then be able to support. meddling in this aspect of it's build process too much seems best left alone.

have a look at some of the customizations:
https://github.com/trevor/handbrake/tree/master/trunk/contrib

this is another means of libraries potentially deviating from homebrew:
https://github.com/trevor/handbrake/blob/master/trunk/make/variant/darwin.x86_64.defs

a few contrib's are skipped (zlib, libiconv, etc):
https://github.com/trevor/handbrake/blob/master/trunk/make/include/main.defs

the ones i found it downloaded:

a52dec-0.7.4.tar.gz
faac-1.28.tar.gz
faad2-2.7.tar.gz
ffmpeg-r25689.tar.bz2
fontconfig-2.8.0.tar.gz
freetype-2.3.9.tar.gz
lame-3.98.tar.gz
libass-0.9.9.tar.bz2
libbluray-0.0.1-pre-16-g1aab213.tar.gz
libdca-r81-strapped.tar.gz
libdvdnav-svn1168.tar.gz
libdvdread-svn1168.tar.gz
libmkv-0.6.4.1-0-ga80e593.tar.bz2
libogg-1.1.3.tar.gz
libsamplerate-0.1.4.tar.gz
libtheora-1.1.0.tar.bz2
libvorbis-aotuv_b5.tar.gz
libxml2-2.7.7.tar.gz
mp4v2-trunk-r355.tar.bz2
mpeg2dec-0.5.1.tar.gz
x264-r1834-a51816a.tar.gz

i vote for keep if we can resolve the build errors.

@stack
Copy link
Author

stack commented Aug 31, 2011

I can't be of much help on the build errors on other platforms. I only have 64-bit Lion boxes around...

I'm not the dev either... I thought I'd just throw it in after I got it to compile the first time on my box.

The dependencies thing would be a world of hurt trying to fix it. They seem fairly specific for the app and we all know how fun ffmpeg can be.

@trevor
Copy link
Contributor

trevor commented Aug 31, 2011

one thing i did forget to mention - i do like the fact that any issues we find with the included dependencies are essentially "on them". they do seem to write very good code.

if we can find what the source of the build errors are, and if it isn't something related to the homebrew process / formula, i imagine we'll find help upstream.

@stack
Copy link
Author

stack commented Aug 31, 2011

@trevor, I used the MacOS.prefer_64_bit? method for setting the arch flag in the compile script. Would this have an issue with the 32-bit kernel, 64-bit user space?

HandBrake releases 2 packages, not a universal binary.

@2bits
Copy link
Contributor

2bits commented Jan 28, 2012

Handbrake offers premade binaries with a Check for Updates menuitem.
What are the advantages to crafting it using Homebrew?

@Kamek
Copy link

Kamek commented Jan 29, 2012

Seems to work fine for me:
uname -a
Darwin SpellBook.local 11.1.0 Darwin Kernel Version 11.1.0: Thu Sep 1 04:41:32 EDT 2011; nawcom:xnu-1699.22.81/BUILD/obj//RELEASE_X86_64 x86_64

a little unorthodox but it's nice to be able to keep everything updated with brew.

@2bits
Copy link
Contributor

2bits commented Jan 29, 2012

Agreed, just wanted to take advantage of any benefits here, as I use this for most of my transcodes.

@Sakurina
Copy link

Sakurina commented Feb 4, 2012

Not necessarily; MacVim is up on Homebrew and it's an OS X app; besides, there's no reason HandBrake-CLI couldn't be in Homebrew.

@unixben
Copy link
Contributor

unixben commented Mar 16, 2012

+1 for HandBrakeCLI

@adamv
Copy link
Contributor

adamv commented Mar 16, 2012

Are there any updates needed on this formula? There's one pull request and then a whole of discussion.

@adamv
Copy link
Contributor

adamv commented Mar 31, 2012

Given that the build process hits the internet for a bunch of packages, and there are build errors on various systems, going to pass on this (again) for Homebrew-core; but would accept in Homebrew-alt. Or a separate repo could be created by interested parties and used via brew-tap.

@adamv adamv closed this Mar 31, 2012
@ssbarnea
Copy link

More than two years later, can someone explain me if it's possible to install handbrake using brew and if true how? Thanks.

@adamv
Copy link
Contributor

adamv commented Jun 23, 2014

@ssbarnea we've never accepted a formula for this, no. It is possible to installing using the Cask project (which we don't maintain): https://github.com/caskroom/homebrew-cask

@Homebrew Homebrew locked and limited conversation to collaborators Jun 23, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants