public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: building libgcj on solaris
  2000-04-01  0:00 building libgcj on solaris Charlie McDowell
@ 2000-04-01  0:00 ` Tom Tromey
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Charlie McDowell; +Cc: java-discuss

>>>>> "Charlie" == Charlie McDowell <charlie@cse.ucsc.edu> writes:

Charlie> I'm using gcc 2.8.1.

You can't use this.

Charlie> I'm trying to build libgcj-2.95.1.

In order to build libgcj 2.95.1 you need gcc 2.95.1.

Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* building libgcj on solaris
@ 2000-04-01  0:00 Charlie McDowell
  2000-04-01  0:00 ` Tom Tromey
  0 siblings, 1 reply; 10+ messages in thread
From: Charlie McDowell @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

I saw a number of build problems in the archive but couldn't find this
one.
I'm running on Solaris 2.6.
I'm using gcc 2.8.1.
Im using ld 2.6 (with BFD 2.6).
I'm trying to build libgcj-2.95.1.

For some reason it doesn't like the -fpermissive option.

make[2]: Entering directory
`/projects/learning/usr/java/libgcj-objdir/sparc-sun-solaris2.6/libjava'

/bin/sh ./libtool --mode=compile c++ -DHAVE_CONFIG_H -I.
-I../../../libgcj-2.95.1/libjava -I./include -Iinclude
-I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc  -DSILENT=1
-DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib   -fno-rtti -fvtable-thunks
-fpermissive   -W -Wall -g -O2 -g0 -c
../../../libgcj-2.95.1/libjava/prims.cc
rm -f .libs/prims.lo
c++ -DHAVE_CONFIG_H -I. -I../../../libgcj-2.95.1/libjava -I./include
-Iinclude -I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc -DSILENT=1
-DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib -fno-rtti -fvtable-thunks
-fpermissive -W -Wall -g -O2 -g0 -Wp,-MD,.deps/prims.pp -c  -fPIC -DPIC
../../../libgcj-2.95.1/libjava/prims.cc -o .libs/prims.lo
cc1plus: Invalid option `-fpermissive'

Even after removing that, I get another problem. I'm sorry but I'm not
familiar with namespaces and some
C++ features that appear to be used. After eliminating the -fpermissive
flag I get:

c++ -DHAVE_CONFIG_H -I. -I../../../libgcj-2.95.1/libjava -I./include
-Iinclude -I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc -DSILENT=1
-DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib -fno-rtti -fvtable-thunks -W
-Wall -g -O2 -g0 -Wp,-MD,.deps/prims.pp -c  -fPIC -DPIC
../../../libgcj-2.95.1/libjava/prims.cc -o .libs/prims.lo
In file included from
../../../libgcj-2.95.1/libjava/java/lang/Object.h:16,
                 from ../../../libgcj-2.95.1/libjava/include/cni.h:16,
                 from ../../../libgcj-2.95.1/libjava/prims.cc:20:
../../../libgcj-2.95.1/libjava/include/javaprims.h:21: language string
`"Java"' not recognized
../../../libgcj-2.95.1/libjava/include/javaprims.h:23: syntax error
before `;'
...

When I examine javaprims.h, I don't know what to make of it. Line 21 is
the extern "Java" line.

