compiling /usr/ports/java/jdk15 error

Topic: compiling /usr/ports/java/jdk15 error

From: Vizion <vizion@vizion.occoxmail.com>

Hi

I am compiling the FreeBSD port onto FreeBSD 5.3 and do not have enough experience to identify the cause of the error. I have raised the question on the FreeBSD-java@freebsd.org mailing list but so far noone has been able to help. Thanks in advance

Can anyone please advise what to do next--

Here is the output:

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:220:

<identifier> expected

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:220:

unclosed character literal

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:221:

')' expected

private static final class Aliases

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:380:

<identifier> expected

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:380:

unclosed character literal

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:381:

')' expected

private static final class Classes

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:419:

<identifier> expected

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:419:

unclosed character literal

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:420:

')' expected

private static final class Cache

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:220:

cannot find symbol

symbol : class TM

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:220:

cannot find symbol

symbol : class Java

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:380:

cannot find symbol

symbol : class TM

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:380:

cannot find symbol

symbol : class Java

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:419:

cannot find symbol

symbol : class TM

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:419:

cannot find symbol

symbol : class Java

location: class sun.nio.cs.StandardCharsets

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

../../../src/share/classes/java/io/ObjectStreamClass.java:869: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

return cons.newInstance(null);

^

../../../src/share/classes/java/io/ObjectStreamClass.java:949: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

readObjectNoDataMethod.invoke(obj, null);

^

../../../src/share/classes/java/io/ObjectStreamClass.java:977: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

return writeReplaceMethod.invoke(obj, null);

^

../../../src/share/classes/java/io/ObjectStreamClass.java:1006: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

return readResolveMethod.invoke(obj, null);

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:220:

missing method body, or declare abstract

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:380:

missing method body, or declare abstract

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:419:

missing method body, or declare abstract

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:459:

cannot reference this before supertype constructor has been called

super("sun.nio.cs", new Aliases(), new Classes(), new Cache());

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:459:

cannot reference this before supertype constructor has been called

super("sun.nio.cs", new Aliases(), new Classes(), new Cache());

^

/usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java:459:

cannot reference this before supertype constructor has been called

super("sun.nio.cs", new Aliases(), new Classes(), new Cache());

^

../../../src/share/classes/sun/misc/ProxyGenerator.java:335: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Class for a varargs call

cast to java.lang.Class[] for a non-varargs call and to suppress this warning

hashCodeMethod = Object.class.getMethod("hashCode", null);

^

../../../src/share/classes/sun/misc/ProxyGenerator.java:338: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Class for a varargs call

cast to java.lang.Class[] for a non-varargs call and to suppress this warning

toStringMethod = Object.class.getMethod("toString", null);

^

../../../src/share/classes/sun/security/jca/ProviderConfig.java:243: warning:

non-varargs call of varargs method with inexact argument type for last

parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

obj = cons.newInstance(new String[] { argument });

^

../../../src/share/classes/javax/xml/transform/TransformerException.java:329:

warning: non-varargs call of varargs method with inexact argument type for

last parameter;

cast to java.lang.Class for a varargs call

cast to java.lang.Class[] for a non-varargs call and to suppress this warning

null);

^

../../../src/share/classes/javax/xml/transform/TransformerException.java:334:

warning: non-varargs call of varargs method with inexact argument type for

last parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

exception = (Throwable) meth.invoke(exception, null);

^

../../../src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java:1186:

warning: non-varargs call of varargs method with inexact argument type for

last parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

return (IOException)ctr.newInstance(args);

^

../../../src/share/classes/com/sun/jmx/mbeanserver/StandardMetaDataImpl.java:637:

warning: non-varargs call of varargs method with inexact argument type for

last parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

result = meth.invoke(instance,null);

^

../../../src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiatorImpl.java:162:

warning: non-varargs call of varargs method with inexact argument type for

last parameter;

cast to java.lang.Object for a varargs call

cast to java.lang.Object[] for a non-varargs call and to suppress this warning

moi= cons.newInstance(null);

^

Note: * uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

21 errors

12 warnings

gmake[3]: *** [.compile.classlist] Error 1

gmake[3]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make/java/java'

gmake[2]: *** [all] Error 1

gmake[2]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make/java'

gmake[1]: *** [all] Error 1

gmake[1]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make'

gmake: *** [j2se-build] Error 2

*** Error code 2

Stop in /usr/ports/java/jdk15.

david

--

40 yrs navigating and computing in blue waters.

English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.

Currently in San Diego, CA. Sailing May bound for Europe via Panama Canal.

[11036 byte] By [vizion2a] at [2007-10-1 14:12:56]
# 1

I get exactly, exactly, the same error on 5.4-stable as of today , world and ports cvsupped a day or so ago and world & kernel & all ports rebuilt and/or fresh installed within the last few days.

in my case I have the following in make.conf

CPUTYPE=athlon-xp

CFLAGS=-march=athlon-xp -O -pipe

COPTFLAGS=-O -pipe

NOPROFILE=true

So far I think the opts are good.

I had everything built with all the same except for -O2 and it crashed randomly and often and that's why everything is brand new now :)

-O1 was better but still crashed once or twice a day.

-O seems to be good so far. I've been hitting it with a lot of compiling and a lot of rsync traffic and no crash.

So, if it wasn't for you getting the _exact_ same error, I'd still think it was my opts flags, like lose the athlon-xp, or maybe the actual hardware.

I only see one mention of java at all in /usr/ports/UPDATING and it doesn't look like it should be the cause of this error. It's about the java wrapper script, and I know java is used to build java, but I don't think the makefiles take chances with which specific binary they use when they need one.

nexialista at 2007-7-10 17:38:17 > top of Java-index,Developer Tools,Java Compiler...
# 2

AHA!

look here:

http://lists.freebsd.org/pipermail/freebsd-java/2005-January/003381.html

other posts in that thread mention a simple test, run "java -version" and if linprocfs isn't mounted, or if anything is not good with your linux emulation in general, then you'll get an error message.

The file the poster mentions (he gets the path a little wrong but close enough it was obvious to find the right file) has comments that say it's machine generated, and it contains lines like he described, which just happen to be the same as that error message.

I am about to manually comment out those lines and retry make install,

but by rights this really suggests a clean start over from scratch since who knows what other files were generated badly?

The file is:

file:///usr/ports/java/jdk15/work/control/build/bsd-i586/gensrc/sun/nio/cs/StandardCharsets.java

And the bad lines ar like this:

It's the line in the middle that begins with "Java HotSpot(TM)..."

snip

"cp1257",

"cp5353",

};

Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location

private static final class Aliases

extends sun.util.PreHashedMap<String>

{

private static final int ROWS = 512;

private static final int SIZE = 141;

snip

Enjoy. :)

brian@aljex.com

... posting from an IBM 8361-100 thin client hooked to my plasma tv with a wireless keyboard with touch pad, displaying an xfce4 desktop running on my freebsd box in the cellar...

nexialista at 2007-7-10 17:38:17 > top of Java-index,Developer Tools,Java Compiler...
# 3
it worked
nexialista at 2007-7-10 17:38:17 > top of Java-index,Developer Tools,Java Compiler...