Opened 13 years ago

Closed 12 years ago

#32803 closed defect (fixed)

HandBrake fails to build with clang or llvm-gcc-4.2

Reported by: jancrefsgaard@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang, llvm-gcc-4.2 Cc: ryandesign (Ryan Carsten Schmidt)
Port: HandBrake

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have tried to install HandBreak but it fails to build it, I have skimmed trough the log but it is fare beyond me to figure out why it fails, I have provided a copy of std out from the script as well as the log

SERVER:~ USER$ sudo port install HandBrake
Password:
--->  Computing dependencies for HandBrake
--->  Dependencies to be installed: yasm
--->  Fetching archive for yasm
--->  Attempting to fetch yasm-1.1.0_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/yasm
--->  Fetching yasm
--->  Attempting to fetch yasm-1.1.0.tar.gz from http://lil.fr.distfiles.macports.org/yasm
--->  Verifying checksum(s) for yasm
--->  Extracting yasm
--->  Configuring yasm
--->  Building yasm
--->  Staging yasm into destroot
--->  Installing yasm @1.1.0_0
--->  Activating yasm @1.1.0_0
--->  Cleaning yasm
--->  Fetching archive for HandBrake
--->  Attempting to fetch HandBrake-0.9.5_0+python26.darwin_11.x86_64.tbz2 from http://packages.macports.org/HandBrake
--->  Fetching HandBrake
--->  Attempting to fetch HandBrake-0.9.5.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch a52dec-0.7.4.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch faac-1.28.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch faad2-2.7.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch ffmpeg-r25689.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch fontconfig-2.8.0.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch freetype-2.3.9.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch lame-3.98.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libass-0.9.9.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libbluray-0.0.1-pre-16-g1aab213.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libdca-r81-strapped.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libdvdnav-svn1168.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libdvdread-svn1168.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libmkv-0.6.4.1-0-ga80e593.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libogg-1.1.3.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libsamplerate-0.1.4.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libtheora-1.1.0.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libvorbis-aotuv_b5.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch libxml2-2.7.7.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch mp4v2-trunk-r355.tar.bz2 from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch mpeg2dec-0.5.1.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Attempting to fetch x264-r1834-a51816a.tar.gz from http://lil.fr.distfiles.macports.org/HandBrake
--->  Verifying checksum(s) for HandBrake
--->  Extracting HandBrake
--->  Configuring HandBrake
--->  Building HandBrake
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for HandBrake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

----- from the end of the log ----- :

:info:build ** BUILD FAILED **
:info:build 
:info:build 
:info:build The following build commands failed:
:info:build 	CompileC ../build/macosx/HandBrake.build/Objects-normal/x86_64/HBQueueController.o HBQueueController.mm normal x86_64 objective-c++ com.apple.compilers.llvmgcc42
:info:build (1 failure)
:info:build make: *** [macosx.build] Error 65
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/work/HandBrake-0.9.5/build'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/work/HandBrake-0.9.5/build" && /usr/bin/make -j5 -w " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for HandBrake): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for HandBrake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/main.log

Attachments (2)

main.log (1.5 MB) - added by jancrefsgaard@… 13 years ago.
main.2.log (182.2 KB) - added by jancrefsgaard@… 13 years ago.
failed llvm-gcc-4.2 log

Download all attachments as: .zip

Change History (15)

Changed 13 years ago by jancrefsgaard@…

Attachment: main.log added

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: HandBrake added

Please remember to use WikiFormatting and to fill in the Port field.

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

The first error I see in the log is:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/work/HandBrake-0.9.5/macosx/HBQueueController.mm:310:27: error: cannot initialize a parameter of type 'id<NSToolbarDelegate>' with an lvalue of type 'HBQueueController *'
:info:build     [toolbar setDelegate: self];
:info:build                           ^~~~

I also see you're using clang. Try using a different compiler.

comment:3 Changed 13 years ago by jancrefsgaard@…

thanks for the quick reply, I am currently compiling pypy, I will try to compile HandBrak with gcc and/or apple-gcc when pypy is done.

I am sorry that my problem may been self solvable if I had read better up on the documentation :(

Thanks for your time, I will report my success/failure when when compilation is done :)

comment:4 Changed 13 years ago by raimue (Rainer Müller)

