ose 4.1.4 compilation issues

Discussions related to using VirtualBox on Linux hosts.

ose 4.1.4 compilation issues

Postby aidar » 3. Nov 2011, 11:47

Emerging VirtualBox 4.1.4 OSE on gentoo here,

it fails with:

Code: Select all   Expand viewCollapse view
/var/tmp/portage/app-emulation/virtualbox-4.1.4/work/VirtualBox-4.1.4_OSE/out/linux.amd64/release/obj/vboxjxpcom-gen/jxpcomgen/java/glue/Helper.java:123: error: name clash: unwrap(List<Integer>) and unwrap(List<Short>) have the same erasure
    public static int[] unwrap(List<Integer> vals) {
                        ^
/var/tmp/portage/app-emulation/virtualbox-4.1.4/work/VirtualBox-4.1.4_OSE/out/linux.amd64/release/obj/vboxjxpcom-gen/jxpcomgen/java/glue/Helper.java:135: error: name clash: unwrap(List<Long>) and unwrap(List<Short>) have the same erasure
    public static long[] unwrap(List<Long> vals) {
                         ^
/var/tmp/portage/app-emulation/virtualbox-4.1.4/work/VirtualBox-4.1.4_OSE/out/linux.amd64/release/obj/vboxjxpcom-gen/jxpcomgen/java/glue/Helper.java:147: error: name clash: unwrap(List<Boolean>) and unwrap(List<Short>) have the same erasure
    public static boolean[] unwrap(List<Boolean> vals) {
                            ^
/var/tmp/portage/app-emulation/virtualbox-4.1.4/work/VirtualBox-4.1.4_OSE/out/linux.amd64/release/obj/vboxjxpcom-gen/jxpcomgen/java/glue/Helper.java:159: error: name clash: unwrap(List<String>) and unwrap(List<Short>) have the same erasure
    public static String[] unwrap(List<String> vals) {



indeed, the src/VBox/Main/glue/glue-java.xsl line 2656 has following, illegal java:
Code: Select all   Expand viewCollapse view
    public static short[] unwrap(List<Short> vals) {
        if (vals==null)
           return null;

        short[] ret = new short[vals.size()];
        int i = 0;
        for (short l : vals) {
                ret[i++] = l;
        }
        return ret;
    }

    public static int[] unwrap(List<Integer> vals) {
        if (vals == null)
           return null;

        int[] ret = new int[vals.size()];
        int i = 0;
        for (int l : vals) {
                ret[i++] = l;
        }
        return ret;
    }

    public static long[] unwrap(List<Long> vals) {
        if (vals == null)
           return null;

        long[] ret = new long[vals.size()];
        int i = 0;
        for (long l : vals) {
                ret[i++] = l;
        }
        return ret;
    }
.
.
.
Some more generic methods with the exact same erasure.


Somebody is sane enough to fix this ?
aidar
 
Posts: 2
Joined: 3. Nov 2011, 11:41
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: none

Re: ose 4.1.4 compilation issues

Postby Perryg » 3. Nov 2011, 14:30

I'm pretty sure the Gentoo people control their portage. See if this can help. http://www.gentoo.org/main/en/support.xml
Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: ose 4.1.4 compilation issues

Postby MasterKGB » 3. Nov 2011, 15:36

Yes they do ;)

From Gentoo Buglist https://bugs.gentoo.org/show_bug.cgi?id=387039

Try revdep-rebuild or comile without useflag Java
Check your jdk or recompile it

Maybe that Help
MasterKGB
 
Posts: 52
Joined: 24. Jun 2011, 12:16
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: XP, Win7, Linux

Re: ose 4.1.4 compilation issues

Postby aidar » 3. Nov 2011, 19:29

It is a nice to know there is a bug report in gentoo bugzilla, but that is not a gentoo issue at all ! that is something to do with people who write virtualbox, namely that piece of java is not legal java under any jvm > 1.5.0 according to Sun. It is clear violation of java language specification :
http://java.sun.com/docs/books/jls/third_edition/html/classes.html
It is a compile-time error for the body of a class to declare as members two methods with override-equivalent signatures (§8.4.2) (name, number of parameters, and types of any parameters).


have reported a bug report here https://www.virtualbox.org/ticket/9848

So, please, leave comments like "this is xxx(gentoo,any other distribution) issue" out.
aidar
 
Posts: 2
Joined: 3. Nov 2011, 11:41
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: none

Re: ose 4.1.4 compilation issues

Postby sergiomb » 1. Dec 2011, 03:22

the fix is not difficult
just change unwrap(List<Integer> vals
to unwrapi
unwrap(List<long
to
unwrapl
an so on
and after that go to glue dir and when call unwarp see if should be unwrapi , unwrapl etc
sergiomb
 
Posts: 4
Joined: 1. Dec 2011, 03:11
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: windows


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 20 guests