Porting 1.0.b1 to hpux 10.10

Even Holen kaffe@rufus.w3.org
Fri, 24 Jul 1998 03:59:27 +0200


--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=us-ascii

Hi there!

This evening I've been playing around compiling Kaffe on approx. 18
different platforms. Some functioned, and some didn't. One of the ones
which I didn't get to work was the one hpux 10.10.

After plundering a little I came up with some changes which enabled me
to compile everything and to install everything. But when trying to
do a 'make test' things crashed. Start of output is:
  make[1]: Entering directory
  `/store/store/iq/kaffe-c/src-1.0.b1-hpux10/test'
  *** Running tests
  ./TestScript[3]: 17336 Abort(coredump)
  error running
    Should have got:
  Hello World!
    But got instead:
  ./systems/unix-jthreads/internal.c:114: failed assertion `mainthread'
  -n HelloWorldApp ... 

And this is after correcting an erroneous sharedlib-path within Kaffe.
chatr Kaffe gives among other lines: 
           shared library list:
             dynamic   ../kaffevm/libkaffevm.sl

In my compilation (that is: './configure --prefix=/store/kaffe') it
should have been: /store/kaffe/lib 

I've added the patches I've done to the source to make it compile as
an attachment to this email.

So therefore my questions to the mailing list is: 
1) Do you know how to get rid of the assertion?
2) Do you know how to fix the shared library path in Kaffe?
3) Could someone make a proper change to the distribution to 
   include the patches given?  

The patch concerning toolkit.h seems to be something which need to
be done on at least the following architechtures: sun4os5, sun4os4,
sgi4i3, sgi4i4 and maybe some more.

I will return with more specific information on these when I have 
dug into them some more. 

Regards,
Even Holen
-- 
<><   Even Holen, evenh@pvv.ntnu.no, http://www.pvv.ntnu.no/~evenh/   :-)

--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="hpux.patch"

diff -pr src-1.0.b1-hpux10/config/parisc/hpux/md.h src-1.0.b1-hpux10.fix/config/parisc/hpux/md.h
*** src-1.0.b1-hpux10/config/parisc/hpux/md.h	Tue Jul 14 06:34:05 1998
--- src-1.0.b1-hpux10.fix/config/parisc/hpux/md.h	Thu Jul 23 23:24:50 1998
***************
*** 14,19 ****
   
  #include "parisc/threads.h"
  
! #define	LIBRARYPATH	"SHLIB_PATH"
   
  #endif
--- 14,19 ----
   
  #include "parisc/threads.h"
  
! /* #define	LIBRARYPATH	"SHLIB_PATH" */
   
  #endif
diff -pr src-1.0.b1-hpux10/configure src-1.0.b1-hpux10.fix/configure
*** src-1.0.b1-hpux10/configure	Tue Jul 14 08:54:26 1998
--- src-1.0.b1-hpux10.fix/configure	Fri Jul 24 02:13:56 1998
*************** if test "$LINKLIB" = "" ; then
*** 804,810 ****
  		LINKLIB='$(AR) $(LIB) $(OBJECT)\
  		$(RANLIB) $(LIB)'
  	else
! 		LINKLIB='$(LD) $(LDFLAGS) -o $(LIB) $(OBJECT) $(LDTAIL)'
  	fi
  fi
  
--- 804,810 ----
  		LINKLIB='$(AR) $(LIB) $(OBJECT)\
  		$(RANLIB) $(LIB)'
  	else
! 		LINKLIB='$(LD) -b $(LDFLAGS) -o $(LIB) $(OBJECT)'
  	fi
  fi
  
diff -pr src-1.0.b1-hpux10/configure.in src-1.0.b1-hpux10.fix/configure.in
*** src-1.0.b1-hpux10/configure.in	Tue Jul 14 08:54:23 1998
--- src-1.0.b1-hpux10.fix/configure.in	Fri Jul 24 01:51:13 1998
*************** if test "$LINKLIB" = "" ; then
*** 74,80 ****
  		LINKLIB='$(AR) $(LIB) $(OBJECT)\
  		$(RANLIB) $(LIB)'
  	else
! 		LINKLIB='$(LD) $(LDFLAGS) -o $(LIB) $(OBJECT) $(LDTAIL)'
  	fi
  fi
  
--- 74,80 ----
  		LINKLIB='$(AR) $(LIB) $(OBJECT)\
  		$(RANLIB) $(LIB)'
  	else
! 		LINKLIB='$(LD) -b $(LDFLAGS) -o $(LIB) $(OBJECT) $(LDTAIL)'
  	fi
  fi
  
diff -pr src-1.0.b1-hpux10/kaffe/kaffevm/slib.h src-1.0.b1-hpux10.fix/kaffe/kaffevm/slib.h
*** src-1.0.b1-hpux10/kaffe/kaffevm/slib.h	Tue Jul 14 06:34:16 1998
--- src-1.0.b1-hpux10.fix/kaffe/kaffevm/slib.h	Thu Jul 23 23:28:31 1998
*************** char* dlerror(void);
*** 80,91 ****
  #define	LIBRARYLOAD(HAND, LIB)						\
  	HAND = shl_load(LIB, BIND_DEFERRED, 0L)
  #define	LIBRARYFUNCTION(FUNC, SYM)					\
! 	{								\
  		shl_t all_libs = 0;					\
  		if (shl_findsym(&all_libs,SYM,TYPE_PROCEDURE,&FUNC) == 0) { \
  			break;						\
  		}							\
! 	}
  #define	LIBRARYHANDLE	shl_t
  #define	LIBRARYERROR()	"No specific error support"
  #endif
--- 80,91 ----
  #define	LIBRARYLOAD(HAND, LIB)						\
  	HAND = shl_load(LIB, BIND_DEFERRED, 0L)
  #define	LIBRARYFUNCTION(FUNC, SYM)					\
! 	do {								\
  		shl_t all_libs = 0;					\
  		if (shl_findsym(&all_libs,SYM,TYPE_PROCEDURE,&FUNC) == 0) { \
  			break;						\
  		}							\
! 	} while(0)
  #define	LIBRARYHANDLE	shl_t
  #define	LIBRARYERROR()	"No specific error support"
  #endif
*** src-1.0.b1-hpux10/libraries/clib/awt/X/toolkit.h	Thu Jul 23 21:52:32 1998
--- src-1.0.b1-hpux10.fix/libraries/clib/awt/X/toolkit.h	Fri Jul 24 03:50:44 1998
***************
*** 12,20 ****
  #define __toolkit_h
  
  #include <X11/Xlib.h>
- #include <jni.h>
  #include <stdlib.h>
  
  
  /*******************************************************************************
   *
--- 12,20 ----
  #define __toolkit_h
  
  #include <X11/Xlib.h>
  #include <stdlib.h>
  
+ #include <jni.h>
  
  /*******************************************************************************
   *

--opJtzjQTFsWo+cga--