Closed henry0312 closed 12 years ago
Hello Henry, thank you for the patches. My system is quite strange. Even if I have Lion + XCode4.2 I still have gcc-4.2. I added this small change a1dd82c614ffeb82ba6bad8b3b29f1aa34272d03; does this work for you?
About your freetype commit: on my system mplayer2 compiles well with systems freetype. Looking at mplayer2's configure script I see it's looking for freetype 2.0.9. On my system the situation is like
which freetype-config # => /usr/X11/bin/freetype-config
freetype-config --version # => 12.2.6
freetype-config --ftversion # => 2.4.4
<- 2.4.4 is higher than 2.0.9.
But I am using XQuartz.app instead of X11.app so maybe that's the difference? I could add another another conditional depends_on for freetype.
Good evening Stefano
This commit, a1dd82c614ffeb82ba6bad8b3b29f1aa34272d03, work fine.
About freetype, $ brew unlink freetype $ which freetype-config # => /opt/X11/bin/freetype-config $ freetype-config --version # => 13.2.7 $ freetype-config --ftversion # => 2.4.7
I use XQuartz.app http://xquartz.macosforge.org/ , too. When I use system's libfreetype, then mplayer2 crashes. --> log http://pastebin.com/3X5MANKL (See line.7)
My environment: $ /usr/X11/bin/freetype-config --version # => 12.2.6 $ /usr/X11/bin/freetype-config --ftversion # => 2.4.4
$ which freetype-config # => /usr/local/bin/freetype-config $ freetype-config --version # => 13.2.7 $ freetype-config --ftversion # => 2.4.7
When I use https://raw.github.com/adamv/homebrew-alt/master/duplicates/freetype.rb, mplayer2 doesn't crash. ... why? :(
hm....
/opt/X11 <-- XQuartz /usr/X11 <-- System's Is this right?
If compiling with system's library, mplayer2 may work well. Do you change to use system library in your build script?
Does it crashes without the gui too (i.e.: using mplayer2 filename
)? It looks like some strange interaction with mplayerosx ext.
mplayer2 filename
work.
However, standalone binary and mpBinaries bundle crash.
Changing libfreetype, they work well.
I can reproduce the freetype bug too now. I'm still investigating the source of the problem.
the freetype crash happens only if you have /opt/X11/bin in your path while compiling. can you confirm?
the freetype crash happens only if you have /opt/X11/bin in your path while compiling.
Yes, it does.
mplayer2 filename
doesn't crash even when /opt/X11/bin is in my PATH.
In the end I just merged it. I just made a little more checks about the gcc version. Thank you.
Great jobs!!
By the way, I think some optimizations aren't good. See below patches. http://privatepaste.com/12b887be6f http://privatepaste.com/bbb249dfb4
In particular, I think you should not gcc -march=core2
if use, gcc -march=native
is better, but apple-gcc42 doesn't seem to have the option.
References: http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Optimize-Options.html#Optimize-Options http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Optimize-Options.html#Optimize-Options
About set_cpu_cflags 'core2 -msse4', :penryn => 'core2 -msse4.1', :core2 => 'core2', :core => 'prescott'
I stole that from homebrew, like you guessed that's needed because -march=native is not supported by apple's gcc. Totally removing this leads to slower binaries.
On the -O optimization matter:
ENV['CFLAGS'] = ''
in the install
method of both libav and mplayer2 overrides the selected optimization using no optimization at all. This is still the recommended to build mplayer/libav afaik because they optimize by hand (asm and platform specific code optimizations) what gets called the most.
I see :)
Fix two issues because of Xcode 4.2.x (on Max OS X Lion) Please check.