Page 1 of 1

Cross Compiling VLC for Win 64 on Arch Linux: undefined reference inflateEnd

Posted: 22 Jan 2020 13:53
by roxlu
I'm following this guide https://wiki.videolan.org/Win32Compile/ to cross compile VLC from Arch Linux for Win 64. It seems that freetype (and harfbuzz) are not linking correctly with libz.

I'm using a script to compile that does:

Code: Select all

d=${PWD} bd=${d}/build es=${bd}/extern/sources # external sources eb=${bd}/extern/build # external build dir id=${d}/install # install dir host="x86_64-w64-mingw32" if [ ! -d ${es}/vlc-win ] ; then mkdir ${es}/vlc-win cd ${es}/vlc-win git clone http://git.videolan.org/git/vlc.git . fi cd ${es}/vlc-win if [ ! -d ${es}/vlc-win/contrib/win32 ] ; then mkdir -p ${es}/vlc-win/contrib/win32 fi cd ${es}/vlc-win/contrib/win32 ../bootstrap --host=${host} make fetch make

Then I run into these linker errors:

Code: Select all

[ 69%] Linking CXX executable test-would-substitute.exe /usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: 2020-002-vlc/build/extern/sources/vlc-win/contrib/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o): in function `ft_gzip_file_done': 2020-002-vlc/build/extern/sources/vlc-win/contrib/win32/freetype/src/gzip/ftgzip.c:334: undefined reference to `inflateEnd' /usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: 2020-002-vlc/build/extern/sources/vlc-win/contrib/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o): in function `ft_gzip_file_fill_output': 2020-002-vlc/build/extern/sources/vlc-win/contrib/win32/freetype/src/gzip/ftgzip.c:443: undefined reference to `inflate' /usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: 2020-002-vlc/build/extern/sources/vlc-win/contrib/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o): in function `ft_gzip_file_reset': 2020-002-vlc/build/extern/sources/vlc-win/contrib/win32/freetype/src/gzip/ftgzip.c:363: undefined reference to `inflateReset' /usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: 2020-002-vlc/build/extern/sources/vlc-win/contrib/x86_64-w64-mingw32/lib/libfreetype.a(ftgzip.o): in function `ft_gzip_file_init':

I've installed mingw64:

Code: Select all

$ x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 9.2.0

Any thoughts what might cause this :shock: ?

Re: Cross Compiling VLC for Win 64 on Arch Linux: undefined reference inflateEnd

Posted: 01 Apr 2020 10:59
by VDIGIT
A similar problem. Did you solve it somehow?