Bug 209064 - multimedia/handbrake: 0.10.5 doesn't build on FreeBSD 10.3-RELEASE amd64
Summary: multimedia/handbrake: 0.10.5 doesn't build on FreeBSD 10.3-RELEASE amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-04-26 07:51 UTC by Vladimir Omelchuk
Modified: 2016-05-05 09:44 UTC (History)
3 users (show)

See Also:


Attachments
Full log (37.20 KB, application/x-xz)
2016-04-26 07:51 UTC, Vladimir Omelchuk
no flags Details
Prevent linking against system libraries (702 bytes, patch)
2016-04-28 01:01 UTC, Sean Farley
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Omelchuk 2016-04-26 07:51:56 UTC
Created attachment 169707 [details]
Full log

Part of log:
...
/usr/bin/cc -pipe -Wl,-S -lc++ -L/usr/local/lib -fstack-protector -fmessage-length=0 -Wall -march=core2 -g0 -O3 -O2 -pipe -march=core2 -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -DUSE_X265 -I./libhb/ -I./contrib/include -I/usr/local/include -I./contrib/include -I./contrib/include -I/usr/local/include -o HandBrakeCLI test/parsecsv.o test/test.o ./libhb/libhandbrake.a -L./contrib/lib -L/usr/local/lib -lass -lavresample -lavformat -lavcodec -lavutil -lmp3lame -ldvdnav -ldvdread -lfontconfig -lfribidi -logg -lsamplerate -lswscale -lvpx -ltheoraenc -ltheoradec -lvorbis -lvorbisenc -lx264 -lbluray -lfreetype -lxml2 -lbz2 -lz -lx265 -lpthread -lm
./libhb/libhandbrake.a(muxavformat.o): In function `avformatInit':
../libhb/muxavformat.c:(.text+0xfd7): undefined reference to `av_stream_new_side_data'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
../test/module.rules:7: recipe for target 'HandBrakeCLI' failed
gmake[2]: *** [HandBrakeCLI] Error 1
gmake[2]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-0.10.5/build'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/handbrake
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/handbrake


<uname>
FreeBSD 10.3-RELEASE amd64

<make.conf>
CPUTYPE?=core2
OPTIONS_SET=CUPS
WITHOUT_LPR=YES
DEFAULT_VERSIONS=apache=2.4
QT4_OPTIONS=CUPS NAS QGTKSTYLE
LOCALIZED_LANG=ru
DEFAULT_VERSIONS+=perl5=5.20
MAKE_JOBS_UNSAFE=yes
DEFAULT_VERSIONS=mysql=5.7
Comment 1 Sean Farley freebsd_committer 2016-04-28 01:01:38 UTC
Created attachment 169771 [details]
Prevent linking against system libraries

The issue is that handbrake is trying to link against libraries of multimedia/ffmpeg (i.e., libavutil) which lacks this required symbol.

Try this patch to multimedia/handbrake/Makefile.  It forces LDFLAGS to look in a directory where handbrakes places external libraries it builds first before /usr/local/lib.

The patch also removes the conflict check against x265 which does not appear to cause problems with the LDFLAGS fix.
Comment 2 Vladimir Omelchuk 2016-04-28 01:30:39 UTC
After patching Makefile, port build is fine!
Thanks!
Comment 3 commit-hook freebsd_committer 2016-05-05 09:41:51 UTC
A commit references this bug:

Author: riggs
Date: Thu May  5 09:41:36 UTC 2016
New revision: 414637
URL: https://svnweb.freebsd.org/changeset/ports/414637

Log:
  Fix build in the presence of system-wide installed ffmpeg

  PR:		209064
  Reported by:	admin@vladiom.com.ua
  Submitted by:	scf

Changes:
  head/multimedia/handbrake/Makefile