Opened 11 years ago

Closed 9 years ago

#41746 closed defect (fixed)

mplayer-devel +osx does not detect freetype when /usr/X11 is present

Reported by: hugo-ribeiro (Hugo Ribeiro) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jchauvel@…, myint (Steven Myint), zhimingwangpublic@…
Port: mplayer-devel

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When installing mplayer-devel on OS X mavericks, the detection of freetype fails. This results in missing OSD.

...
Checking for bitmap font support ... yes
Checking for freetype >= 2.0.9 ... no
Checking for fontconfig ... no (FreeType support needed)
Checking for fribidi with charsets ... no
Checking for SSA/ASS support ... no (FreeType and FriBiDi support needed)
...

Freetype is correctly pulled in as a dependency and seems correctly installed. Here's the output of

# freetype-config --libs
-L/opt/local/lib -lfreetype -lz -lbz2 -lpng15

The set of variants I'm using for installing mplayer-devel might also be relevant

+a52+dirac+dts+esd+fribidi+live+mencoder_extras+mng+osd+sdl+speex

Finally, I didn't encounter this problem on OS X mountain lion (at least last time I installed mplayer-devel). This may be related to ticket #39307.

Attachments (1)

config.log (284.7 KB) - added by hugo-ribeiro (Hugo Ribeiro) 11 years ago.
config.log

Download all attachments as: .zip

Change History (15)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: osd mplayer removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: freetype removed

Not sure what's wrong; works fine here.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Could you attach the main.log and config.log?

Changed 11 years ago by hugo-ribeiro (Hugo Ribeiro)

Attachment: config.log added

config.log

comment:3 Changed 11 years ago by hugo-ribeiro (Hugo Ribeiro)

I couldn't find the main.log, but here's the config.log. Apparently, the problem is a missing header...

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_mplayer-devel/mplayer-devel/work/.tmp/mplayer-configure-27402-29600/tmp.c:2:
/usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>

comment:4 Changed 11 years ago by hugo-ribeiro (Hugo Ribeiro)

It looks like the relative path of "ftheader.h" in "ft2build.h" is wrong. I could find the missing header under "freetype2/freetype/config/ftheader.h"

comment:5 Changed 11 years ago by hugo-ribeiro (Hugo Ribeiro)

Here's a workaround that allows for detection of freetype, but this is probably not a long time solution.

I've created a symlink "ft2build.h -> /opt/local/include/freetype2/ft2build.h" in "/opt/X11/include". This did the trick.

comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Nothing in MacPorts should be looking for anything in /usr/X11; this is a bug that needs to be fixed. You should remove the symlink you created.

Actually, on Mountain Lion and later, /usr/X11 does not exist, as shipped from Apple. Is this from Xquartz perhaps?

comment:7 Changed 11 years ago by hugo-ribeiro (Hugo Ribeiro)

I removed the symlink immediately after the compilation and restored the original file. I just wanted to check if that way I was able to get a working OSD.

You're right, /usr/X11 is a symlinc to /opt/X11, where the Xquartz files are installed. I'm running Xquartz 2.7.5, if that matters.

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

Summary: mplayer-devel does not detect freetype [+osd selected]mplayer-devel +osx does not detect freetype when /usr/X11 is present

Confirmed issue on Lion (which does have /usr/X11 provided by OS X).

comment:9 Changed 11 years ago by jchauvel@…

Cc: jchauvel@… added

Cc Me!

comment:10 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #41993.

comment:11 Changed 11 years ago by myint (Steven Myint)

Cc: general@… added

Cc Me!

comment:12 Changed 10 years ago by zhimingwangpublic@…

Cc: zhimingwangpublic@… added

Cc Me!

comment:13 Changed 10 years ago by kgabor79@…

On Lion, I think the problem is that both /opt/local/include/freetype2/ft2build.h and /usr/X11/include/ft2build.h exist and mplayer's configure script finds the latter (/usr/X11 is earlier in the path). The configure script either fails and set freetype to "no" or if you specify its location, then the build fails for the same reason. From a standalone mplayer build:

./configure --enable-menu --with-freetype-config=/opt/local/bin/freetype-config --enable-freetype

Checking for bitmap font support ... yes 
Checking for freetype >= 2.0.9 ... yes 
Checking for fontconfig ... yes 

make

cc -MMD -MP -D_ISOC99_SOURCE -I. -Iffmpeg -O2 -march=corei7-avx -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -mdynamic-no-pic  -fpie -DPIC  -I/usr/X11/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include  -I/opt/local/include/freetype2 -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include  -I/opt/local/include/opus  -I/opt/local/include/dirac  -I/opt/local/include/schroedinger-1.0 -I/opt/local/include/orc-0.4  -c -o command.o command.c
In file included from command.c:45:
In file included from ./sub/font_load.h:25:
/usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found

A standalone mplayer build is fixed if "-I/usr/X11/include" is deleted from config.mak and

export CFLAGS=-I/opt/local/include
export LDFLAGS=-L/opt/local/lib

are set to find the macport version of libs.

Last edited 10 years ago by kgabor79@… (previous) (diff)

comment:14 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.