#20808 closed defect (fixed)
mplayer-devel fails to build on 10.6
Reported by: | andrea@… | Owned by: | acho@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.99 |
Keywords: | snowleopard | Cc: | xellos@…, elias-macports@…, anfalas@…, jonasjonas (Frank Hellenkamp), steve+macports@…, george@…, gordon.child@…, veszig@…, fracai, xgutter@…, launchpad@…, broberts@…, aubonbeurre@…, ecronin (Eric Cronin) |
Port: | mplayer-devel |
Description
see attached file
Attachments (3)
Change History (38)
Changed 15 years ago by andrea@…
Attachment: | mplayer-devel.log added |
---|
comment:1 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts 1.8.0 |
---|---|
Owner: | changed from macports-tickets@… to acho@… |
comment:4 Changed 15 years ago by jonthn+macports@…
Try by adding this :
configure.args-append --cc="gcc-4.2 -arch i386"
comment:5 Changed 15 years ago by jonthn+macports@…
Ok forget about the previous comment that solved the problem in my 'own' mplayer-devel build but can't get it building with a fresh macports tree.
Sorry
comment:6 follow-up: 8 Changed 15 years ago by jonthn+macports@…
Ok seems strange but some CFLAGS are given to the configure script.
---> Configuring mplayer-devel DEBUG: Using compiler 'Mac OS X gcc 4.2' DEBUG: Executing org.macports.configure (mplayer-devel) DEBUG: Environment: CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' CPATH='/Volumes/medium/jonthn/pristinetree/include' LIBRARY_PATH='/Volumes/medium/jonthn/pristinetree/lib' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m64' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' CC='/usr/bin/gcc-4.2'
And those -arch x86_64 can be found in config.mak
grep x86_64 work/trunk/config.mak CFLAGS = -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/Volumes/medium/jonthn/pristinetree/include/lzo -I/Volumes/medium/jonthn/pristinetree/include -I/usr/X11/include OPTFLAGS = -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/Volumes/medium/jonthn/pristinetree/include/lzo -I/Volumes/medium/jonthn/pristinetree/include -I/usr/X11/include CXXFLAGS = -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -arch x86_64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D__STDC_LIMIT_MACROS -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/Volumes/medium/jonthn/pristinetree/include/lzo -I/Volumes/medium/jonthn/pristinetree/include -I/usr/X11/include
comment:7 Changed 15 years ago by acho@…
I'm not able to work on this until I get a copy of 10.6, which will be sometime this week. I expect binary codecs is not going to run well if at all but I'm not sure what's causing the push/pop asm business. I see it in a lot of ports now.
comment:8 Changed 15 years ago by jmroot (Joshua Root)
Replying to jonthn+macports@…:
Ok seems strange but some CFLAGS are given to the configure script.
That's configure.{cc,cxx,objc}_archflags, which have defaults based on build_arch.
comment:14 follow-up: 15 Changed 15 years ago by acho@…
Status: | new → assigned |
---|
The above patch should allow compilation on 10.6 in x86_64 and i386 mode. I'm pretty sure that the binary_codecs variant will fail to run in 64 bit mode and needs to be made 32 bit only. I need someone with 32 bit 10.6 to test as well as some 10.5 testers.
Changed 15 years ago by acho@…
Attachment: | mplayer-devel-10.6.diff added |
---|
Based on patch by johnrosshunt@…
comment:15 follow-up: 17 Changed 15 years ago by mf2k (Frank Schima)
Replying to acho@…:
The above patch should allow compilation on 10.6 in x86_64 and i386 mode. I'm pretty sure that the binary_codecs variant will fail to run in 64 bit mode and needs to be made 32 bit only. I need someone with 32 bit 10.6 to test as well as some 10.5 testers.
It builds fine on Leopard with default variants. I played an mp3 with it and it worked. HTH.
comment:16 follow-up: 18 Changed 15 years ago by mf2k (Frank Schima)
BTW, I think this port has too many variants. I think all the codecs should simply be built-in by default.
comment:17 Changed 15 years ago by gordon.child@…
Replying to macsforever2000@…:
Replying to acho@…:
The above patch should allow compilation on 10.6 in x86_64 and i386 mode. I'm pretty sure that the binary_codecs variant will fail to run in 64 bit mode and needs to be made 32 bit only. I need someone with 32 bit 10.6 to test as well as some 10.5 testers.
It builds fine on Leopard with default variants. I played an mp3 with it and it worked. HTH.
Patch worked for me too. Running 10.6 x86_64. mplayer says it's compiled as i386 but the activity monitor in macosx reports it as running 64bit. Runs video perfectly.
comment:18 Changed 15 years ago by ecronin (Eric Cronin)
Replying to macsforever2000@…:
BTW, I think this port has too many variants. I think all the codecs should simply be built-in by default.
(past-maintainer hat on) the codecs are for encoding only which isn't always clear, and aren't needed by people who only want to watch movies. Short of splitting out a separate mencoder port a +extra_encoders variant is as far as I'd suggest, especially where x264 and xvid update so frequently... Also, I've never really seen to point of libcaca and libaa, if other variants are looking to be removed
comment:19 Changed 15 years ago by mf2k (Frank Schima)
One variant for all of the extra encoders makes sense to me then. I suppose I should file a new ticket about this.
comment:20 follow-up: 21 Changed 15 years ago by mroman@…
I have succeed building mplayer-devel using above patch on 10.6 i386. The problems that emerged are:
- -O2 flag needs too be passed.
- also added omit frame pointer flag (perhaps isn't necessary)
- pax has problems with extracting binary codecs
comment:21 follow-up: 23 Changed 15 years ago by ecronin (Eric Cronin)
Replying to mroman@…:
I have succeed building mplayer-devel using above patch on 10.6 i386. The problems that emerged are:
- -O2 flag needs too be passed.
- also added omit frame pointer flag (perhaps isn't necessary)
- pax has problems with extracting binary codecs
-O2 is needed to compile or needed because you want -O2 optimizations?
binary codecs should probably just be removed or commented out at this point, it hasn't worked since ppc and 10.4 as far as I know...
This is working fine on my on x86_64, it would be great if we could commit something to close all the open "mplayer won't build on 10.6" tickets and prevent the 3-4 new ones per week.
comment:23 follow-up: 27 Changed 15 years ago by mroman@…
Replying to ecronin@…:
Replying to mroman@…: -O2 is needed to compile or needed because you want -O2 optimizations?
Without -O2 I get errors with function fft_asmb_3dnow:
/usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o liba52/bit_allocate.o liba52/bit_allocate.c /usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o liba52/bitstream.o liba52/bitstream.c /usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o liba52/downmix.o liba52/downmix.c /usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o liba52/imdct.o liba52/imdct.c /usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o liba52/parse.o liba52/parse.c In file included from liba52/imdct.c:725: liba52/imdct_3dnow.h: In function 'fft_asmb_3dnow': liba52/imdct_3dnow.h:257: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' liba52/imdct_3dnow.h:257: error: 'asm' operand has impossible constraints /usr/bin/gcc-4.2 -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -fomit-frame-pointer -fomit-frame-pointer -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -fomit-frame-pointer -I/usr/X11/include -c -o av_opts.o av_opts.c make: *** [liba52/imdct.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ./libavutil/avutil.h:61, from libavcodec/avcodec.h:30, from libavcodec/opt.h:31, from av_opts.c:24: ./libavutil/pixfmt.h:129:5: warning: "HAVE_BIGENDIAN" is not defined av_opts.c: In function 'parse_avopts': av_opts.c:39: warning: 'av_set_string' is deprecated (declared at libavcodec/opt.h:107)
google (not exactly with the same file)::
http://lists.mplayerhq.hu/pipermail/mplayer-users/2004-April/044133.html
http://lists.mplayerhq.hu/pipermail/mplayer-users/2004-April/044134.html
The following error emerges without using the omit frame pointer flag (and again google says to use it):
/usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o 4xm.o 4xm.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o fraps.o fraps.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o huffman.o huffman.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o gifdec.o gifdec.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o lzw.o lzw.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o gif.o gif.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o h261dec.o h261dec.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o h261.o h261.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o h261enc.o h261enc.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o h263_parser.o h263_parser.c /usr/bin/gcc-4.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -O2 -O2 -march=prescott -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic -falign-loops=16 -shared-libgcc -I. -I/opt/local/include/lzo -I/opt/local/include -O2 -I/usr/X11/include -c -o h264.o h264.c h264.c: In function 'pred_direct_motion': h264.c:1048: warning: assignment from incompatible pointer type h264.c:1049: warning: assignment from incompatible pointer type h264.c: In function 'filter_mb_dir': h264.c:6351: warning: initialization from incompatible pointer type h264.c:6352: warning: initialization from incompatible pointer type cabac.h: In function 'get_cabac_noinline': cabac.h:527: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' cabac.h:527: error: 'asm' operand has impossible constraints make[1]: *** [h264.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [libavcodec/libavcodec.a] Error 2
Changed 15 years ago by ecronin (Eric Cronin)
Attachment: | mplayer-devel.patch.2 added |
---|
updated patch adding -O2 to cflags
comment:27 follow-up: 28 Changed 15 years ago by ecronin (Eric Cronin)
Replying to mroman@…:
Replying to ecronin@…:
Replying to mroman@…: -O2 is needed to compile or needed because you want -O2 optimizations?
Without -O2 I get errors with function fft_asmb_3dnow:
Actually, could you run port fetch normally, and then upload the output for 'port -vd config'? It looks like the mplayer config specs should set -O2 at least... Are you building +debug by any chance?
comment:28 Changed 15 years ago by ecronin (Eric Cronin)
Replying to ecronin@…:
Replying to mroman@…:
Replying to ecronin@…:
Replying to mroman@…: -O2 is needed to compile or needed because you want -O2 optimizations?
Without -O2 I get errors with function fft_asmb_3dnow:Actually, could you run port fetch normally, and then upload the output for 'port -vd config'? It looks like the mplayer config specs should set -O2 at least... Are you building +debug by any chance?
work/trunk/config.mak would also be helpull to upload.
comment:31 Changed 15 years ago by ecronin (Eric Cronin)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I just committed acho's version of the patch that's attached to this ticket as @59988. If you are still having problems after updating your ports (port selfupdate) please open a new ticket with the output of 'port -d build' as an attachment.
comment:32 Changed 15 years ago by jmroot (Joshua Root)
Cc: | ecronin@… added |
---|
Is there a good reason why you're only respecting build_arch on 10.6?
comment:33 Changed 15 years ago by ecronin (Eric Cronin)
fair point. Does moving it to pre-configure for all platforms/versions seem better:
Index: Portfile =================================================================== --- Portfile (revision 59993) +++ Portfile (working copy) @@ -82,6 +82,14 @@ patchfiles configure.x11.patch +pre-configure { + if { ${configure.build_arch} == "x86_64" } { + configure.args-append --target=x86_64-Darwin + } elseif { ${configure.build_arch} == "i386" } { + configure.args-append --target=i386-Darwin + } +} + post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} eval file copy [glob ${worksrcpath}/DOCS/*] \ @@ -270,11 +278,6 @@ } platform darwin 10 { - if { ${configure.build_arch} == "x86_64" } { - configure.args-append --target=x86_64-Darwin - } elseif { ${configure.build_arch} == "i386" } { - configure.args-append --target=i386-Darwin - } configure.args-append --disable-qtx configure.args-delete --enable-qtx }
comment:34 Changed 15 years ago by ecronin (Eric Cronin)
actually, it looks like qtx is a 64-bit problem not a snow leopard problem, so moved all of the block to pre-configure and checked it in...
comment:35 Changed 15 years ago by santusmarc@…
I am seeing "MPlayer UNKNOWN-4.2.1 (C) 2000-2009 MPlayer Team"
When starting mplayer
http://img.skitch.com/20091101-b86uyei8sgc5abfy22h6w8dj87.png
debug output