Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

OpenJDK 17 on musl+LLVM profile

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

OpenJDK 17 on musl+LLVM profile

  • Quote

Post by yuviazzz » Wed Dec 17, 2025 4:25 pm

Code: Select all

...
checking if date is a GNU compatible version... yes
checking for ulimit... ulimit [builtin]
checking bash version... 5.3.9
checking if bash supports pipefail... yes
checking if bash supports errexit (-e)... yes
checking for x86_64-pc-linux-musl-pkg-config... /usr/bin/x86_64-pc-linux-musl-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for default LOG value... 
checking if packaged modules are kept... enabled, default
checking for version string... 17.0.17+10
configure: error: The path of BOOT_JDK_ARG, which resolves as "/var/tmp/portage/dev-java/openjdk-17.0.17_p10/work/openjdk-bootstrap-", is not found.
configure exiting with result code 1

Code: Select all

dev-java/openjdk-17.0.17_p10  USE="alsa jbootstrap (-big-endian) -cups -debug -doc -examples -headless-awt (-javafx) (-selinux) -source -system-bootstrap (-systemtap)"
as far as i know, openjdk needs an already built jdk to build, and the process of finding one that works with my system is not an appealing thing . .

what to do?
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Wed Dec 17, 2025 4:45 pm

Why is this on "Unsupported Software"? is this ebuild not from ::gentoo?
yuviazzz wrote:

Code: Select all

dev-java/openjdk-17.0.17_p10  USE="alsa jbootstrap (-big-endian) -cups -debug -doc -examples -headless-awt (-javafx) (-selinux) -source -system-bootstrap (-systemtap)"
According to Gentoo USE flags

Code: Select all

gentoo ~ # quse -D jbootstrap
dev-java/openjdk[jbootstrap] Build OpenJDK twice, the second time using the result of the first

Code: Select all

quse -D system-bootstrap
dev-java/openjdk[system-bootstrap] Bootstrap using installed openjdk
So may be you want to enable this flag and down a jdk that support musl for example zulu jdk?
Top
grknight
Retired Dev
Retired Dev
Posts: 2549
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Wed Dec 17, 2025 5:14 pm

pingtoo wrote:

Code: Select all

quse -D system-bootstrap
dev-java/openjdk[system-bootstrap] Bootstrap using installed openjdk
So may be you want to enable this flag and down a jdk that support musl for example zulu jdk?
AFAICT, system-bootstrap USE looks for dev-java/openjdk-bin:17 (in this case) or dies if not installed and available to use.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Wed Dec 17, 2025 5:23 pm

grknight wrote:
pingtoo wrote:

Code: Select all

quse -D system-bootstrap
dev-java/openjdk[system-bootstrap] Bootstrap using installed openjdk
So may be you want to enable this flag and down a jdk that support musl for example zulu jdk?
AFAICT, system-bootstrap USE looks for dev-java/openjdk-bin:17 (in this case) or dies if not installed and available to use.
OK, thanks for the information.

So does disable (-system-bootstrap) and use the downloaded JDK (external to Portage system) will work?
Top
grknight
Retired Dev
Retired Dev
Posts: 2549
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Wed Dec 17, 2025 5:29 pm

pingtoo wrote:So does disable (-system-bootstrap) and use the downloaded JDK (external to Portage system) will work?
No, only Gentoo packages (many arches) or Gentoo developer built bootstraps (for arm64-musl, ppc64, riscv, or x86 only):

Code: Select all

# variable name format: <UPPERCASE_KEYWORD>_XPAK
ARM64_XPAK="17.0.2_p8" # musl bootstrap install
PPC64_XPAK="17.0.1_p12" # big-endian bootstrap tarball
RISCV_XPAK="17.0.3_p7"
X86_XPAK="17.0.1_p12"

src_configure() {
        local myconf=()

        if has_version dev-java/openjdk:${SLOT}; then
                export JDK_HOME=${BROOT}/usr/$(get_libdir)/openjdk-${SLOT}
        elif use !system-bootstrap ; then
                local xpakvar="${ARCH^^}_XPAK"
                export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
        else
                JDK_HOME=$(best_version -b dev-java/openjdk-bin:${SLOT})
                [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
                JDK_HOME=${JDK_HOME#*/}
                JDK_HOME=${BROOT}/opt/${JDK_HOME%-r*}
                export JDK_HOME
        fi
...
}
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Wed Dec 17, 2025 6:44 pm

grknight wrote:
pingtoo wrote:So does disable (-system-bootstrap) and use the downloaded JDK (external to Portage system) will work?
No, only Gentoo packages (many arches) or Gentoo developer built bootstraps (for arm64-musl, ppc64, riscv, or x86 only):

Code: Select all

# variable name format: <UPPERCASE_KEYWORD>_XPAK
ARM64_XPAK="17.0.2_p8" # musl bootstrap install
PPC64_XPAK="17.0.1_p12" # big-endian bootstrap tarball
RISCV_XPAK="17.0.3_p7"
X86_XPAK="17.0.1_p12"

src_configure() {
        local myconf=()

        if has_version dev-java/openjdk:${SLOT}; then
                export JDK_HOME=${BROOT}/usr/$(get_libdir)/openjdk-${SLOT}
        elif use !system-bootstrap ; then
                local xpakvar="${ARCH^^}_XPAK"
                export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
        else
                JDK_HOME=$(best_version -b dev-java/openjdk-bin:${SLOT})
                [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
                JDK_HOME=${JDK_HOME#*/}
                JDK_HOME=${BROOT}/opt/${JDK_HOME%-r*}
                export JDK_HOME
        fi
...
}
Thanks for the detail explain.
Top
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

  • Quote

Post by yuviazzz » Thu Dec 18, 2025 12:33 pm

pingtoo wrote:So may be you want to enable this flag and down a jdk that support musl for example zulu jdk?

Code: Select all

ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'sysThreadAvailableStackWithSlack' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ26WB_AsyncHandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN12JvmtiEnvBase27check_for_periodic_clean_upEvE28ThreadInsideIterationClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15G1RemSetSummary6updateEvE11CollectData' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet22set_active_all_threadsEbbE22SetThreadActiveClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet23abandon_partial_markingEvE25AbandonThreadQueueClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN18G1ConcurrentRefine30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet12abandon_logsEvE23AbandonThreadLogClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet16concatenate_logsEvE27ConcatenateThreadLogClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7Threads25change_thread_claim_tokenEvE11ResetClaims' failed: symbol not defined
i get a build failure when trying to build openjdk:17. (with openjdk-bin:17 unmasked and installed)
https://0x0.st/Prh0.log.gz is the gzipped build log (uncompressed log is about 20MB)
pingtoo wrote:Why is this on "Unsupported Software"? is this ebuild not from ::gentoo?
sorry . . :oops:
Top
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

  • Quote

Post by yuviazzz » Thu Dec 18, 2025 2:12 pm

idea: test in chroot!
result: in glibc+gcc chroot, openjdk:17 builds just fine, with bfd linker.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Thu Dec 18, 2025 2:17 pm

yuviazzz wrote:
pingtoo wrote:So may be you want to enable this flag and down a jdk that support musl for example zulu jdk?

Code: Select all

ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'sysThreadAvailableStackWithSlack' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ26WB_AsyncHandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN12JvmtiEnvBase27check_for_periodic_clean_upEvE28ThreadInsideIterationClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15G1RemSetSummary6updateEvE11CollectData' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet22set_active_all_threadsEbbE22SetThreadActiveClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet23abandon_partial_markingEvE25AbandonThreadQueueClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN18G1ConcurrentRefine30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet12abandon_logsEvE23AbandonThreadLogClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet16concatenate_logsEvE27ConcatenateThreadLogClosure' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7Threads25change_thread_claim_tokenEvE11ResetClaims' failed: symbol not defined
i get a build failure when trying to build openjdk:17. (with openjdk-bin:17 unmasked and installed)
https://0x0.st/Prh0.log.gz is the gzipped build log (uncompressed log is about 20MB)
May be bug 922147 address the problem.
pingtoo wrote:Why is this on "Unsupported Software"? is this ebuild not from ::gentoo?
sorry . . :oops:
No need to apology. I am just want to be sure it is not referencing something outside of ::gentoo.
Top
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

  • Quote

Post by yuviazzz » Wed Dec 24, 2025 11:43 am

Code: Select all

ld.lld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'sysThreadAvailableStackWithSlack' failed: symbol not defined
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
with the openjdk 17 patch from the bug report
im walking around this temporarily with a chroot . .
Top
Zucca
Moderator
Moderator
User avatar
Posts: 4677
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Wed Dec 24, 2025 12:59 pm

yuviazzz wrote:im walking around this temporarily with a chroot . .
You could emerge it there (chroot) with --build-pkg, then emerge it on the host system with --use-pkg.
Then afterwards, try to rebuild it on the host.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
Asch
Tux's lil' helper
Tux's lil' helper
Posts: 85
Joined: Wed Jan 20, 2010 1:10 pm
Location: Nowhere special

  • Quote

Post by Asch » Wed Dec 24, 2025 2:02 pm

I recall successfully emerging and using openjdk here: https://github.com/clang-musl-overlay/c ... va/openjdk That's probably because of some patch I got from Alpine, FreeBSD or somewhere else. I normally would comment properly some env tweaking added to the ebuild proper.

IIRC, openjdk-bin would for some unexplainable reason emerge and work fine here. However, I could be recalling something incorrectly here, thus preventing circular dependencies conflict. You could try forcing unmask of openjdk-bin in your profile settings just to see what happens. Your computer is not highly likely to explode because of this. =P
Top
yuviazzz
n00b
n00b
Posts: 32
Joined: Fri Sep 06, 2024 7:23 pm
Location: Sweden

  • Quote

Post by yuviazzz » Thu Jan 08, 2026 7:05 pm

Asch wrote:I recall successfully emerging and using openjdk here: https://github.com/clang-musl-overlay/c ... va/openjdk That's probably because of some patch I got from Alpine, FreeBSD or somewhere else. I normally would comment properly some env tweaking added to the ebuild proper.

IIRC, openjdk-bin would for some unexplainable reason emerge and work fine here. However, I could be recalling something incorrectly here, thus preventing circular dependencies conflict. You could try forcing unmask of openjdk-bin in your profile settings just to see what happens. Your computer is not highly likely to explode because of this. =P
i have gcompat installed (but not as an actual system package :cry:), and im not sure if that is what makes openjdk-bin not die immediately.

the patch in the overlay you link is the same as the one i applied (which failed due to a symbol not being defined)

im stuck still :(
Top
Asch
Tux's lil' helper
Tux's lil' helper
Posts: 85
Joined: Wed Jan 20, 2010 1:10 pm
Location: Nowhere special

  • Quote

Post by Asch » Fri Jan 09, 2026 5:56 pm

I often needed to add -D_LARGEFILE64_SOURCE to *FLAGS in order to compile some packages. I don't know if the latest versions of musl are still accepting the flag, tho.

PS: I never had gcompat installed here and for some oddball reason the bin package worked. And I'm pretty sure it was a musl-based system.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy