Freetype2 2.8.1 prevents Wine from working

unstable
update
testing
wine

#1

The update of freetype2 to version 2.8.1-1 prevents Wine from being compiled and run. No matter what Wine version you are using.

Current workaround is to downgrade freetype2 to 2.8-2, which makes Wine work without issue again.


#2

What do you mean by that? Do you have an example? Seems lib32-freetype2 isn’t updated yet.


#3

It happened on my unstable machine. Could not launch winecfg after the update to freetype2 2.8.1.

See Arch bug report here:
https://bugs.archlinux.org/task/55667


#4

Can you try compiling with this patch?

https://bugs.winehq.org/attachment.cgi?id=59266


#5

As I told the guys in wine-staging IRC. I don’t know how to apply patches directly.
I’ev only done it from PKGBUILDS. :stuck_out_tongue:


#6

Do it in PKGBUILDS …


#7

The Wine bug is marked as a P2 Blocker, so it is very likely to get fixed upstream soon anyway.

I’ll just use the workaround mentioned in my original post until then. :slight_smile:


[Testing Update] 2017-09-24 - Nvidia, Gambas, JADE, Haskell, JDK9, Python
#8

I’m just trying to compile it with mentioned patch:

# $Id: PKGBUILD 257711 2017-09-15 19:23:08Z felixonmars $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Eduardo Romero <eduardo@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=wine
pkgver=2.17
pkgrel=1.1

_pkgbasever=${pkgver/rc/-rc}

