[FFmpeg-trac] #7229(avfilter:open): Compilation error with --enable-libfreetype

FFmpeg trac at avcodec.org
Thu Jun 14 02:02:53 EEST 2018


#7229: Compilation error with --enable-libfreetype
-------------------------------------+------------------------------------
             Reporter:  CoRoNe       |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avfilter
              Version:  git-master   |               Resolution:
             Keywords:  libfreetype  |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by CoRoNe):

 I've solved the issue.
 While browsing Freetype's commits I came across
 [http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=d2d1750e0802c1472419da1c73992eae92777d0f
 d2d1750]. [https://github.com/Reino17/ffmpeg-windows-build-
 helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L557 I've
 had] [https://github.com/Reino17/ffmpeg-windows-build-
 helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L912
 compilation failures] [https://github.com/Reino17/ffmpeg-windows-build-
 helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L945 with
 "declspec" before].

 {{{
 diff -ur builds/unix/ftconfig.in.bak builds/unix/ftconfig.in
 --- builds/unix/ftconfig.in.bak 2018-04-22 11:41:36.000000000 +0200
 +++ builds/unix/ftconfig.in     2018-06-13 21:58:02.093750000 +0200
 @@ -490,7 +490,7 @@
  #ifdef FT2_BUILD_LIBRARY

  #if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
 -#define FT_EXPORT( x )  __declspec( dllexport )  x
 +#define FT_EXPORT( x )  x
  #elif defined( __GNUC__ ) && __GNUC__ >= 4
  #define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
  #elif defined( __cplusplus )
 @@ -502,7 +502,7 @@
  #else

  #if defined( FT2_DLLIMPORT )
 -#define FT_EXPORT( x )  __declspec( dllimport )  x
 +#define FT_EXPORT( x )  x
  #elif defined( __cplusplus )
  #define FT_EXPORT( x )  extern "C"  x
  #else
 diff -ur include/freetype/config/ftconfig.h.bak
 include/freetype/config/ftconfig.h
 --- include/freetype/config/ftconfig.h.bak      2018-04-22
 11:41:36.000000000 +0200
 +++ include/freetype/config/ftconfig.h  2018-06-13 21:58:46.234375000
 +0200
 @@ -458,7 +458,7 @@
  #ifdef FT2_BUILD_LIBRARY

  #if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) )
 -#define FT_EXPORT( x )  __declspec( dllexport )  x
 +#define FT_EXPORT( x )  x
  #elif defined( __GNUC__ ) && __GNUC__ >= 4
  #define FT_EXPORT( x )  __attribute__(( visibility( "default" ) ))  x
  #elif defined( __cplusplus )
 @@ -470,7 +470,7 @@
  #else

  #if defined( FT2_DLLIMPORT )
 -#define FT_EXPORT( x )  __declspec( dllimport )  x
 +#define FT_EXPORT( x )  x
  #elif defined( __cplusplus )
  #define FT_EXPORT( x )  extern "C"  x
  #else
 }}}
 I've removed all mentions of `__declspec`, recompiled freetype, but also
 those that depend on it (fontconfig, libbluray and libass) and of course
 ffmpeg in the end. This proved successful and got me a working shared
 build.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7229#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list