Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#16101 closed defect (fixed)

ffmpeg upgrade patch fails

Reported by: dershow Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: ffmpeg patch upgrade fail Cc: acho@…, dbevans (David B. Evans), brianjlandau@…
Port: ffmpeg

Description

I have ffmpeg installed: ffmpeg @0.4.9-pre1_8+a52+avfilter+darwin_i386+faac+faad+gpl+lame+x264 (active)

I just did: sudo port upgrade outdated, to upgrade to 0.4.9-pre1_9 and I get an error when applying patches:

--->  Fetching ffmpeg
--->  Verifying checksum(s) for ffmpeg
--->  Extracting ffmpeg
--->  Applying patches to ffmpeg
Error: Target org.macports.patch returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" && patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/multimedia/ffmpeg/files/patch-libswscale-Makefile.diff'" returned error 1
Command output: patching file libswscale/Makefile
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file libswscale/Makefile.rej

Error: Unable to upgrade port: 1

Any suggestions?

Thanks,

--Adam

Attachments (4)

Portfile.ffmpeg0.4.9-pre1_10.diff (784 bytes) - added by acho@… 16 years ago.
Portfile change to get avfilter working
patch-libswscale-Makefile.diff (240 bytes) - added by acho@… 16 years ago.
updated patch file
patch-ffmpeg-Portfile-proposed.diff (1.1 KB) - added by dbevans (David B. Evans) 16 years ago.
New proposed patch for Portfile
patch-configure.diff (709 bytes) - added by dbevans (David B. Evans) 16 years ago.
patch file for configure to go with Makefile patch file above in files

Download all attachments as: .zip

Change History (14)

Changed 16 years ago by acho@…

Portfile change to get avfilter working

Changed 16 years ago by acho@…

updated patch file

comment:1 Changed 16 years ago by acho@…

I've looked at this, and a very easy way to "get it working now" is to remove the patches from the avfilter variant. The build system has changed significantly from when the patches were made and I haven't yet figured out what the ports patches fix (library version mismatching, maybe?).

I've posted some changes I used to get it to build with avfilter. Apply the Portfile diff and drop the patch-libswscale-Makefile.diff in the usual place for patches.

If I find that it won't break anything to remove these patches permanently, I'll commit this.

comment:2 in reply to:  1 ; Changed 16 years ago by dklug1234@…

I'm afraid this patch hasn't worked for me. I got this when trying to compile ffmpeg with avfilter:

$ sudo port install ffmpeg +gpl +lame +theora +faac +faad +x264 +a52 +postproc +avfilter
Password:
--->  Building ffmpeg with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_
var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" && gmake all " returned error 2
Command output: libswscale/yuv2rgb_altivec.c:605:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:606:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c: In function 'altivec_yuv2_argb':
libswscale/yuv2rgb_altivec.c:606: error: 'vec_perm' undeclared (first use in this function)
libswscale/yuv2rgb_altivec.c:606:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:606:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:606:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:607:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c: In function 'altivec_yuv2_rgb24':
libswscale/yuv2rgb_altivec.c:607: error: 'vec_perm' undeclared (first use in this function)
libswscale/yuv2rgb_altivec.c:607:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:607:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:607:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:608:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c: In function 'altivec_yuv2_bgr24':
libswscale/yuv2rgb_altivec.c:608: error: 'vec_perm' undeclared (first use in this function)
libswscale/yuv2rgb_altivec.c:608:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:608:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:608:1: error: macro "vec_perm" passed 18 arguments, but takes just 3
libswscale/yuv2rgb_altivec.c:842:30: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c: In function 'altivec_yuv2packedX':
libswscale/yuv2rgb_altivec.c:842: error: 'vec_max' undeclared (first use in this function)
libswscale/yuv2rgb_altivec.c:843:30: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:844:29: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:845:29: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:920:30: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:921:30: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:922:29: error: macro "vec_max" passed 9 arguments, but takes just 2
libswscale/yuv2rgb_altivec.c:923:29: error: macro "vec_max" passed 9 arguments, but takes just 2
gmake: *** [libswscale/yuv2rgb_altivec.o] Fehler 1

Error: Status 1 encountered during processing.

'sudo port install ffmpeg +gpl +lame +theora +faac +faad +x264 +a52 +postproc' (without avfilter) worked (finally).

comment:3 in reply to:  2 ; Changed 16 years ago by dklug1234@…

I have to add, I'm on PPC under Mac OSX 10.4.11.

comment:4 in reply to:  3 Changed 16 years ago by dbevans (David B. Evans)

Replying to dklug1234@yahoo.de:

I have to add, I'm on PPC under Mac OSX 10.4.11.

Attached are patches that build on the recommendations above to allow ffmpeg to build on my PPC under 10.4.11. The Portfile patch is relative to the latest in SVN as of this morning and includes one patch file in addition to the one suggested by the maintainer above. The changes do the following:

1) Increment the svn revision for the libswscale code to r27349 to pick up a fix for the altivec compile problem on Tiger PPC using gcc 4.0.1 noted immediately above

2) Patch configure to remove the -current_version and -compatibility_version options from the SHFLAGS definition which is used for the shared library build command. This disables library versioning and compatibility checking but allows the build to proceed without error. Darwin does not allow either of these to be zero but the current version numbers for libswscale and avfilter cause one or both of these to be zero. Basically, as the system currently works, version numbers less than 1.0.0 will not work. libswscale is 0.5.1 and avfilter is 0.0.0. Probably something to report upstream for resolution.

Changed 16 years ago by dbevans (David B. Evans)

New proposed patch for Portfile

Changed 16 years ago by dbevans (David B. Evans)

Attachment: patch-configure.diff added

patch file for configure to go with Makefile patch file above in files

comment:5 Changed 16 years ago by dbevans (David B. Evans)

Cc: db.evans@… added

Cc Me!

comment:6 Changed 16 years ago by brianjlandau@…

I can verify that on a MacBookPro running 10.5.4 using "patch-ffmpeg-Portfile-proposed.diff", "patch-libswscale-Makefile.diff", and "patch-configure.diff" ffmpeg patches builds and installs and activates correctly.

comment:7 Changed 16 years ago by brianjlandau@…

Cc: brianjlandau@… added

Cc Me!

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

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:9 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Port: ffmpeg added
Resolution: fixed
Status: assignedclosed

Fixed in r39897. Thanks everyone!

comment:10 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.