// To force selection of correct types that will mangle consistently
// across platforms.
extern "Java"
{
  typedef __java_byte jbyte;
  typedef __java_short jshort;
  typedef __java_int jint;


Any help would be greatly appreciated.


--
Charlie McDowell, Professor   (831) 459-4772 (w)
Computer Science Department       (831) 427-2076 (h)
239 Baskin Engineering                          (831) 459-4829 (fax)
Univ. of Calif., Santa Cruz, CA 95064
http://www.cse.ucsc.edu/~charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* re: building libgcj on solaris
@ 2000-04-01  0:00 Charlie McDowell
  2000-04-01  0:00 ` Tom Tromey
  0 siblings, 1 reply; 10+ messages in thread
From: Charlie McDowell @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

I'm running on Solaris 2.6.
I'm trying to build libgcj-2.95.1.

The error I get is:

gcc -shared  adler32.lo compress.lo crc32.lo deflate.lo gzio.lo
infblock.lo infcodes.lo inffast.lo inflate.lo inftrees.lo infutil.lo
trees.lo uncompr.lo zutil.lo  -lc  -Wl,-soname -Wl,libzgcj.so.0 -o
.libs/libzgcj.so.0.0.0
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file libzgcj.so.0: cannot open file: No such file or
directory
ld: fatal: File processing errors. No output written to
.libs/libzgcj.so.0.0.0
collect2: ld returned 1 exit status
make[1]: *** [libzgcj.la] Error 1
make[1]: Leaving directory
`/projects/learning/usr/java/libgcj-objdir/sparc-sun-solaris2.6/zlib'

--
Charlie McDowell, Professor                     (831) 459-4772 (w)
Computer Science Department                     (831) 427-2076 (h)
239 Applied Sciences                            (831) 459-4829 (fax)
Univ. of Calif., Santa Cruz, CA 95064
http://www.cse.ucsc.edu/~charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: building libgcj on solaris
  2000-04-01  0:00   ` Joerg Brunsmann
@ 2000-04-01  0:00     ` Tom Tromey
  2000-04-01  0:00       ` Alexandre Petit-Bianco
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Joerg Brunsmann; +Cc: java-discuss, charlie

>>>>> "Joerg" == Joerg Brunsmann <joerg.brunsmann@FernUni-Hagen.de> writes:

Joerg> If you do this with egcs-20000221 and
Joerg> libgcj-snapshot-2000-02-23 on Solaris 2.7 you need to "#ifdef
Joerg> INTERPRETER" out the body of _Jv_JNI_RegisterNatives in
Joerg> jni.cc.

Dude, please report these things!  Until we get some sort of nice
testing infrastructure set up, which could be a while, bugs like this
only get fixed if the person who notices them sends a report.

In some cases, like this one, I can fix the bug immediately...

Joerg> ../../../libjava/java/math/BigInteger.java: In class `java.math.BigInteger':
Joerg> ../../../libjava/java/math/BigInteger.java: In method `isProbablePrime(int)':
Joerg> ../../../libjava/java/math/BigInteger.java:1287: internal error in check-init: tree code not implemented: abs_expr

I thought Alex had a patch for this.
Maybe I'm confused.

Joerg> In file included from ../../../libjava/java/lang/natDouble.cc:32:
Joerg> java/lang/Double.h:39: `Infinity' was not declared in this scope
Joerg> java/lang/Double.h:40: `Infinity' was not declared in this scope

This one I probably can't fix immediately.  I'll have to investigate.

Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* re: building libgcj on solaris
  2000-04-01  0:00 Charlie McDowell
@ 2000-04-01  0:00 ` Tom Tromey
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Charlie McDowell; +Cc: java-discuss

>>>>> "Charlie" == Charlie McDowell <charlie@cse.ucsc.edu> writes:

Charlie> I'm running on Solaris 2.6.
Charlie> I'm trying to build libgcj-2.95.1.

Charlie> ld: warning: option -o appears more than once, first setting taken

This is in the FAQ.
You have to use the GNU linker on Solaris.

Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: building libgcj on solaris
  2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00   ` Charlie McDowell
@ 2000-04-01  0:00   ` Joerg Brunsmann
  2000-04-01  0:00     ` Tom Tromey
  1 sibling, 1 reply; 10+ messages in thread
From: Joerg Brunsmann @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss; +Cc: charlie

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

Hi,

I never had problems with cpp, but perhaps cpp is found in "/usr/ccs/lib". 
You might want to remove this from your path. If this doesn't help I
suggest to build from snapshot. If you don't know how to build from
snapshots, please look in the FAQ. If you do this with
egcs-20000221 and libgcj-snapshot-2000-02-23 on Solaris 2.7 you need
to "#ifdef INTERPRETER" out the body of _Jv_JNI_RegisterNatives in
jni.cc. Then you get:

../../../libjava/java/math/BigInteger.java: In class `java.math.BigInteger':
../../../libjava/java/math/BigInteger.java: In method `isProbablePrime(int)':
../../../libjava/java/math/BigInteger.java:1287: internal error in check-init: tree code not implemented: abs_expr

I deleted the line which causes problems and got:

In file included from ../../../libjava/java/lang/natDouble.cc:32:
java/lang/Double.h:39: `Infinity' was not declared in this scope
java/lang/Double.h:40: `Infinity' was not declared in this scope

Those are defined like this:

  static const jdouble NEGATIVE_INFINITY = -Infinity;
  static const jdouble POSITIVE_INFINITY = Infinity;

I removed these lines and the usage in natDouble.cc and then
libgcj compiled and gcj produced a running HelloWorld.

Hope this helps,

Jörg

^ permalink raw reply	[flat|nested] 10+ messages in thread

* re: building libgcj on solaris
  2000-04-01  0:00 Charlie McDowell
@ 2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00   ` Charlie McDowell
  2000-04-01  0:00   ` Joerg Brunsmann
  0 siblings, 2 replies; 10+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Charlie McDowell; +Cc: java-discuss

>>>>> "Charlie" == Charlie McDowell <charlie@cse.ucsc.edu> writes:

Charlie> I'm still trying. I have now installed the latest binutils,
Charlie> done a clean rebuild and install of gcc-2.95.1 and I still
Charlie> get the following when building libgcj2.95.1 This is
Charlie> sparc-solaris.

Sorry this is such a pain for you.  I don't know why it is, though.

Charlie> cpp: too many input files

Did you have this problem before?  Somehow you got around it, because
you managed to make it to the linker problem.  Do you remember how?

Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: building libgcj on solaris
  2000-04-01  0:00 ` Tom Tromey
@ 2000-04-01  0:00   ` Charlie McDowell
  2000-04-01  0:00   ` Joerg Brunsmann
  1 sibling, 0 replies; 10+ messages in thread
From: Charlie McDowell @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

I redid the c++ -v and received the following:

c++ -v -DHAVE_CONFIG_H -I. -I../../../libgcj-2.95.1/libjava -I./include
-Iinclude -I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc -DSILENT=1
-DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib -fno-rtti -fvtable-thunks
-fpermissive -W -Wall -g -O2 -Wp,-MD,.deps/prims.pp -c -fPIC -DPIC
../../../libgcj-2.95.1/libjava/prims.cc -o .libs/prims.lo
Using builtin specs.
gcc version 2.95.1 19990816 (release)
 cpp -lang-c++ -v -I. -I../../../libgcj-2.95.1/libjava -I./include
-Iinclude -I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib -D__GNUC__=2 -D__GNUG__=2
-D__GNUC_MINOR__=95 -D__cplusplus -Dsparc -Dsun -Dunix -D__svr4__
-D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc
-D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS
-D__OPTIMIZE__ -g -W -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc)
-Amachine(sparc) -DHAVE_CONFIG_H -DSILENT=1 -DNO_SIGNALS=1
-DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1 -DPIC -MD .deps/prims.pp
../../../libgcj-2.95.1/libjava/prims.cc /var/tmp/ccFhXyvB.ii
cpp: too many input files

