This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

instalation problem


Hi,

I am trying to get a fairly vanilla gjc going on Solaris
(sparc-sun-solaris2.7) but am getting segementation faults as soon as
it tries to start up the run-time system on a trivial Hello program
(that runs fine on a Sun JVM when compiled with `gcj -C'):

	(gdb) run
	Starting program: /home/cdornan/progs/a.out 

	Program received signal SIGSEGV, Segmentation fault.
	0xff14f5f0 in GC_find_limit (p=0xffbef57c "", up=1)
	    at ../../../libgcj-2.95.1/boehm-gc/os_dep.c:681
	681                     GC_noop1((word)(*result));

I am using gcc-2.95.2 and libgcc-2.95.1.  (I tried to build
libgcc-2.95.1 with gcc-2.95.1 but ran into header file problems.)

I configured gcc-2.95.2 with

	--enable-threads

but didn't enable threads for libgcj-2.95.1.

When I do a clean rebuild with

	--enable-threads=posix

it gives me a link error:

	Undefined                       first referenced
	 symbol                             in file
	sched_yield                         /export/home/cdornan/gnu/gcc-2.95.2/lib/libgcj.so
	ld: fatal: Symbol referencing errors. No output written to a.out
	collect2: ld returned 1 exit status

(I have attached the full verbose gcj report to the end of this message.)

My questions are:

  * What is most likely to be going wrong?  Is there an easy fix?

  * What is the surest, quickest way to get a plain gcj/libgcj that
    produces working ELF executables?  Should I disable threads when
    building gcc?  Would I be better building on Linux?

  * If I build gcc with threads enabled, can I build libgcj without
    threads?

  * Should I have specified `-enable-threads=posix' while building
    gcc?

Any help, much appreciated.

Chris Dornan
cdornan@arm.com


--------- `gcj -v' output ---------


$ gcj -v --main=Hello Hello.java
Reading specs from /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
Reading specs from /export/home/cdornan/gnu/gcc-2.95.2/lib/libgcj.spec
rename spec lib to liborig
gcc version 2.95.2 19991024 (release)
 /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/jc1 Hello.java -quiet -g1 -version -o /var/tmp/ccnfRN5X.s
GNU Java version 2.95.2 19991024 (release) (sparc-sun-solaris2.7) compiled by GNU C version 2.95.2 19991024 (release).
 /usr/ccs/bin/as -V -Qy -s -o /var/tmp/ccw4KroS.o /var/tmp/ccnfRN5X.s
/usr/ccs/bin/as: WorkShop Compilers 5.0 98/12/21
 /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/jvgenmain Hello /var/tmp/ccXAqziSmain.i
 /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/cc1 /var/tmp/ccXAqziSmain.i -quiet -dumpbase Hello.c -g1 -version -o /var/tmp/ccoXaGNSmain.s
GNU C version 2.95.2 19991024 (release) (sparc-sun-solaris2.7) compiled by GNU C version 2.95.2 19991024 (release).
 /usr/ccs/bin/as -V -Qy -s -o /var/tmp/cc1PgpuYmain.o /var/tmp/ccoXaGNSmain.s
/usr/ccs/bin/as: WorkShop Compilers 5.0 98/12/21
 /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/crt1.o /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/crti.o /usr/ccs/lib/values-Xa.o /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/crtbegin.o -L/export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/export/home/cdornan/gnu/gcc-2.95.2/lib /var/tmp/ccw4KroS.o /var/tmp/cc1PgpuYmain.o -lgcc -lgcj -lm -lgcjgc -lpthread -lzgcj -lsocket -lnsl -ldl -lc -lgcc /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/crtend.o /export/home/cdornan/gnu/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/crtn.o
ld: Software Generation Utilities - Solaris/ELF (3.0)
Undefined                       first referenced
 symbol                             in file
sched_yield                         /export/home/cdornan/gnu/gcc-2.95.2/lib/libgcj.so
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]