Re: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 fontconfig builds OK)

2022-05-09 Thread Werner LEMBERG


> Ah. User error, although it did work with 2.11.1

By pure luck.  The allowed arguments for `--with-zlib` didn't change
since FreeType version 2.5.3, released eight years ago.


Werner



RE: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 fontconfig builds OK)

2022-05-08 Thread hydra3333
Ah. User error, although it did work with 2.11.1
Adjusted the configure and it works OK with version 2.12.1

>> multiple definition of `get_crc_table';
>> multiple definition of `crc32_z';
>> multiple definition of `crc32_combine64';
>> ...
>
>This looks like
>
>  https://gitlab.freedesktop.org/freetype/freetype/-/issues/1146
>
>Werner

Sent: Saturday, May 7, 2022 8:18 PM
To: freetype@nongnu.org
Subject: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 
fontconfig builds OK)


Hello. I cross-compile freetype_lib under ubuntu with target win x64, as a part 
of cross-compiling ffmpeg.

Freetype release 2.11.1 cross-compiles OK of itself.
Freetype release 2.12.1 cross-compiles OK of itself.

However ... using exactly the same build script with configure for 2.11.1 and 
2.12.1 and with configure:

./configure 
--with-sysroot="/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32" 
--host=x86_64-w64-mingw32
--prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32
 --disable-shared --enable-static
--build=x86_64-linux-gnu 
--with-zlib=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32
--with-harfbuzz=no ' in '/home/u/Desktop/_working/workdir/x86_64/freetype-2.12.1

with Freetype release 2.11.1 the full build completes successfully.
with Freetype release 2.12.1 the full build aborts during building fontconfig.

So, in it seems that release 2.12.1 has introduced some incompatibility which 
causes other products to fail to build, in this case
fontconfig as one dependency when cross-compiling the ubiquitous ffmpeg 
video/audo manipulation tool.

Relevant area of log appears below when buildingg fontconfig: 

/bin/bash ../libtool  --tag=CC   --mode=link x86_64-w64-mingw32-gcc  -O3  
-fstack-protector-all  -D_FORTIFY_SOURCE=2   -version-info
13:0:12 -no-undefined -export-symbols fontconfig.def -O3  -fstack-protector-all 
 -D_FORTIFY_SOURCE=2   -o libfontconfig.la -rpath
/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib
 fcatomic.lo fccache.lo fccfg.lo fccharset.lo
fccompat.lo fcdbg.lo fcdefault.lo fcdir.lo fcformat.lo fcfreetype.lo fcfs.lo 
fcptrlist.lo fchash.lo fcinit.lo fclang.lo fclist.lo
fcmatch.lo fcmatrix.lo fcname.lo fcobjs.lo fcpat.lo fcrange.lo fcserialize.lo 
fcstat.lo fcstr.lo fcweight.lo fcxml.lo ftglue.lo
-L/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib
 -lfreetype -lbz2 -lpng16 -lz
-L/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib
 -lxml2 -lz -llzma -liconv -lws2_32   
libtool: link: x86_64-w64-mingw32-ar cr .libs/libfontconfig.a  fcatomic.o 
fccache.o fccfg.o fccharset.o fccompat.o fcdbg.o
fcdefault.o fcdir.o fcformat.o fcfreetype.o fcfs.o fcptrlist.o fchash.o 
fcinit.o fclang.o fclist.o fcmatch.o fcmatrix.o fcname.o
fcobjs.o fcpat.o fcrange.o fcserialize.o fcstat.o fcstr.o fcweight.o fcxml.o 
ftglue.o
libtool: link: x86_64-w64-mingw32-ranlib .libs/libfontconfig.a
libtool: link: ( cd ".libs" && rm -f "libfontconfig.la" && ln -s 
"../libfontconfig.la" "libfontconfig.la" )
make[3]: Leaving directory 
'/home/u/Desktop/_working/workdir/x86_64/fontconfig_git/src'
make[2]: Leaving directory 
'/home/u/Desktop/_working/workdir/x86_64/fontconfig_git/src'
Making all in fc-cache
make[2]: Entering directory 
'/home/u/Desktop/_working/workdir/x86_64/fontconfig_git/fc-cache'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../src -Wall 
-Wpointer-arith -Wstrict-prototypes-Wmissing-prototypes
-Wmissing-declarations  -Wnested-externs -fno-strict-aliasing -O3  
-fstack-protector-all  -D_FORTIFY_SOURCE=2
-I/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include
  -O3  -fstack-protector-all
-D_FORTIFY_SOURCE=2   -MT fc-cache.o -MD -MP -MF .deps/fc-cache.Tpo -c -o 
fc-cache.o fc-cache.c
\
{ \
if test "x" = x -o "x" = x; then :; else \
for x in \
-decl-list.txt \
-decl.txt \
tmpl/-unused.sgml \
"tmpl/*.bak" \
xml html \
; do echo /$x; done; \
fi; \
if test "x" = x -o "x" = x; then :; else \
for lc in ; do \
for x in \
 \
 \
 \
; do echo /$lc/$x; done; \
done; \
for x in \
 \
 \
 \
 \
 \
"*/.xml2po.mo" \
"*/*.omf.out" \
; do echo /$x; done; \
fi; \
if test "x" = x -o "x" = x; then :; else \
for lc in ; do \
for x in \
 \

Re: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 fontconfig builds OK)

2022-05-08 Thread Werner LEMBERG


> > This looks like
> > 
> >   https://gitlab.freedesktop.org/freetype/freetype/-/issues/1146
> > It seems perhaps so.
> 
> I don't know anything about FT_CONFIG_OPTION_SYSTEM_ZLIB nor how or
> when to use it, so advice would be welcomed.

Looking again at your original e-mail I now see that you are
configuring FreeType incorrectly:

```
./configure
  --with-sysroot="..." \
  --host=x86_64-w64-mingw32
  --prefix="..." \
  --disable-shared \
  --enable-static \
  --build=x86_64-linux-gnu \
  --with-zlib="/home/u/Desktop/.../x86_64-w64-mingw32" \   <---
  --with-harfbuzz=no
```

If you say `./configure --help` you get the following:

```
  --with-zlib=[yes|no|auto]
use system zlib instead of internal library
[default=auto]
...
Some influential environment variables:
  ...
  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config
  ...
```

You are setting `--with-zlib` to a path.  FreeType's `configure`
script interprets this as `no`, thus making FreeType use its internal
zlib library...


Werner



RE: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 fontconfig builds OK)

2022-05-07 Thread hydra3333
It seems perhaps so.

I don't know anything about FT_CONFIG_OPTION_SYSTEM_ZLIB nor how or when to use 
it, so advice would be welcomed.

-Original Message-
From: Werner LEMBERG  
Sent: Saturday, May 7, 2022 8:28 PM
To: hydra3...@gmail.com
Cc: freetype@nongnu.org
Subject: Re: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 
fontconfig builds OK)


> multiple definition of `get_crc_table';
> multiple definition of `crc32_z';
> multiple definition of `crc32_combine64';
> ...

This looks like

  https://gitlab.freedesktop.org/freetype/freetype/-/issues/1146


Werner




Re: release 2.12.1 causes fontconfig to fail to build (with 2.11.1 fontconfig builds OK)

2022-05-07 Thread Werner LEMBERG


> multiple definition of `get_crc_table';
> multiple definition of `crc32_z';
> multiple definition of `crc32_combine64';
> ...

This looks like

  https://gitlab.freedesktop.org/freetype/freetype/-/issues/1146


Werner