microsoft/openjdk

File lib/libfreetype.so not found in 17.0.11

blackr1234 opened this issue · 6 comments

I just rebuilt the Docker image of my Java microservice using Microsoft OpenJDK image tag 17-ubuntu, which now references OpenJDK version 17.0.11 rather than 17.0.8 which I was using earlier, and I find that lib/libfreetype.so is no longer included in Microsoft OpenJDK 17.

Command:

docker container run --rm mcr.microsoft.com/openjdk/jdk:17-ubuntu ls -l /usr/lib/jvm/msopenjdk-17-amd64/lib

Results:

total 143588
-rw-r--r-- 1 root root     71443 Apr  9 21:52 classlist
-rw-r--r-- 1 root root   8264052 Apr 10 06:14 ct.sym
-rwxr-xr-x 1 root root     13152 Apr  9 21:52 jexec
drwxr-xr-x 2 root root      4096 Jul  1 09:23 jfr
-rw-r--r-- 1 root root    110489 Apr 10 06:14 jrt-fs.jar
-rwxr-xr-x 1 root root     18416 Apr  9 21:52 jspawnhelper
-rw-r--r-- 1 root root        29 Apr  9 21:52 jvm.cfg
-rw-r--r-- 1 root root     13456 Apr  9 21:52 libattach.so
-rw-r--r-- 1 root root     39136 Apr  9 21:52 libawt_headless.so
-rw-r--r-- 1 root root    900448 Apr  9 21:52 libawt.so
-rw-r--r-- 1 root root    474600 Apr  9 21:52 libawt_xawt.so
-rw-r--r-- 1 root root     28296 Apr  9 21:52 libdt_socket.so
-rw-r--r-- 1 root root     13480 Apr  9 21:52 libextnet.so
-rw-r--r-- 1 root root   2725752 Apr  9 21:52 libfontmanager.so
-rw-r--r-- 1 root root     50976 Apr  9 21:52 libinstrument.so
... (omitted for brevity)

If the lib/libfreetype.so file is really removed in some newer patch version after 17.0.8, I'd like to know why.
Unforuntately I don't think it is mentioned in any release notes.
And unfortunately, Microsoft does not provide image tag to certain patch versions of their OpenJDK, so it is not possible for me to show a comparison.

Below is the result of Azul Zulu OpenJDK 17.0.11.

Command:

docker container run --rm azul/zulu-openjdk:17.0.11 ls -l /usr/lib/jvm/zulu17-ca-amd64/lib

Results:

total 145068
-rw-r--r-- 1 root root     71685 Apr 11 15:06 classlist
-rw-r--r-- 1 root root   8301503 Apr 11 15:06 ct.sym
-rwxr-xr-x 1 root root     13232 Apr 11 15:06 jexec
drwxr-xr-x 2 root root      4096 Jun 26 04:53 jfr
-rw-r--r-- 1 root root    110515 Apr 11 15:06 jrt-fs.jar
-rwxr-xr-x 1 root root     18416 Apr 11 15:06 jspawnhelper
-rw-r--r-- 1 root root        29 Apr 11 15:06 jvm.cfg
-rw-r--r-- 1 root root     13568 Apr 11 15:06 libattach.so
-rw-r--r-- 1 root root     43384 Apr 11 15:06 libawt_headless.so
-rw-r--r-- 1 root root    892464 Apr 11 15:06 libawt.so
-rw-r--r-- 1 root root    470952 Apr 11 15:06 libawt_xawt.so
-rw-r--r-- 1 root root     28440 Apr 11 15:06 libdt_socket.so
-rw-r--r-- 1 root root     13624 Apr 11 15:06 libextnet.so
-rw-r--r-- 1 root root   2812680 Apr 11 15:06 libfontmanager.so
-rw-r--r-- 1 root root    780008 Apr 11 15:06 libfreetype.so
-rw-r--r-- 1 root root     51152 Apr 11 15:06 libinstrument.so
... (omitted for brevity)

We can see that lib/libfreetype.so is present.

@d3r3kk for triage by one of his team.

Hi Microsoft team, may I know if there is any update?

Hi @blackr1234

I've scanned through our packages and container images. The final report is below. The source of the report is here: https://github.com/brunoborges/findlibfreetype/actions/runs/9848817738

As you can see, except for a few anomalies (1), most of the recent packages do not contain libfreetype.so. This is in alignment with other OpenJDK distributions. libfreetype is no longer bundled with most builds -- see this issue with Adoptium.

Given that not every application requires font rendering, it is up to the user to install freetype fonts at the OS level.

Anomalies

Now, some packages are indeed weird such as package 17.0.8-3 for Ubuntu containing libfreetype.so while older versions 17.0.8-2 and 17.0.8-1 do not contain it. Our build infra team will double check.

All anomalies found:

  • Ubuntu 11.0.20-3 (newer) contains. 11.0.20-2 and 11.0.20-1 do not contain.
  • Ubuntu 17.0.8-3 (newer) contains. 17.0.8-2 and 17.0.8-1 do not contain.

REPORT

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:ubuntu-17

Versions with libfreetype.so:

  • 17.0.8-3
  • 17.0.7-1
  • 17.0.6-1
  • 17.0.5-1
  • 17.0.4.1-1
  • 17.0.4-1
  • 17.0.3+7-LTS-1

Versions without libfreetype.so:

  • 17.0.11-1
  • 17.0.10-1
  • 17.0.9-1
  • 17.0.8.1-1
  • 17.0.8-2
  • 17.0.8-1

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:ubuntu-11

Versions with libfreetype.so:

  • 11.0.20-3
  • 11.0.19-1
  • 11.0.18-1
  • 11.0.17-1
  • 11.0.16-1
  • 11.0.15+10-LTS-1

Versions without libfreetype.so:

  • 11.0.23-1
  • 11.0.22-1
  • 11.0.21-1
  • 11.0.20.1-1
  • 11.0.20-2
  • 11.0.20-1

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:mariner-11

Versions with libfreetype.so:

  • 11.0.13+8_LTS-4
  • 11.0.14.1+1_LTS-31207
  • 11.0.15-1
  • 11.0.16-1
  • 11.0.16.1-1
  • 11.0.17-1
  • 11.0.18-1
  • 11.0.19-1

Versions without libfreetype.so:

  • 11.0.23-1
  • 11.0.20-1
  • 11.0.20.1-1
  • 11.0.21-1
  • 11.0.22-1
  • 11.0.23-1

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:ubuntu-21

Versions with libfreetype.so:

Versions without libfreetype.so:

  • 21.0.3-1
  • 21.0.2-1
  • 21.0.1-1
  • 21.0.0-1

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:mariner-21

Versions with libfreetype.so:

Versions without libfreetype.so:

  • 21.0.3-1
  • 21.0.0-1
  • 21.0.1-1
  • 21.0.2-1
  • 21.0.3-1

Report of libfreetype.so in mcr.microsoft.com/openjdk/jdk:mariner-17

Versions with libfreetype.so:

  • 17.0.4-1
  • 17.0.4.1-1
  • 17.0.5-1
  • 17.0.6-1
  • 17.0.7-1

Versions without libfreetype.so:

  • 17.0.11-1
  • 17.0.8-1
  • 17.0.8.1-1
  • 17.0.9-1
  • 17.0.10-1
  • 17.0.11-1

More for reference:

  • "We'd follow OpenJDK by doing so. Both Oracle's builds provided on jdk.java.net as well as Red Hat's builds for Linux come without libfreetype." -- adoptium/temurin-build#2133

@blackr1234 I am closing this for now. We are no longer bundling libfreetype.so in our Linux JDKs. Let me know if you have further questions.