Summary: HandBreak fails to build on lionHandBrake fails to build on lion

comment:5 Changed 13 years ago by jancrefsgaard@…

clang fails, llvm-gcc-4.2 also fails, but apple-gcc-4.2 successfully compiles, I have opened the program and it runs, so I presume that everything is fine

HOST:~ USER$ sudo port install HandBrake configure.compiler=llvm-gcc-4.2
Password:
--->  Computing dependencies for HandBrake
--->  Building HandBrake
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for HandBrake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
HOST:~ USER$ sudo port clean HandBrake
--->  Cleaning HandBrake
HOST:~ USER$ sudo port install HandBrake configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2
--->  Computing dependencies for HandBrake
--->  Fetching archive for HandBrake
--->  Attempting to fetch HandBrake-0.9.5_0+python26.darwin_11.x86_64.tbz2 from http://packages.macports.org/HandBrake
--->  Fetching HandBrake
--->  Verifying checksum(s) for HandBrake
--->  Extracting HandBrake
--->  Configuring HandBrake
--->  Building HandBrake
--->  Staging HandBrake into destroot
--->  Installing HandBrake @0.9.5_0+python26
--->  Activating HandBrake @0.9.5_0+python26
--->  Cleaning HandBrake

comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: clang added
Summary: HandBrake fails to build on lionHandBrake fails to build with clang

Please remember to use WikiFormatting.

Could you try once again with llvm-gcc-4.2, cleaning before doing so? We would greatly prefer to use llvm-gcc-4.2 over apple-gcc-4.2, and your log above shows that your attempt to use llvm-gcc-4.2 was not a clean attempt.

comment:7 Changed 13 years ago by jancrefsgaard@…

I have tried to uninstall HandBrake, cleaned and reinstalled using llvm-gcc-4.2, and it fails again... I don't know if I am doing anything wrong...

I am greatly appreciative of all the help you guys are providing, and I am willing to try to install with other compiler options/flags if it will aid you guys in anyway :)

HOST:~ USER$ sudo port uninstall HandBrake 
Password:
--->  Deactivating HandBrake @0.9.5_0+python26
--->  Cleaning HandBrake
--->  Uninstalling HandBrake @0.9.5_0+python26
--->  Cleaning HandBrake
HOST:~ USER$ sudo port clean HandBrake 
--->  Cleaning HandBrake
HOST:~ USER$ sudo port install HandBrake configure.compiler=llvm-gcc-4.2
--->  Computing dependencies for HandBrake
--->  Fetching archive for HandBrake
--->  Attempting to fetch HandBrake-0.9.5_0+python26.darwin_11.x86_64.tbz2 from http://packages.macports.org/HandBrake
--->  Fetching HandBrake
--->  Verifying checksum(s) for HandBrake
--->  Extracting HandBrake
--->  Configuring HandBrake
--->  Building HandBrake
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for HandBrake is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Changed 13 years ago by jancrefsgaard@…

Attachment: main.2.log added

failed llvm-gcc-4.2 log

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: llvm-gcc-4.2 added
Resolution: fixed
Status: newclosed
Summary: HandBrake fails to build with clangHandBrake fails to build with clang or llvm-gcc-4.2

Thanks. Looks like it'll have to be apple-gcc-4.2 after all then. r88713.

comment:9 Changed 12 years ago by h_atac@…

Resolution: fixed
Status: closedreopened

Well, I don't know what is the problem on your machine, but I compiled 0.9.6 SVN release and didn't see any problem at all with llvm-gcc-4.2 on MacOS X Lion with Xcode 4.3.3 (AppStore not developer version) and command line tools installed.

Additionally I installed pkgconfig, libsdl+no_x11, libtool, autoconf, automake, subversion with port.. Because of some lines that I didn't like to see when compiling and configuring handbrake.

So, I think we should update this release to 0.9.6 instead of configuring 0.9.5 to work with apple-gcc-4.2.

comment:10 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

comment:11 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: closedreopened

Please don't "fix" a bug by forcing an older compiler which ignores the bug.

comment:12 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Owner: changed from macports-tickets@… to jeremyhu@…
Status: reopenednew

The real fix is trivial, so I'll roll it into some other changes for this port...

comment:13 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

r98037 r98038 (the fix is in the second revision because I forgot to svn add it to the first)

Note: See TracTickets for help on using tickets.