Opened 6 years ago

Closed 6 years ago

#41574 closed defect (fixed)

ffmpeg @2.1.1: build fails with freetype 2.5.1

Reported by: joe@… Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ian@…, ryandesign (Ryan Schmidt), t.m.guymer@…, jeremyhu (Jeremy Huddleston Sequoia), davidfavor (David Favor)
Port: ffmpeg, ffmpeg-devel

Description

Hello,

When installing ffmpeg on OS X 10.9, ffmpeg configuration fails and the port isn't installed, as the freetype2 header "freetype/freetype.h" isn't found. The fundamental issue may be with the freetype2 installation.

A successful workaround is to add a symlink after freetype2 installation so that ffmpeg's configure script can find it. Then install ffmpeg.

ln -s /opt/local/include/freetype2 /opt/local/include/freetype

Attachments (2)

main.log (86.8 KB) - added by ian@… 6 years ago.
config.log (317.5 KB) - added by ian@… 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 6 years ago by ian@…

Cc: ian@… added

Cc Me!

Changed 6 years ago by ian@…

Attachment: main.log added

Changed 6 years ago by ian@…

Attachment: config.log added

comment:2 Changed 6 years ago by ian@…

Same issue on 10.8 and ffmpeg @2.1.1_0+gpl2+nonfree. Tried a clean + uninstall, but no change.

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

Cc: ryandesign@… added
Keywords: ffmpeg freetype2 removed
Port: ffmpeg added
Summary: ffmpeg @2.1.1 +gpl2 +gpl3 +nonfree Configure error - build failureffmpeg @2.1.1: build fails with freetype 2.5.1

It's an incompatibility with freetype 2.5.1. I can look into it in a few hours.

comment:4 Changed 6 years ago by t.m.guymer@…

Cc: t.m.guymer@… added

Cc Me!

comment:5 Changed 6 years ago by t.m.guymer@…

Same issue on 10.6.8 with ffmpeg-2.1.1_0+gpl2+nonfree

The soft link work around works for me.

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

Cc: jeremyhu@… added
Owner: changed from macports-tickets@… to devans@…
Port: ffmpeg-devel added

It's a convoluted configure script that I don't know the best way to fix. The configure script check is doing this:

#include <ft2build.h>
#include <freetype/freetype.h>

whereas freetype wants you to do this:

#include <ft2build.h>
#include FT_FREETYPE_H

and the ffmpeg configure script isn't set up to do that kind of thing. The first step is probably to report the problem to the developers and see what they say. And then there's a wrong #include in ./libavfilter/vf_drawtext.c which can probably just be removed. That should be all, hopefully.

comment:7 Changed 6 years ago by davidfavor (David Favor)

I've been working on this also.

I've reported this upstream (ffmpeg-devel) with a similar temp fix.

This fix involves changing configure (is odd ways) + source files for DrawText filter, so best do the temp fix for now.

A better temp fix may be...

ln -sf /opt/local/include/freetype2 /opt/local/include/freetype2/freetype

as this replicates the previous freetype directory structure.

Last edited 6 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:8 Changed 6 years ago by davidfavor (David Favor)

This relates to the recent freetype-2.5.1 update where freetype-2.5.x seems to have changed the include directory hierarchy.

comment:9 in reply to:  8 Changed 6 years ago by ryandesign (Ryan Schmidt)

Replying to david@…:

I've reported this upstream (ffmpeg-devel) with a similar temp fix.

Here's that URL: http://ffmpeg.org/pipermail/ffmpeg-devel/2013-November/151404.html

Replying to david@…:

This relates to the recent freetype-2.5.1 update where freetype-2.5.x seems to have changed the include directory hierarchy.

Yes. See #41593.

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

Cc: david@… added

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

Resolution: fixed
Status: newclosed

Fixed in r114100. This works for us, but is not suitable for upstream, because this change makes ffmpeg require freetype 2.5.1 or newer.

Note: See TracTickets for help on using tickets.