#1011567 android-framework-23: FTBFS with OpenJDK 17 due to com.sun.javadoc removal

#1011567#5
Date:
2022-05-24 22:31:44 UTC
From:
To:
android-framework-23 fails to build with OpenJDK 17, Doclava no longer
works due to the removal of the com.sun.javadoc API:


  :android:stubs
  Putting task artifact state for task ':android:stubs' into context took 0.013 secs.
  :uiautomator:processResources (Thread[Task worker for ':' Thread 2,5,main]) started.
  :uiautomator:processResources
  Putting task artifact state for task ':uiautomator:processResources' into context took 0.0 secs.
  Up-to-date check for task ':android:stubs' took 0.004 secs. It is not up-to-date because:
    No history is available.
  file or directory '/<<PKGBUILDDIR>>/debian/out/uiautomator/src/main/resources', not found
  Skipping task ':uiautomator:processResources' as it has no source files and no previous output files.
  :uiautomator:processResources NO-SOURCE
  :uiautomator:processResources (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.011 secs.
  :uiautomator:debianMavenPom (Thread[Task worker for ':' Thread 2,5,main]) started.
  :uiautomator:debianMavenPom
  Putting task artifact state for task ':uiautomator:debianMavenPom' into context took 0.0 secs.
  file or directory '/<<PKGBUILDDIR>>/debian/out/android/src/forStubs/java', not found
  Up-to-date check for task ':uiautomator:debianMavenPom' took 0.001 secs. It is not up-to-date because:
    No history is available.
          Generating pom file /<<PKGBUILDDIR>>/debian/out/uiautomator/build/debian/uiautomator.pom
  :uiautomator:debianMavenPom (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.104 secs.
          Loading the Maven rules...
          Passing through com.google.doclava:doclava:jar:debian
          Passing through com.google.guava:guava:jar:debian
          Passing through com.google.guava:guava-parent:jar:debian
          Passing through com.google.jsilver:jsilver:jar:debian
          Passing through org.antlr:antlr-runtime:jar:3.x
          Passing through org.antlr:antlr-master:jar:3.x
          Passing through org.ccil.cowan.tagsoup:tagsoup:jar:debian
          Passing through org.jsr-305:jsr305:jar:0.x
  Error: Unable to initialize main class com.google.doclava.Doclava
  Caused by: java.lang.NoClassDefFoundError: com/sun/javadoc/Doc
  :android:stubs FAILED
  :android:stubs (Thread[Task worker for ':',5,main]) completed. Took 0.478 secs.

  FAILURE: Build failed with an exception.

#1011567#14
Date:
2022-12-21 05:47:00 UTC
From:
To:
[Emmanuel Bourg]

Is there any hope to have this fixed for bookworm?  This bug block the
Android SDK to entering testing.

#1011567#19
Date:
2023-02-13 15:37:37 UTC
From:
To:
Looks like doclava would need to be ported to use the API that replaces
com.sun.javadoc:

https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration

If someone does the migration, I can take care of the packaging updates.

#1011567#34
Date:
2025-10-08 05:32:41 UTC
From:
To:
Hi,

we have

  #1011567: android-framework-23: FTBFS with OpenJDK 17 due to com.sun.javadoc removal
  #1012103: android-platform-external-doclava: FTBFS with OpenJDK 17 due to com.sun.javadoc removal

(and maybe more related packages).  It seems the

Hans-Christoph Steiner <hans@eds.org> wrote[1]

  Looks like doclava would need to be ported to use the API that replaces
  com.sun.javadoc:
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration
  If someone does the migration, I can take care of the packaging updates.

Thank you Hans-Christian I would help as well but as you analysed in the
android-platform-external-doclava bug report[2]

  Doclava, which does not work with Java newer than 11.  Upstream still builds it
  with java8. As in Android 13 still uses java8 in the build.  Is there any hope?

I've checked upstream Git[3] and found this commit

commit c8be8c65ab9dab2c4d3ec6ee2e717a3fae01c93d
Author: Nikita Iashchenko <nikitai@google.com>
Date:   Mon Feb 6 15:47:35 2023 +0000

    doclava17: Update gradle build/test infrastructure

    Root project has two subprojects that share common doclava
    sources except Doclava.java: 'doclava8' for original build
    with jdk11, and 'doclava17' – with new com.sun.javadoc
    implementation and building/running with jdk17.

    Also added an end-to-end test target e2eTestAOSP that runs
    old and new doclavas on same set of inputs for easier
    debugging and comparison.

    Bug: 260694901
    Test: ./gradlew doclava17:test
    Test: ./gradlew e2eTestAOSP
    Test: ./gradlew :doclava8:e2eTestAOSP :doclava17:e2eTestAOSP
    Merged-In: Iad2aed1940cf293f8766310b21b34cc8885feb2d
    Change-Id: Iad2aed1940cf293f8766310b21b34cc8885feb2d


This is even more recent than

   android-platform-external-doclava (9.0.0+r42-1) experimental
   -- Kai-Chung Yan <seamlik@debian.org>  Wed, 24 Jul 2019 22:27:11 +0200

(which does not build any more as well).  So from my naive point
of view there might be chances that fetching a later upstream
release (I do not understand their versioning scheme) or some
later Git commit might help.

Is there anyone who could have some educated look into this?

Kind regards
   Andreas.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011567#19
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012103#18
[3] https://android.googlesource.com/platform/external/doclava

#1011567#39
Date:
2025-11-09 07:23:24 UTC
From:
To:
Hi,

android-framework-23 has two open RC bugs which are both unanswered
since more than two years.  I wonder if its time to remove this package
from Debian.

If there is no response here in the next 31 days I will ask for removal.

Kind regards
    Andreas.

#1011567#44
Date:
2025-11-12 20:56:47 UTC
From:
To:
Hello Andreas and everyone else,

Andreas Tille <andreas@an3as.eu> writes:

I would be sad to see android-framework-23 getting removed as I'm using
it to build my own Android apps; google-android-*-installer is not an
option because the EULA contains clauses that I cannot agree to. Already
have to figure out what to do about the dalvik-exchange removal [1]; the
replacement tool d8 is not in Debian and is hard to build from source
locally.

On the other hand I do understand the reasoning behind wanting to remove
the package from Debian and unfortunately don't have time to help out
either.

Kudos to everyone involved for maintaining the packages so far; they've
been a huge help!


Sascha

[1] https://bugs.debian.org/1078592

#1011567#49
Date:
2025-11-12 20:56:47 UTC
From:
To:
Hello Andreas and everyone else,

Andreas Tille <andreas@an3as.eu> writes:

I would be sad to see android-framework-23 getting removed as I'm using
it to build my own Android apps; google-android-*-installer is not an
option because the EULA contains clauses that I cannot agree to. Already
have to figure out what to do about the dalvik-exchange removal [1]; the
replacement tool d8 is not in Debian and is hard to build from source
locally.

On the other hand I do understand the reasoning behind wanting to remove
the package from Debian and unfortunately don't have time to help out
either.

Kudos to everyone involved for maintaining the packages so far; they've
been a huge help!


Sascha

[1] https://bugs.debian.org/1078592

#1011567#54
Date:
2026-02-08 13:51:03 UTC
From:
To:
Hi android-framework-23 maintainers,

I filed

   #1122250 RM: android-platform-external-doclava -- RoQA; Not in stable nor old-stable due to RC bug

but Thorsten pointed out the dependency to android-framework-23.  Could
you please give some statement whether you plan to fix the open RC bugs
for android-framework-23 in some way?  Due to open RC bugs this package
has missed two releases and I wonder whether it might be time to ask for
removal of this source package as well.

Kind regards
   Andreas.

Am Tue, Jan 20, 2026 at 06:11:17PM +0000 schrieb Thorsten Alteholz: