Part of log: […] patching file src/libbluray/bluray.c patching file src/libbluray/bluray.h can't find file to patch at input line 40 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |-- |2.5.5 | |--- Makefile.in.orig 2017-03-25 19:30:14 UTC |+++ Makefile.in 2017-03-25 19:30:36 UTC -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored gmake[2]: *** [../contrib/libbluray/module.rules:2: contrib/libbluray/.stamp.patch] Error 1 gmake[2]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build' *** Error code 1 Stop. make[1]: stopped in /usr/ports/multimedia/handbrake *** Error code 1 Stop. make: stopped in /usr/ports/multimedia/handbrake ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20170405-69808-k1rjte env UPGRADE_TOOL=portupgrade UPGRADE_PORT=handbrake-0.10.5_5 UPGRADE_PORT_VER=0.10.5_5 make DISABLE_VULNERABILITIES=yes ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! multimedia/handbrake (handbrake-0.10.5_5) (unknown build error) <uname> FreeBSD 10.3-RELEASE-p17 amd64 <make.conf> CPUTYPE?=core2 OPTIONS_SET=CUPS WITHOUT_LPR=YES DEFAULT_VERSIONS+=apache=2.4 QT4_OPTIONS=CUPS NAS QGTKSTYLE LOCALIZED_LANG=ru MAKE_JOBS_UNSAFE=yes DEFAULT_VERSIONS+=mysql=5.7 .if ${.CURDIR:M*/ports/devel/ccache} NO_CCACHE=yes .endif DEFAULT_VERSIONS+=ssl=openssl CC=clang40 CXX=clang++40 CPP=clang-cpp40 .if ${.CURDIR:M*/emulators/linux-c6} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/graphics/linux-c6-glx-utils} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/x11-toolkits/linux-c6-qt47-x11} OPTIONS_SET=NVIDIA_GL .endif DEFAULT_VERSIONS+=samba=4.3
Please update this to "Affects some people". I see the same issue with the build of libbluray. I will also suggest using "MAKE_JOBS_UNSAFE=yes" or the error will be found many, many lines before the failure is noted after it reaches a job barrier.
(In reply to rkoberman from comment #1) Done.
Change in files/patch-contrib_libbluray_A02-expose-clip__id.patch to --- ../libbluray-0.9.3/Makefile.in.orig 2017-04-07 23:29:29 UTC +++ ../libbluray-0.9.3/Makefile.in ----- Anywhere is to set #define HAVE_SYS_TIME_H 1 and #ifndef __XSI_VISIBLE #define __XSI_VISIBLE 700 /* for gettimeofday() */ #endif but I found not where, yet.
Is this only a problem with portupgrade? What happens if the port is build in the conventional way?
Same error in the port. gettimeofday seems a special problem. I am nearly make src/utils/time.c empy and got still implicit declaration of function 'gettimeofday' is invalid in C99. (This try there was no gettimeofday in it!).
(In reply to Thomas Zander from comment #4) http://www.freshports.org/ Sat, 8 Apr 2017 [ 13:57 riggs ] Original commit Revision:438044 handbrake 1.0.3_1 multimedia Remove superfluous bits from testing from Makefile # pkg version -v | grep handbrake handbrake-0.10.5_5 < needs updating (index has 1.0.3_1) Same error in the port: [...] Install the project... -- Install configuration: "Release" -- Installing: /usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/lib/libx265.a -- Installing: /usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/include/x265.h -- Installing: /usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/include/x265_config.h -- Installing: /usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/lib/pkgconfig/x265.pc gmake[3]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/x265/x265_2.1' touch contrib/x265/.stamp.install /bin/mkdir -p contrib/libbluray/ sha256 (../download/libbluray-0.9.3.tar.bz2) = a6366614ec45484b51fe94fcd1975b3b8716f90f038a33b24d59978de3863ce0 (pass) /bin/rm -fr ./contrib/libbluray/libbluray-0.9.3/ /usr/local/bin/gtar xfC ../download/libbluray-0.9.3.tar.bz2 ./contrib/libbluray/ touch contrib/libbluray/.stamp.extract /usr/local/bin/gpatch -t -N -p1 -d ./contrib/libbluray/libbluray-0.9.3/ < ../contrib/libbluray/A02-expose-clip_id.patch patching file src/libbluray/bluray.c patching file src/libbluray/bluray.h can't find file to patch at input line 40 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |-- |2.5.5 | |--- Makefile.in.orig 2017-03-25 19:30:14 UTC |+++ Makefile.in 2017-03-25 19:30:36 UTC -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored gmake[2]: *** [../contrib/libbluray/module.rules:2: contrib/libbluray/.stamp.patch] Error 1 gmake[2]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build' *** Error code 1 Stop. make[1]: stopped in /usr/ports/multimedia/handbrake *** Error code 1 Stop. make: stopped in /usr/ports/multimedia/handbrake
Same problem after r438044. It is any path problem. But it compiles with poudriere without problems.
Seems the build directory does not exist in the moment as make patch runs. (I don't know how poudriere this handled).
Created attachment 181607 [details] info_handbrake.diff
I don't really believe this changes will accepted, but for info I posted this attachment. Got handbrake compile in the port with this changes.
(In reply to w.schwarzenfeld from comment #10) Patch is fine and handbrake-1.0.3_1 build without any erorrs! Thanks! # pkg version -v | grep handbrake handbrake-1.0.3_1 = up-to-date with index
Still no joy for me. I am getting the same error that contrib/libbluray/Makefile.in. /usr/local/bin/gpatch -t -N -p1 -d ./contrib/libbluray/libbluray-0.9.3/ < ../contrib/libbluray/A02-expose-clip_id.patch patching file src/libbluray/bluray.c patching file src/libbluray/bluray.h can't find file to patch at input line 40 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |-- |2.5.5 | |--- Makefile.in.orig 2017-03-25 19:30:14 UTC |+++ Makefile.in 2017-03-25 19:30:36 UTC -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored gmake[2]: *** [../contrib/libbluray/module.rules:2: contrib/libbluray/.stamp.patch] Error 1 I do find Makefile.in in the libbluray-0.9.3 directory, so it looks like it should have worked, but no luck. Tried with MAKE_JOBS_UNSAFE with no improvement. Why it finds the two other files but not the Makefile.in, I don't understand. # ls Makefile.in src/libbluray/bluray.c src/libbluray/bluray.h Makefile.in src/libbluray/bluray.c src/libbluray/bluray.h # pwd /usr/ports/multimedia/handbrake/work/libbluray-0.9.3
The version 1.3.0_1 ?
Created attachment 181612 [details] svn-diff-handbrake
Had problems with poudriere and CCACHE. Added NO_CCACHE=yes. So I had less changes in the Makefiles and it compiles in the port and with poudriere.
Thanks for more information. Finally I could reproduce this error, after I install gnu patch (pkg install patch). Will you try the following patch? ``` Index: files/patch-contrib_libbluray_A02-expose-clip__id.patch =================================================================== --- files/patch-contrib_libbluray_A02-expose-clip__id.patch (revision 438075) +++ files/patch-contrib_libbluray_A02-expose-clip__id.patch (working copy) @@ -4,8 +4,8 @@ -- 2.5.5 -+--- Makefile.in.orig 2017-03-25 19:30:14 UTC -++++ Makefile.in 2017-03-25 19:30:36 UTC ++--- a/Makefile.in 2017-03-25 19:30:14 UTC +++++ b/Makefile.in 2017-03-25 19:30:36 UTC +@@ -772,7 +772,7 @@ + MOSTLYCLEANFILES = $(DX_CLEANFILES) + @ENABLE_UDF_FALSE@POSIX_C_SOURCE = 200112L ``` `contrib/libbluray/A02-expose-clip_id.patch` is a patch file to libbluray which is written in git style diff. I need to write `patch-contrib_libbluray_A02-expose-clip__id.patch` in the same style that gnu patch understand. Bsd patch can understand different styles in the same patch.
Is that the complete patch? I tried using it to patch the patch file in handbrake/files and to replace it. Neither worked. It looks a bit truncated to me, but, when I replaced the patch file in files, it did not generate the file not found error I had been seeing. Is that all you were looking for?This is the error I got: src/util/time.c: In function '_bd_get_scr_impl': src/util/time.c:58:5: error: implicit declaration of function 'gettimeofday' [-Werror=implicit-function-declaration] gettimeofday(&tv, 0); ^ cc1: some warnings being treated as errors gmake[4]: *** [Makefile:1503: src/util/time.lo] Error 1 gmake[4]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/libbluray/libbluray-0.9.3' gmake[3]: *** [Makefile:919: all] Error 2 gmake[3]: Leaving directory '/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/libbluray/libbluray-0.9.3' gmake[2]: *** [../contrib/libbluray/module.rules:3: contrib/libbluray/.stamp.build] Error 2
(In reply to rkoberman from comment #17) > Is that the complete patch? No, it isn't. Please apply my patch in multimedia/handbrake. ``` $ cd /usr/ports/multimedia/handbrake $ patch < my_handbrake.patch ``` HandBrake build process is complicated. HandBrake has a patch file of libbluray except for source files. Makefile of this port provides the source archive before `make build`. That is `libbluray-0.9.3.tar.bz2`. To compile libbluray and avoid 'gettimeofday' error (you mentioned above), I needed to add `-D_XOPEN_SOURCE=700` in `Makefile.in` of libbluray. But how do I make a patch for it? HandBrake has no source files of libbluray. So I made a patch for the libbluray patch. But I made a mistake of the patch format that GNU patch doesn't understand.
Here is what I get when attempting to appy the patch: Patching file patch-contrib_libbluray_A02-expose-clip__id.patch using Plan A... Hunk #1 failed at 4. 1 out of 1 hunks failed--saving rejects to patch-contrib_libbluray_A02-expose-clip__id.patch.rej done So no joy at all. I understand the problem. Seems like there needs to be a standard format for patch files. Diffs can come in any format, but one needs to get the One True patch format. This one is really, really a pain to deal with. I am somewhat familiar with the way that this gets built from my sad attempts to build a port for this. I'll happily keep testing as much as I can and provide whatever help I can, but it's beyond my capabilities, I fear, to contribute much more.
Testbuilding on 11a, cur fails: http://people.freebsd.org/~pi/logs/multimedia__handbrake-11a-1491705925.txt http://people.freebsd.org/~pi/logs/multimedia__handbrake-cur-1491705925.txt
Created attachment 181615 [details] patch for handbrake/files/patch-contrib_libbluray_A02-expose-clip__id.patch
I'm sorry that I was absent minded about how to send my patch. I was thinking only fixing my code. I attached my patch as 'patch for handbrake/files/patch-contrib_libbluray_A02-expose-clip__id.patch'. Will you download this file?
(In reply to Kurt Jaeger from comment #20) How about handbrake-1.0.3_1 ?
(In reply to naito.yuichiro from comment #21) Are you sure you send the right file? -D_XOPEN_SOURCE=700 is missing in your patch. But it is already in the original patch. What needed is: NO_CCACHE=yes (if you use CCACHE) and the change of the path to Makefile.in. (--build=${WRKSRC}/build could be removed from my patch. It is not needed. I needed it before I added NO_CCACHE=yes - But you can keep it, with no problems).
Folks, I'm confused. Please provide me with a consolidated patch from the current version in the port to the new version you all yearn for 8-}
Created attachment 181619 [details] svn diff to Makefile and patch-contrib_libbluray_A02-expose-clip__id.patch svn diff patch to make handbrake build. It fixes the patch to A02-expose-clip__id.patch, adds "desktop-file-utils" to USES for X11. and adds "NO_CCACHE=yes" to the MAKE_ENV.
(In reply to rkoberman from comment #26) It really shouldn't be necessary to define NO_CCACHE=yes globally. It works for many, especially the poudriere builders.
testbuilds@work
(In reply to Thomas Zander from comment #27) This was based on Walter's statement (several times) that it would not build with ccache. Since I don't use ccache, I can't confirm or deny its affect.
A commit references this bug: Author: pi Date: Sun Apr 9 18:13:04 UTC 2017 New revision: 438110 URL: https://svnweb.freebsd.org/changeset/ports/438110 Log: multimedia/handbrake: fix build after update to 1.0.3 PR: 218384 Submitted by: Walter Schwarzenfeld <w.schwarzenfeld@utanet.at> Reported by: Vladimir Omelchuk <admin@vladiom.com.ua> Reviewed by: naito.yuichiro@gmail.com, rkoberman@gmail.com Changes: head/multimedia/handbrake/Makefile head/multimedia/handbrake/files/patch-contrib_libbluray_A02-expose-clip__id.patch
The version committed does not have the MAKE_ENV change for NO_CCACHE. If there's anything left to do, please speak up, otherwise I'll close this ticket in 24 hours.
Does not work with CCACHE. MAKE_ENV=NO_CCACHE=yes also not working (I did not find it in an other port).. NO_CCACHE=yes globally is working.
Error Message: /usr/local/bin/ld: /ram/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/contrib/lib/libavresample.a(audio_convert.o): undefined reference to symbol 'lrintf@@FBSD_1.0' //lib/libm.so.5: error adding symbols: DSO missing from command line clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[5]: *** [Makefile:544: ghb] Error 1 gmake[5]: Leaving directory '/ram/usr/ports/multimedia/handbrake/work/HandBrake-1.0.3/build/gtk/src' .......
(In reply to Kurt Jaeger from comment #31) # pkg version -v | grep handbrake handbrake-1.0.3_1 < needs updating (index has 1.0.3_2) I use ccache and I did not have problems with upgrading to 1.0.3_2. # pkg version -v | grep handbrake handbrake-1.0.3_2 = up-to-date with index # uname -srm FreeBSD 10.3-RELEASE-p17 amd64 Thanks to all!
(In reply to w.schwarzenfeld from comment #32) I have no way to test with CCACHE, who would be the expert to talk to 8-} ?
Created attachment 181621 [details] patch-Makefile_CCACHE_option
The simpelst way to solve the problem is a CCACHE option.
Created attachment 181649 [details] svn-diff-handbrake-1.0.7
In the meantime an update to 1.0.7 exists. ChangeLog: ### All platforms #### Video - Fixed decoding of raw video in Matroska/MKV - Fixed time stamp handling for containerless raw video - Fixed memory leaks in OpenCL - Fixed x265 2-pass encoding where video frame rate is altered by filters - Improved handling of very small amounts of sync jitter (~1 tick) - Improved handling of AVI files with broken indices #### Audio - Further refined fix for Libav crash encoding AAC at very high bitrates #### Subtitles - Removed fontconfig dependency on Mac and Windows; libass now uses CoreText/DirectWrite - Improved subtitle font selection when burning in SRT/SSA subtitles #### Command line interface - Fixed preset subtitle burn defaults override #### Build system - Updated MinGW-w64 build script for improved compatibility with hardened GCC ------------------
Created attachment 181650 [details] svn-diff-handbrake-1.0.7
Had to correct the patch cause of portlint. Test builds with poudriere 10.3amd64/i386 ok.
Created attachment 181672 [details] patch_handbrake-1.0.7_svn_r438214.diff Patch for update handbrake-1.0.3_2 (svn revision 438214) to 1.0.7 without CCACHE option in the Makefile. I use ccache and I did not have problems with upgrading to 1.0.7! # pkg version -v | grep -e handbrake -e ccache ccache-3.3.4_3 = up-to-date with index handbrake-1.0.7 > succeeds index (index has 1.0.3_2) # env | grep ^PATH PATH=/usr/local/libexec/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin # uname -srm FreeBSD 10.3-RELEASE-p17 amd64
(In reply to w.schwarzenfeld from comment #40) What is your major problem, disabling CCACHE or upgrading to 1.0.7 ? With 'svn-diff-handbrake-1.0.7 patch', I've got this message. ``` % ./HandBrakeCLI --version [12:36:58] hb_init: starting libhb thread [12:36:58] thread 806c2ba00 started ("libhb") HandBrake 1.0.3 `` I think both of them have no relation to this topic. Please open new problem reports and describe your problem.
(In reply to naito.yuichiro from comment #43) I agree, I will open a new PR for update handbrake to 1.0.7 P.S. After my patch (patch_handbrake-1.0.7_svn_r438214.diff): # HandBrakeCLI --version [08:27:09] hb_init: starting libhb thread [08:27:09] thread 807019000 started ("libhb") HandBrake 1.0.7
(In reply to naito.yuichiro from comment #43) Done. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218558
PR can be closed. Thanks to all!