source=(https://dl.winehq.org/wine/source/2.x/$pkgname-$_pkgbasever.tar.xz{,.sign}
        30-win32-aliases.conf
        ft281.patch::https://bugs.winehq.org/attachment.cgi?id=59266)
sha512sums=('cb10c876e689aa601c68673aab32c0514dd174692a01bdb3afc78d5e6079b0e77f48783af2f54245f397c762da3b4e5f2c1d39d2ce7fdb3b117d338b95c24810'
            'SKIP'
            '6e54ece7ec7022b3c9d94ad64bdf1017338da16c618966e8baf398e6f18f80f7b0576edf1d1da47ed77b96d577e4cbb2bb0156b0b11c183a0accf22654b0a2bb'
            '7f52298af2a132c232cb6054fd01c6557c0b8607dc2b6e0f5ef1ea53d1eae5ee19085d2200a2c480e6d2fad2f5acd3a597a6484641fe0edccd019f09ce1344de')
validpgpkeys=(5AC1A08B03BD7A313E0A955AF5E6E9EEB9461DD7
              DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D)

pkgdesc="A compatibility layer for running Windows programs"
url="http://www.winehq.com"
arch=(i686 x86_64)
options=(staticlibs)
license=(LGPL)

_depends=(
  fontconfig      lib32-fontconfig
  lcms2           lib32-lcms2
  libxml2         lib32-libxml2
  libxcursor      lib32-libxcursor
  libxrandr       lib32-libxrandr
  libxdamage      lib32-libxdamage
  libxi           lib32-libxi
  gettext         lib32-gettext
  freetype2       lib32-freetype2
  glu             lib32-glu
  libsm           lib32-libsm
  gcc-libs        lib32-gcc-libs
  libpcap         lib32-libpcap
  desktop-file-utils
)

makedepends=(autoconf ncurses bison perl fontforge flex
  'gcc>=4.5.0-2'  'gcc-multilib>=4.5.0-2'
  giflib                lib32-giflib
  libpng                lib32-libpng
  gnutls                lib32-gnutls
  libxinerama           lib32-libxinerama
  libxcomposite         lib32-libxcomposite
  libxmu                lib32-libxmu
  libxxf86vm            lib32-libxxf86vm
  libldap               lib32-libldap
  mpg123                lib32-mpg123
  openal                lib32-openal
  v4l-utils             lib32-v4l-utils
  libpulse              lib32-libpulse
  alsa-lib              lib32-alsa-lib
  libxcomposite         lib32-libxcomposite
  mesa                  lib32-mesa
  mesa-libgl            lib32-mesa-libgl
  opencl-icd-loader     lib32-opencl-icd-loader
  libxslt               lib32-libxslt
  gst-plugins-base-libs lib32-gst-plugins-base-libs
  samba
  opencl-headers
)

optdepends=(
  giflib                lib32-giflib
  libpng                lib32-libpng
  libldap               lib32-libldap
  gnutls                lib32-gnutls
  mpg123                lib32-mpg123
  openal                lib32-openal
  v4l-utils             lib32-v4l-utils
  libpulse              lib32-libpulse
  alsa-plugins          lib32-alsa-plugins
  alsa-lib              lib32-alsa-lib
  libjpeg-turbo         lib32-libjpeg-turbo
  libxcomposite         lib32-libxcomposite
  libxinerama           lib32-libxinerama
  ncurses               lib32-ncurses
  opencl-icd-loader     lib32-opencl-icd-loader
  libxslt               lib32-libxslt
  gst-plugins-base-libs lib32-gst-plugins-base-libs
  cups
  samba           dosbox
)

if [[ $CARCH == i686 ]]; then
  # Strip lib32 etc. on i686
  _depends=(${_depends[@]/*32-*/})
  makedepends=(${makedepends[@]/*32-*/} ${_depends[@]})
  makedepends=(${makedepends[@]/*-multilib*/})
  optdepends=(${optdepends[@]/*32-*/})
else
  makedepends=(${makedepends[@]} ${_depends[@]})
  provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver")
  conflicts=('bin32-wine' 'wine-wow64')
  replaces=('bin32-wine')
fi

prepare() {
  # Allow ccache to work
  mv $pkgname-$_pkgbasever $pkgname

  # https://bugs.winehq.org/show_bug.cgi?id=43530
  export CFLAGS="${CFLAGS/-fno-plt/}"
  export LDFLAGS="${LDFLAGS/,-z,now/}"

  sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i $pkgname/configure*

  # Get rid of old build dirs
  rm -rf $pkgname-{32,64}-build
  mkdir $pkgname-32-build

  cd $srcdir/wine
  patch -p1 -i $srcdir/ft281.patch
}

build() {
  cd "$srcdir"

  if [[ $CARCH == x86_64 ]]; then
    msg2 "Building Wine-64..."

    mkdir $pkgname-64-build
    cd "$srcdir/$pkgname-64-build"
    ../$pkgname/configure \
      --prefix=/usr \
      --libdir=/usr/lib \
      --with-x \
      --with-gstreamer \
      --enable-win64
    # Gstreamer was disabled for FS#33655

    make

    _wine32opts=(
      --libdir=/usr/lib32
      --with-wine64="$srcdir/$pkgname-64-build"
    )

    export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  fi

  msg2 "Building Wine-32..."
  cd "$srcdir/$pkgname-32-build"
  ../$pkgname/configure \
    --prefix=/usr \
    --with-x \
    --with-gstreamer \
    "${_wine32opts[@]}"

  make
}

package() {
  depends=(${_depends[@]})

  msg2 "Packaging Wine-32..."
  cd "$srcdir/$pkgname-32-build"

  if [[ $CARCH == i686 ]]; then
    make prefix="$pkgdir/usr" install
  else
    make prefix="$pkgdir/usr" \
      libdir="$pkgdir/usr/lib32" \
      dlldir="$pkgdir/usr/lib32/wine" install

    msg2 "Packaging Wine-64..."
    cd "$srcdir/$pkgname-64-build"
    make prefix="$pkgdir/usr" \
      libdir="$pkgdir/usr/lib" \
      dlldir="$pkgdir/usr/lib/wine" install
  fi

  # Font aliasing settings for Win32 applications
  install -d "$pkgdir"/etc/fonts/conf.{avail,d}
  install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail"
  ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf"
}

# vim:set ts=8 sts=2 sw=2 et:

However failed due https://bugs.winehq.org/show_bug.cgi?id=43716


#9

Looks like the patch only fix the crash, not the compiling issues…


#10

At least for testing I’ve uploaded now freetype2 v2.8-3 and checked with firefox, thunderbird to see if this creates any regression. So far so good for testing branch.


#11

I noticed lib32-freetype2 2.8.1-1 breaks Teamviewer too (which runs using wine). Same issue, I assume. Downgrading lib32-freetype2 to 2.8-2 fixes it.

EDIT: Another fix is to provide the 2.8 lib32-freetype2 libs to Teamviewer with export LD_LIBRARY_PATH=


General question regarding "breakages" & "workarounds"
#12

This would be so sad. Because Teamviewer ships it’s own version of Wine for it. So that will probably not get the patches needed for a long time. :frowning:

Hopefully this is easy to do, via the PKGBUILD?


#13

I just did it manually, downloading the lib32-freetype2 2.8 libs and putting them in a directory, then starting teamviewer with a script that includes “export LD_LIBRARY_PATH=” with the directory that has the libs.

Probably it can be done via pkgbuild. I imagine the teamviewer AUR pkgbuilds will need to be redone (version 2.8.1 is still in Arch testing). I always just update Teamviewer myself manually.


#14

Looks like this is fixed in wine 2.18 (though I haven’t tested it): https://bugs.winehq.org/show_bug.cgi?id=43716

But Teamviewer will probably still be affected for a while…


#15

wine itself is fixed, however the other wine packages still not. Two patches were submitted to fix this problem:

https://source.winehq.org/patches/data/137429
https://source.winehq.org/patches/data/137430


#16

Yep. Wine-staging and wine-staging-nine will have to do a rebase for there next releases to get the fix.


#17

Fixed today for all wine packages …


#18

But does compiling issue still persist?

Edit :

Nevermind. I think it is already fixed


#19

anyone using the latest wine 2.18 with freetype 2.8.1 has problems with fonts ?

i can’t seem to have default fonts anti aliased, when they were working previously ( changed back to stable and its working, changing to unstable or testing no more antialiased fonts )


#20

Nope. They are working fine here, as 2.18 contains fixes for freetype issue

https://www.winehq.org/announce/2.18