[MacPorts] #17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Seems that ffmpeg @15261 fails to build on Leopard/PPC. {{{ takanori@pc192168024032$ uname -v Darwin Kernel Version 9.5.0: Wed Sep 3 11:31:44 PDT 2008; root:xnu-1228.7.58~1/RELEASE_PPC takanori@pc192168024032$ sudo port install gimp2 ... ---> Fetching ffmpeg ---> Verifying checksum(s) for ffmpeg ---> Extracting ffmpeg ---> Configuring ffmpeg ---> Building ffmpeg 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: libavcodec/ppc/snow_altivec.c:727: warning: pointer type mismatch in conditional expression gcc-4.0 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" -O2 -DHAVE_LRINTF -I/opt/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -pipe -force_cpusubtype_ALL -Wno- sign-compare -fomit-frame-pointer -maltivec -mabi=altivec -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite- strings -O3 -fno-math-errno -maltivec -mabi=altivec -maltivec -mabi=altivec -fPIC -DPIC -c -o libavcodec/ppc/vc1dsp_altivec.o libavcodec/ppc/vc1dsp_altivec.c gcc-4.0 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_ffmpeg/work/trunk" -O2 -DHAVE_LRINTF -I/opt/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -pipe -force_cpusubtype_ALL -Wno- sign-compare -fomit-frame-pointer -maltivec -mabi=altivec -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite- strings -O3 -fno-math-errno -fPIC -DPIC -c -o libavcodec/ppc/check_altivec.o libavcodec/ppc/check_altivec.c In file included from /usr/include/sys/ucred.h:76, from /usr/include/sys/sysctl.h:83, from libavcodec/ppc/check_altivec.c:26: /usr/include/bsm/audit.h:224: error: syntax error before 'u_char' /usr/include/bsm/audit.h:227: error: syntax error before '}' token /usr/include/bsm/audit.h:234: error: syntax error before 'u_char' /usr/include/bsm/audit.h:237: error: syntax error before '}' token In file included from /usr/include/sys/sysctl.h:83, from libavcodec/ppc/check_altivec.c:26: /usr/include/sys/ucred.h:90: error: syntax error before 'u_long' /usr/include/sys/ucred.h:113: error: syntax error before '}' token /usr/include/sys/ucred.h:130: error: syntax error before 'u_int' /usr/include/sys/ucred.h:134: error: syntax error before '}' token In file included from /usr/include/sys/sysctl.h:84, from libavcodec/ppc/check_altivec.c:26: /usr/include/sys/proc.h:114: error: syntax error before 'u_int' /usr/include/sys/proc.h:119: error: syntax error before 'p_swtime' /usr/include/sys/proc.h:120: error: syntax error before 'p_slptime' /usr/include/sys/proc.h:134: error: syntax error before 'p_priority' /usr/include/sys/proc.h:135: error: syntax error before 'p_usrpri' /usr/include/sys/proc.h:140: error: syntax error before 'p_xstat' /usr/include/sys/proc.h:141: error: syntax error before 'p_acflag' /usr/include/sys/proc.h:143: error: syntax error before '}' token In file included from libavcodec/ppc/check_altivec.c:26: /usr/include/sys/sysctl.h:440: error: field 'kp_proc' has incomplete type /usr/include/sys/sysctl.h:750: error: syntax error before 'u_int' gmake: *** [libavcodec/ppc/check_altivec.o] Error 1 }}} -- Ticket URL: <http://trac.macports.org/ticket/17527> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Comment(by devans@…): Problem persists on Mac OS X 10.4/PPC after applying this patch. {{{ gcc-4.0 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_ffmpeg/work/trunk" -O2 -DHAVE_LRINTF -I/opt/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_DARWIN_C_SOURCE -fasm -std=c99 -pipe -force_cpusubtype_ALL -Wno-sign-compare -fomit-frame-pointer -maltivec -mabi=altivec -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer- sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -fPIC -DPIC -c -o libavcodec/ppc/check_altivec.o libavcodec/ppc/check_altivec.c In file included from /usr/include/sys/ucred.h:64, from /usr/include/sys/sysctl.h:71, from libavcodec/ppc/check_altivec.c:27: /usr/include/bsm/audit.h:219: error: parse error before 'u_char' /usr/include/bsm/audit.h:222: error: parse error before '}' token /usr/include/bsm/audit.h:229: error: parse error before 'u_char' /usr/include/bsm/audit.h:232: error: parse error before '}' token In file included from /usr/include/sys/sysctl.h:71, from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/ucred.h:76: error: parse error before 'u_long' /usr/include/sys/ucred.h:88: error: parse error before '}' token /usr/include/sys/ucred.h:95: error: parse error before 'u_int' /usr/include/sys/ucred.h:99: error: parse error before '}' token In file included from /usr/include/sys/sysctl.h:72, from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/proc.h:108: error: parse error before 'u_int' /usr/include/sys/proc.h:113: error: parse error before 'p_swtime' /usr/include/sys/proc.h:114: error: parse error before 'p_slptime' /usr/include/sys/proc.h:128: error: parse error before 'p_priority' /usr/include/sys/proc.h:129: error: parse error before 'p_usrpri' /usr/include/sys/proc.h:134: error: parse error before 'p_xstat' /usr/include/sys/proc.h:135: error: parse error before 'p_acflag' /usr/include/sys/proc.h:137: error: parse error before '}' token In file included from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/sysctl.h:400: error: field 'kp_proc' has incomplete type /usr/include/sys/sysctl.h:690: error: parse error before 'u_int' gmake: *** [libavcodec/ppc/check_altivec.o] Error 1 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_ffmpeg/work/trunk" && gmake all " returned error 2 Command output: libavcodec/ppc/snow_altivec.c:727: warning: pointer type mismatch in conditional expression gcc-4.0 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_ffmpeg/work/trunk" -O2 -DHAVE_LRINTF -I/opt/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_DARWIN_C_SOURCE -fasm -std=c99 -pipe -force_cpusubtype_ALL -Wno-sign-compare -fomit-frame-pointer -maltivec -mabi=altivec -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer- sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -maltivec -mabi=altivec -maltivec -mabi=altivec -fPIC -DPIC -c -o libavcodec/ppc/vc1dsp_altivec.o libavcodec/ppc/vc1dsp_altivec.c gcc-4.0 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/opt/local/var/macports/build/_opt_macports_trunk_dports_multimedia_ffmpeg/work/trunk" -O2 -DHAVE_LRINTF -I/opt/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_DARWIN_C_SOURCE -fasm -std=c99 -pipe -force_cpusubtype_ALL -Wno-sign-compare -fomit-frame-pointer -maltivec -mabi=altivec -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer- sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -fPIC -DPIC -c -o libavcodec/ppc/check_altivec.o libavcodec/ppc/check_altivec.c In file included from /usr/include/sys/ucred.h:64, from /usr/include/sys/sysctl.h:71, from libavcodec/ppc/check_altivec.c:27: /usr/include/bsm/audit.h:219: error: parse error before 'u_char' /usr/include/bsm/audit.h:222: error: parse error before '}' token /usr/include/bsm/audit.h:229: error: parse error before 'u_char' /usr/include/bsm/audit.h:232: error: parse error before '}' token In file included from /usr/include/sys/sysctl.h:71, from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/ucred.h:76: error: parse error before 'u_long' /usr/include/sys/ucred.h:88: error: parse error before '}' token /usr/include/sys/ucred.h:95: error: parse error before 'u_int' /usr/include/sys/ucred.h:99: error: parse error before '}' token In file included from /usr/include/sys/sysctl.h:72, from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/proc.h:108: error: parse error before 'u_int' /usr/include/sys/proc.h:113: error: parse error before 'p_swtime' /usr/include/sys/proc.h:114: error: parse error before 'p_slptime' /usr/include/sys/proc.h:128: error: parse error before 'p_priority' /usr/include/sys/proc.h:129: error: parse error before 'p_usrpri' /usr/include/sys/proc.h:134: error: parse error before 'p_xstat' /usr/include/sys/proc.h:135: error: parse error before 'p_acflag' /usr/include/sys/proc.h:137: error: parse error before '}' token In file included from libavcodec/ppc/check_altivec.c:27: /usr/include/sys/sysctl.h:400: error: field 'kp_proc' has incomplete type /usr/include/sys/sysctl.h:690: error: parse error before 'u_int' gmake: *** [libavcodec/ppc/check_altivec.o] Error 1 }}} -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Changes (by devans@…): * cc: devans@… (added) -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Comment(by simon@…): I'm sorry but I also don't have a really solution. But disabling altivec at least fixes the problem but will cause a slowdown I assume. The following patch works for me on Tiger 10.4 PPC, please check if it also works on Leopard PCC. {{{ diff --git a/dports/multimedia/ffmpeg/Portfile b/dports/multimedia/ffmpeg/Portfile index f09ad68..22326b0 100644 --- a/dports/multimedia/ffmpeg/Portfile +++ b/dports/multimedia/ffmpeg/Portfile @@ -89,6 +89,10 @@ platform darwin i386 { } } +platform darwin powerpc { + configure.args-append --disable-altivec +} + variant mmx description {enable mmx support, experimental; does not build in gcc-4.2 or xcode 3.0 gcc-4.0} { # make no-mmx default and allow mmx enabling for the brave. configure.args-delete --disable-mmx }}} Thanks, Simon -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Comment(by takanori@…):
Problem persists on Mac OS X 10.4/PPC after applying this patch. I'm sorry but I also don't have a really solution.
Okay then, how about the following patch? (ffmpeg.2.diff) I think this new one should work on Tiger/PPC.
disabling altivec at least fixes the problem but will cause a slowdown I assume.
Yes. but It's the last resort, you know. ;-) -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on Mac OS X 10.5/PPC -----------------------------------+---------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Keywords: ffmpeg compat(5) | Port: ffmpeg -----------------------------------+---------------------------------------- Comment(by devans@…): OK, patch two does the trick for me. I assume this works for Leopard as well (without the compat stuff)? If so, I vote to commit it. Will do so if no one complains. For the record, the compat implementation on Tiger is quite different from Leopard. Instead of _DARWIN_C_SOURCE there is _APPLE_C_SOURCE and (from man page) {{{ Defining any of _POSIX_C_SOURCE, _APPLE_C_SOURE, or __LP64__ causes library and kernel calls to conform to Version 3 of the Single UNIX Specification (``SUSv3'') standards even if doing so would alter the behavior of functions used in 10.3. Defining _POSIX_C_SOURCE also removes functions, types, and other interfaces that are not part of Version 3 of the Single UNIX Specification (``SUSv3'') from the normal C namespace, while _APPLE_C_SOURE does not. }}} so _APPLE_C_SOURCE would have to replace _POSIX_C_SOURCE and the results of that might be more wide spread. This fix is a bit brute force but it addresses the problem where it is located without messing with the rest of the code too much. -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on PPC (10.4 & 10.5) ------------------------------------+--------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Resolution: fixed | Keywords: compat(5) Port: ffmpeg | ------------------------------------+--------------------------------------- Changes (by devans@…): * keywords: ffmpeg compat(5) => compat(5) * status: new => closed * resolution: => fixed Comment: Committed in r43268. -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17527: ffmpeg @15261_0 fails to build on PPC (10.4 & 10.5) ------------------------------------+--------------------------------------- Reporter: takanori@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.8.0 Resolution: fixed | Keywords: compat(5) Port: ffmpeg | ------------------------------------+--------------------------------------- Comment(by devans@…): And in r43269. -- Ticket URL: <http://trac.macports.org/ticket/17527#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts