Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001923

build-infra: Freetype search on Windows is broken, libfreetype.dll.a vs freetype.dll

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • None
    • infrastructure

      In libraries.m4 LIB_SETUP_FREETYPE we setup freetype handling. Getting freetype correct is a constant source of problem, mostly because freetype (and the boot-jdk) is typically the one thing that can't be automatically detected and must be provided by the user. Therefore this needs special attention.

      On Windows, this is even more of a mess. There is no official freetype windows build. However, the most commonly downloaded binary, from GnuWin32 (which is also the one we officially recommends) has a strange setup.

      It installs itself to C:\Program Files (x86)\GnuWin32 by default, but in C:\Program Files (x86)\GnuWin32\lib it has a file named libfreetype.dll.a (note the "lib" prefix!). This file is what we need as freetype.dll to compile. The traditional solution has been to ask the user to make a copy of this file in C:\Program Files (x86)\GnuWin32\lib and name it freetype.dll, but this is just corny. :-(

      We should handle this better. This means:

      1) look for libfreetype.dll.a as well as for freetype.dll when detecting freetype.

      2) if we find this file, when we copy it to our build directory (which we do), use libfreetype.dll.a as source but name the copy freetype.dll, and use this copy further on.

      3) when we see if we have located a proper freetype, we probably needs to copy this to /tmp/freetype.dll or so before testing AC_CHECK_LIB. This might be the root cause of JDK-8001922.

            Unassigned Unassigned
            ihse Magnus Ihse Bursie
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: