Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481266 - [PATCH] dev-java/icedtea:6 ebuilds incorrectly select CACAO VM on ia64
Summary: [PATCH] dev-java/icedtea:6 ebuilds incorrectly select CACAO VM on ia64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-16 08:36 UTC by Émeric Maschino
Modified: 2015-01-11 18:03 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to select HotSpot (Zero port) VM on ia64 (icedtea-6.1.12.6-use-HotSpot-Zero-VM-on-ia64.patch,481 bytes, patch)
2013-08-16 08:36 UTC, Émeric Maschino
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2013-08-16 08:36:15 UTC
Created attachment 356178 [details, diff]
Patch to select HotSpot (Zero port) VM on ia64

Dear maintainers,

icedtea:6 ebuilds currently read:

	# Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
	# Otherwise use CACAO
	if ! has "${ARCH}" amd64 sparc x86; then
		enable_cacao=yes
	elif use cacao; then
		ewarn 'Enabling CACAO on an architecture with HotSpot support; issues may result.'
		ewarn 'If so, please rebuild with USE="-cacao"'
		enable_cacao=yes
	fi

This ends up selecting CACAO as the default VM when compiling for something else
than amd64, sparc and x86.

Unfortunately, for ia64, the only supported free VM is currently HotSpot (Zero port) [1]. Trying to build IcedTea with the icedtea:6 ebuilds currently in portage obviously fail with a CACAO configure error, since ia64 is not supported.

Simply adding ia64 in icedtea:6 ebuilds to default to HotSpot (thus, Zero port) VM fix the problem. So, e.g. in icedtea-6.1.12.6.ebuild, this would read:

	# Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
	# Otherwise use CACAO
	if ! has "${ARCH}" amd64 ia64 sparc x86; then
		enable_cacao=yes

This is the only modification made by the attached patch. It's noteworthy that this patch is against current icedtea-6.1.12-6.ebuild. Feel free to apply to icedtea-6.1.12-4.ebuild and icedtea-6.1.12-5.ebuild.

BTW, looking at [1] again, HotSpot (Zero port) support is not limited to ia64. Should then the other exotic arches be added like ia64 so that CACAO is not incorrectly selected? For arches supporting several VMs, a deeper refactoring of the selection logics seem required.

     Émeric


[1] http://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
Comment 1 Andrew John Hughes 2014-07-16 21:35:59 UTC
It sounds like we should switch the test around to check specific archs supported by CACAO and JamVM, then fall back. IcedTea already knows to enable Zero on architectures which don't have JITs, and it doesn't make sense to duplicate that logic in the ebuild.
Comment 2 Andrew John Hughes 2015-01-11 18:03:51 UTC
This is now fixed in java overlay. The logic has been synchronised with that in 7, so CACAO is only used on PowerPC machines.