[FFmpeg-user] How to build static fontconfig with ffmpeg?
Roger Pack
rogerdpack2 at gmail.com
Wed Aug 8 19:49:28 EEST 2018
On Tue, Jul 24, 2018 at 12:02 AM, qw <applemax82 at 163.com> wrote:
> Hi,
>
>
>>Wonder if it should be
>>or use another configure command : ./configure --disable-shared
>>--enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lfreetype -lharfbuzz
>> -lpng"
>>
>>If that doesn't work maybe the circular dep. with harfbuzz and free
>>type isn't trivial?
I wonder if you can specify them circular style like
-lfreetype -lharfbuzz -lfreetype (or some combination)
if not sounds like you found a work around. Either that or remove the
circular aspect.
> It doesn't work. I combine libfreetype.a, libharfbuzz.a and libpng16.a into new libfreetype.a, and can succeed in building fontconfig by linking to the new libfreetype.a, i.e.
>
>
>
> ar x libfreetype.a" && ar x libharfbuzz.a" && ar x libpng16.a" && ar cru libfreetype.new.a ./*.o && ranlib libfreetype.new.a
>
>
>
> Is there another method to build fontconfig? Is it possible to build fontconfig by only running configure and make?
>
>
>
> Thanks!
>
>
> Regards
>
>
> Andrew
>
>
> At 2018-07-23 22:43:44, "Roger Pack" <rogerdpack2 at gmail.com> wrote:
>>Wonder if it should be
>>or use another configure command : ./configure --disable-shared
>>--enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lfreetype -lharfbuzz
>> -lpng"
>>
>>If that doesn't work maybe the circular dep. with harfbuzz and free
>>type isn't trivial?
>>
>>On Tue, Jul 17, 2018 at 7:20 AM, qw <applemax82 at 163.com> wrote:
>>> Hi,
>>>
>>>
>>> My environment is Centos 7.4.
>>>
>>>
>>> I want to build static fontconfig and build ffmpeg with static fontconfig. I succeed in building static libpng/freetype2/harfbuzz/vidstab/fribidi/expat, but I fail to build static fontconfig. The following is my building steps:
>>>
>>>
>>> 1) build libpng-1.6.34.tar.gz
>>> ./autogen.sh
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 2) build freetype-2.9.1.tar.bz2
>>> ./configure --disable-shared --enable-static --with-png=no --with-harfbuzz=no
>>> make && make install
>>>
>>>
>>> 3) build harfbuzz-1.7.6.tar.bz2
>>> ./configure --prefix=/usr/local/ --disable-shared --enable-static --with-freetype=yes
>>> make && make install
>>>
>>>
>>> 4) rebuild freetype2
>>> make clean && make distclean
>>> ./configure --disable-shared --enable-static --with-png=yes --with-harfbuzz=yes
>>> make && make install
>>>
>>>
>>> 5) build georgmartius-vid.stab-v1.1.0-0-g60d65da.tar.gz
>>> cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=0
>>> make && make install
>>>
>>>
>>> 6) build fribidi-1.0.1.tar.gz
>>> ./bootstrap
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 7) build expat-2.2.5.tar.bz2
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 8) build fontconfig-2.13.0.tar.bz2
>>> ./configure --disable-shared --enable-static
>>> make
>>>
>>>
>>> Then, make reports error messages as below:
>>> /usr/local/lib/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
>>> sfnt.c:(.text+0x3c49): undefined reference to `png_create_read_struct'
>>> sfnt.c:(.text+0x3c63): undefined reference to `png_create_info_struct'
>>> sfnt.c:(.text+0x3c8b): undefined reference to `png_set_longjmp_fn'
>>> sfnt.c:(.text+0x3cb6): undefined reference to `png_destroy_read_struct'
>>> sfnt.c:(.text+0x3d06): undefined reference to `png_set_read_fn'
>>> sfnt.c:(.text+0x3d1b): undefined reference to `png_read_info'
>>>
>>>
>>> or use another configure command : ./configure --disable-shared --enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lharfbuzz -lfreetype -lpng"
>>> Then, make reports error messages as below:
>>> /usr/local/lib/libfreetype.a(autofit.o): In function `af_face_globals_free':
>>> autofit.c:(.text+0x2d52): undefined reference to `hb_font_destroy'
>>> autofit.c:(.text+0x2d5b): undefined reference to `hb_buffer_destroy'
>>> /usr/local/lib/libfreetype.a(autofit.o): In function `af_shaper_get_coverage':
>>> autofit.c:(.text+0x7544): undefined reference to `hb_font_get_face'
>>> autofit.c:(.text+0x756d): undefined reference to `hb_ot_tags_from_script'
>>> autofit.c:(.text+0x759e): undefined reference to `hb_set_create'
>>> autofit.c:(.text+0x75bb): undefined reference to `hb_ot_layout_collect_lookups'
>>> autofit.c:(.text+0x75c3): undefined reference to `hb_set_is_empty'
>>> autofit.c:(.text+0x75ee): undefined reference to `hb_set_destroy'
>>> autofit.c:(.text+0x75f8): undefined reference to `hb_set_destroy'
>>> autofit.c:(.text+0x7602): undefined reference to `hb_set_destroy'
>>>
>>>
>>> How to build static fontconfig?
>>>
>>>
>>> Thanks!
>>>
>>>
>>> Regards
>>>
>>>
>>> Andrew
>>>
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>_______________________________________________
>>ffmpeg-user mailing list
>>ffmpeg-user at ffmpeg.org
>>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>>To unsubscribe, visit link above, or email
>>ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list