--
Charlie McDowell, Professor   (831) 459-4772 (w)
Computer Science Department       (831) 427-2076 (h)
239 Baskin Engineering                          (831) 459-4829 (fax)
Univ. of Calif., Santa Cruz, CA 95064
http://www.cse.ucsc.edu/~charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: building libgcj on solaris
  2000-04-01  0:00     ` Tom Tromey
@ 2000-04-01  0:00       ` Alexandre Petit-Bianco
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Petit-Bianco @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Joerg Brunsmann, java-discuss, charlie

Tom Tromey writes:

> I thought Alex had a patch for this.  Maybe I'm confused.

Not for egcs, but I can craft one.

./A

Fri Feb 25 17:07:49 2000  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* check-init.c (check_init): Handle ABS_EXPR.

Index: check-init.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/check-init.c,v
retrieving revision 1.17
diff -u -p -r1.17 check-init.c
--- check-init.c        2000/01/21 20:57:00     1.17
+++ check-init.c        2000/02/26 01:07:34
@@ -622,6 +617,7 @@ check_init (exp, before)
     case POSTDECREMENT_EXPR:
     case POSTINCREMENT_EXPR:
     case NON_LVALUE_EXPR:
+    case ABS_EXPR:
     case INSTANCEOF_EXPR:
       /* Avoid needless recursion. */
       exp = TREE_OPERAND (exp, 0);

^ permalink raw reply	[flat|nested] 10+ messages in thread

* re: building libgcj on solaris
@ 2000-04-01  0:00 Charlie McDowell
  2000-04-01  0:00 ` Tom Tromey
  0 siblings, 1 reply; 10+ messages in thread
From: Charlie McDowell @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

I'm still trying. I have now installed the latest binutils, done a clean
rebuild and install of gcc-2.95.1 and I still
get the following when building libgcj2.95.1
This is sparc-solaris.

c++ -DHAVE_CONFIG_H -I. -I../../../libgcj-2.95.1/libjava -I./include
-Iinclude -I../../../libgcj-2.95.1/libjava/include
-I../../../libgcj-2.95.1/libjava/../boehm-gc -I./../boehm-gc -DSILENT=1
-DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1
-I../../../libgcj-2.95.1/libjava/../compat-include
-I../../../libgcj-2.95.1/libjava/../zlib -fno-rtti -fvtable-thunks
-fpermissive -W -Wall -g -O2 -Wp,-MD,.deps/prims.pp -c  -fPIC -DPIC
../../../libgcj-2.95.1/libjava/prims.cc -o .libs/prims.lo
cpp: too many input files
make[1]: *** [prims.lo] Error 1
make[1]: Leaving directory
`/projects/learning/usr/java/libgcj-objdir/sparc-sun-solaris2.6/libjava'

make: *** [all-recursive] Error 1

To confirm the tools I'm using I offer the following:

sundance>which ld
/projects/learning/usr/java/bin/ld
sundance>ld -v
GNU ld version 2.9.5 (with BFD 000222)
sundance>which c++
/projects/learning/usr/java/bin/c++
sundance>c++ -v
Using builtin specs.
gcc version 2.95.1 19990816 (release)



--
Charlie McDowell, Professor   (831) 459-4772 (w)
Computer Science Department       (831) 427-2076 (h)
239 Baskin Engineering                          (831) 459-4829 (fax)
Univ. of Calif., Santa Cruz, CA 95064
http://www.cse.ucsc.edu/~charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01  0:00 building libgcj on solaris Charlie McDowell
2000-04-01  0:00 ` Tom Tromey
2000-04-01  0:00 Charlie McDowell
2000-04-01  0:00 ` Tom Tromey
2000-04-01  0:00   ` Charlie McDowell
2000-04-01  0:00   ` Joerg Brunsmann
2000-04-01  0:00     ` Tom Tromey
2000-04-01  0:00       ` Alexandre Petit-Bianco
2000-04-01  0:00 Charlie McDowell
2000-04-01  0:00 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).