How to build static fontconfig with ffmpeg?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
qw
Reply | Threaded
Open this post in threaded view
|

How to build static fontconfig with ffmpeg?

qw
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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

rogerdpack2
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 <[hidden email]> 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
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
qw
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

qw
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?

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" <[hidden email]> 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 <[hidden email]> 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
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>_______________________________________________
>ffmpeg-user mailing list
>[hidden email]
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>To unsubscribe, visit link above, or email
>[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

rogerdpack2
On Tue, Jul 24, 2018 at 12:02 AM, qw <[hidden email]> 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" <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> [hidden email] with subject "unsubscribe".
>>_______________________________________________
>>ffmpeg-user mailing list
>>[hidden email]
>>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>>To unsubscribe, visit link above, or email
>>[hidden email] with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

Reino Wijnsma
On 24-7-2018 08:02, qw <[hidden email]> wrote:

> 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?
> 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?
Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in your case) requires LibPNG and Harfbuzz.
To have Fontconfig also recognize Freetype2's requirements (LibPNG and Harfbuzz) I believe you need to run "pkg-config --static".
I've had this issue before with a library that needed Freetype2. So I believe the following should work:

8) build fontconfig-2.13.0.tar.bz2
export PKG_CONFIG="pkg-config --static"
./configure --disable-shared --enable-static
make
unset PKG_CONFIG

-- Reino

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
qw
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

qw
Hi,


>Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
>You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in your case) requires LibPNG and Harfbuzz.
>To have Fontconfig also recognize Freetype2's requirements (LibPNG and Harfbuzz) I believe you need to run "pkg-config --static".
>I've had this issue before with a library that needed Freetype2. So I believe the following should work:
>
>8) build fontconfig-2.13.0.tar.bz2
>export PKG_CONFIG="pkg-config --static"
>./configure --disable-shared --enable-static
>make
>unset PKG_CONFIG



The following are pc files:




cat ../dynamicBuild/lib/pkgconfig/freetype2.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
libdir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/lib
includedir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/include


Name: FreeType 2
URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 22.1.16
Requires:
Requires.private: zlib, libpng, harfbuzz >= 1.3.0
Libs: -L${libdir} -lfreetype
Libs.private:
Cflags: -I${includedir}/freetype2




cat ../dynamicBuild/lib/pkgconfig/harfbuzz.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
libdir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/lib
includedir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/include


Name: harfbuzz
Description: HarfBuzz text shaping library
Version: 1.7.6


Libs: -L${libdir} -lharfbuzz
Libs.private: -lm    
Requires.private:  
Cflags: -I${includedir}/harfbuzz




cat ../dynamicBuild/lib/pkgconfig/libpng.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng16


Name: libpng
Description: Loads and saves PNG files
Version: 1.6.34
Requires: zlib
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm
Cflags: -I${includedir}




cat ../dynamicBuild/lib/pkgconfig/libpng16.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng16


Name: libpng
Description: Loads and saves PNG files
Version: 1.6.34
Requires: zlib
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm
Cflags: -I${includedir}






I use the command of 'pkg-config --static', which prints nothing.




Thanks


Regards


Andrew



At 2018-08-09 08:09:46, "Reino Wijnsma" <[hidden email]> wrote:

>On 24-7-2018 08:02, qw <[hidden email]> wrote:
>> 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?
>> 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?
>Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
>You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in your case) requires LibPNG and Harfbuzz.
>To have Fontconfig also recognize Freetype2's requirements (LibPNG and Harfbuzz) I believe you need to run "pkg-config --static".
>I've had this issue before with a library that needed Freetype2. So I believe the following should work:
>
>8) build fontconfig-2.13.0.tar.bz2
>export PKG_CONFIG="pkg-config --static"
>./configure --disable-shared --enable-static
>make
>unset PKG_CONFIG
>
>-- Reino
>
>_______________________________________________
>ffmpeg-user mailing list
>[hidden email]
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>To unsubscribe, visit link above, or email
>[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

unsubscribe

zcream

________________________________
From: ffmpeg-user <[hidden email]> on behalf of qw <[hidden email]>
Sent: Monday, 13 August 2018 1:02 PM
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] How to build static fontconfig with ffmpeg?

Hi,


>Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
>You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in your case) requires LibPNG and Harfbuzz.
>To have Fontconfig also recognize Freetype2's requirements (LibPNG and Harfbuzz) I believe you need to run "pkg-config --static".
>I've had this issue before with a library that needed Freetype2. So I believe the following should work:
>
>8) build fontconfig-2.13.0.tar.bz2
>export PKG_CONFIG="pkg-config --static"
>./configure --disable-shared --enable-static
>make
>unset PKG_CONFIG



The following are pc files:




cat ../dynamicBuild/lib/pkgconfig/freetype2.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
libdir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/lib
includedir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/include


Name: FreeType 2
URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 22.1.16
Requires:
Requires.private: zlib, libpng, harfbuzz >= 1.3.0
Libs: -L${libdir} -lfreetype
Libs.private:
Cflags: -I${includedir}/freetype2




cat ../dynamicBuild/lib/pkgconfig/harfbuzz.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
libdir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/lib
includedir=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild/include


Name: harfbuzz
Description: HarfBuzz text shaping library
Version: 1.7.6


Libs: -L${libdir} -lharfbuzz
Libs.private: -lm
Requires.private:
Cflags: -I${includedir}/harfbuzz




cat ../dynamicBuild/lib/pkgconfig/libpng.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng16


Name: libpng
Description: Loads and saves PNG files
Version: 1.6.34
Requires: zlib
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm
Cflags: -I${includedir}




cat ../dynamicBuild/lib/pkgconfig/libpng16.pc
prefix=/export/qiang/buildDir/debug-build/jdcloud_vod_ffmpeg/dynamicBuild
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng16


Name: libpng
Description: Loads and saves PNG files
Version: 1.6.34
Requires: zlib
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm
Cflags: -I${includedir}






I use the command of 'pkg-config --static', which prints nothing.




Thanks


Regards


Andrew



At 2018-08-09 08:09:46, "Reino Wijnsma" <[hidden email]> wrote:

>On 24-7-2018 08:02, qw <[hidden email]> wrote:
>> 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?
>> 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?
>Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
>You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in your case) requires LibPNG and Harfbuzz.
>To have Fontconfig also recognize Freetype2's requirements (LibPNG and Harfbuzz) I believe you need to run "pkg-config --static".
>I've had this issue before with a library that needed Freetype2. So I believe the following should work:
>
>8) build fontconfig-2.13.0.tar.bz2
>export PKG_CONFIG="pkg-config --static"
>./configure --disable-shared --enable-static
>make
>unset PKG_CONFIG
>
>-- Reino
>
>_______________________________________________
>ffmpeg-user mailing list
>[hidden email]
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>To unsubscribe, visit link above, or email
>[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: How to build static fontconfig with ffmpeg?

Reino Wijnsma
In reply to this post by qw
On 13-8-2018 15:02, qw <[hidden email]> wrote:
> I use the command of 'pkg-config --static', which prints nothing.
On 9-8-2018 2:09, Reino Wijnsma <[hidden email]> wrote:
> 8) build fontconfig-2.13.0.tar.bz2
> export PKG_CONFIG="pkg-config --static"
> ./configure --disable-shared --enable-static
> make
> unset PKG_CONFIG
You'd have to assign that command to the 'PKG_CONFIG'-variable, as quoted above.

-- Reino

P.s. Top-posting is not allowed on this mailinglist.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".