[comp.sys.hp] HPUX 6.5 problems

ruf@Portia.Stanford.EDU (Erik Ruf) (04/21/89)

We just installed HP-UX 6.5 on our cluster of 7 350's and one 360,
and have run into a couple snags:

1.  It appears that the "-tostop" parameter to stty is ignored.  We
    have found this to be an inconvenience because some X programs
    (xterm, gnuemacs) generate a "job attempted tty output - Stopped"
    message when run in the background.  This can be fixed by redirecting
    their output to /dev/null, but doing this on each invocation
    (an fixing each and every one of out users' scripts) is a real pain.   
    Why won't "stty -tostop" do this for us?  Any why is xterm generating
    terminal output anyway?  I don't see any output outside of the
    xterm window...(xterm bug?  pty bug?)

2.  We have the 6.2 X10 release and the 6.5 X11 release, and installed
    both on our 6.5 root volume.  We are experiencing some problems with
    X10 (random bus errors, and missing symbols in libc.a) and don't know
    what to do.  Is the 6.2 X10 code supported under 6.5?  If not, is
    some form of X10 supported?  We have nontrivial amounts of X10-specific
    code which won't be ported to X11 anytime soon.  

    As far as the missing symbols are concerned, we get them when
    compiling gnuemacs18.51 for X10.  The symbols "flag_68010" and
    "flag_fpa" (and 2 or 3 others I can't remember) are not found.  The
    only references to these symbols are in libc.a (not our applications)
    so it must be a bug.  How could a system with undefined symbols get
    released?  Doesn't HP do any integrity checking?

    Actually, flag_68010 was missing in 6.2 also, but we hacked in a 
    dummy assembler file defining it to be the word 0xFFFFFFFF and 
    got things to work.   Now that 4 symbols are missing in 6.5, I don't
    think this sort of fix is appropriate.

    Also, did something change in the domain IPC?  We used to be able to
    start X10 without having to specify DISPLAY explicitly, but now if 
    we don't, it dies.  Doesn't knowe what local:0 means (I think it
    used to use unix:0).

3.  Some of our users claim to be having problems with tset.  I haven't
    confirmed the myself, but wonder of anyone out in net-land has
    has problems with it.

4.  Doing remsh from one cnode to another gives "stty - operation not
    supported" errors and then runs the command anyway.  What's the
    problem?

Advice (expecially from HP) would be appreciated.  We've had so many
X10 problems that we've temporarily gone back to 6.2, but the 6.5
job control would be nice...  Does anyone else out there have X10
going under 6.5?  Does anyone else have 6.5 up at all?

Erik Ruf
Center for Integrated Systems
Stanford University

ruf@dolores.stanford.edu
...{decwrl,ucbvax}!dolores.stanford.edu!ruf
   

    

cunniff@hpfcdc.HP.COM (Ross Cunniff) (04/21/89)

>   As far as the missing symbols are concerned, we get them when
>   compiling gnuemacs18.51 for X10.  The symbols "flag_68010" and
>   "flag_fpa" (and 2 or 3 others I can't remember) are not found.  The
>   only references to these symbols are in libc.a (not our applications)
>   so it must be a bug.  How could a system with undefined symbols get
>   released?  Doesn't HP do any integrity checking?

Don't blame HP.  Blame GNU, who supplies (for some unknown reason)
their own version of crt0.o, the C startup routine.  This is EXTREMELY
system-dependant stuff, and I think it's very inappropriate of them,
and I can't imagine any functionality they could put in crt0.o that
they couldn't put in main() itself (it's their own code, after all).

The symbols flag_68010, flag_68881, flag_fpa, float_loc, float_soft,
and fpa_loc are defined in /lib/crt0.o.  It is likely that this set
will change in future releases.  Link with it, you'll be happy.

>   Actually, flag_68010 was missing in 6.2 also, but we hacked in a 
>   dummy assembler file defining it to be the word 0xFFFFFFFF and 
>   got things to work.   Now that 4 symbols are missing in 6.5, I don't
>   think this sort of fix is appropriate.

No.  Use /lib/crt0.o.

> Erik Ruf
> Center for Integrated Systems
> Stanford University
> ruf@dolores.stanford.edu
> ...{decwrl,ucbvax}!dolores.stanford.edu!ruf
   

				Ross Cunniff
				Hewlett-Packard Colorado Languages Lab
				...{ucbvax,hplabs}!hpfcla!cunniff
				cunniff%hpfcrt@hplabs.HP.COM

rodean@hpfcdc.HP.COM (Bruce Rodean) (04/21/89)

> 4.  Doing remsh from one cnode to another gives "stty - operation not
>     supported" errors and then runs the command anyway.  What's the
>     problem?

Without knowing the exact arguments supplied to remsh, I can only guess
that this is due to the conversion from generic device files to
cnode-specific device files.  If you are passing a device file as an
argument, then you will likely see this sort of behavior.  Read the
update info document (/etc/newconfig/Update_info/to.6.5) for more
details on cnode-specific device files.

Bruce Rodean
rodean%hpfcrn@hplabs.HP.COM

stroyan@hpfcdc.HP.COM (Mike Stroyan) (04/22/89)

>2.  We have the 6.2 X10 release and the 6.5 X11 release, and installed
>    both on our 6.5 root volume.  We are experiencing some problems with
>    X10 (random bus errors, and missing symbols in libc.a) and don't know
>    what to do.  Is the 6.2 X10 code supported under 6.5?  If not, is
>    some form of X10 supported?  We have nontrivial amounts of X10-specific
>    code which won't be ported to X11 anytime soon.  

The 6.2 X10 libraries will not work with the 6.5 compilers and linker.
The HP support organization can provide you with a 6.5 version of the
X10 libraries.

Mike Stroyan, stroyan@hpstryn

milburn@me1.lbl.gov (John Milburn) (04/23/89)

> 4.  Doing remsh from one cnode to another gives "stty - operation not
>     supported" errors and then runs the command anyway.  What's the
>     problem?

This is probably the shell choking on an stty in you .cshrc file.

-jem

fkittred@bbn.com (Fletcher Kittredge) (04/24/89)

In article <1725@Portia.Stanford.EDU> ruf@portia.Stanford.EDU (Erik Ruf) writes:
>We just installed HP-UX 6.5 on our cluster of 7 350's and one 360,
>and have run into a couple snags:
...
...
>4.  Doing remsh from one cnode to another gives "stty - operation not
>    supported" errors and then runs the command anyway.  What's the
>    problem?
>
Check the user's {.cshrc,.profile} files.  If they are executing an stty
command, it could very well be that they are performing a non-valid
operation on a network socket (If you are unclear about what it means
to have an operation not supported on a socket, see socket(2), or
"ARPA Services User's Guide".)   In other words, this is probably
a valid, legal error message.  Personally, I get them all the time
when I rlogin/xterm to my Sun; I find that ignoring the error messages
causes no ill effects.

regards,
fletcher
Fletcher E. Kittredge  fkittred@bbn.com

darrylo@hpnmdla.HP.COM (Darryl Okahata) (04/24/89)

In comp.sys.hp, ruf@Portia.Stanford.EDU (Erik Ruf) writes:

>     As far as the missing symbols are concerned, we get them when
>     compiling gnuemacs18.51 for X10.  The symbols "flag_68010" and
>     "flag_fpa" (and 2 or 3 others I can't remember) are not found.  The
>     only references to these symbols are in libc.a (not our applications)
>     so it must be a bug.  How could a system with undefined symbols get
>     released?  Doesn't HP do any integrity checking?


*******************************************************************************
***** DISCLAIMER: THE FOLLOWING IS THE AUTHOR'S PERSONAL OPINION AND
***** DOES NOT REFLECT THE OPINION OR POLICY OF THE HEWLETT-PACKARD
***** COMPANY.  ALSO, EVERYTHING CONTAINED WITHIN THIS MESSAGE,
***** INCLUDING, BUT NOT LIMITED TO, ANY ANSWERS OR PORTIONS OF COMPUTER
***** PROGRAMS, IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR SUPPORT
***** WHATSOEVER.  NEITHER THE AUTHOR NOR THE HEWLETT-PACKARD COMPANY
***** ACCEPT ANY RESPONSIBILITY FOR THE USE OF THE INFORMATION
***** CONTAINED WITHIN THE FOLLOWING MESSAGE.
*******************************************************************************

     Now that we've just disclaimed that the sun even rises ... :-)

     To get GNU Emacs running on HP-UX 6.5, get a copy of GNU Emacs
V18.53, and apply the patches at the end of this message.  This *should*
properly configure GNU Emacs V18.53 for use with HP-UX 6.5 (i.e., Emacs
should compile without any problems and job control should work
properly).  With luck, I have not left out anything.

     This is being provided because I care about HP's customers.
Although this is being done on my own time, I am willing to answer any
questions about running GNU Emacs on HP-UX.  Just send Email.

     -- Darryl ("shoot the lawyers") Okahata
	Hewlett-Packard, Network Measurements Division
	INTERNET: darrylo%hpnmd@hpcea.HP.COM
	UUCP:	{ hpfcla, hplabs }!hpcea!hpnmd!darrylo




*********************************************
***** THE FOLLOWING IS UNSUPPORTED CODE *****
*********************************************



===============================================================================
*** dist-18.53/src/alloca.s	Fri Jul 15 00:16:04 1988
--- Emacs/src/alloca.s	Mon Apr 17 08:39:01 1989
***************
*** 79,85
   */
  	text
  	set	PROBE,-128	# safety for C frame temporaries
! 	set	MAXREG,10	# d2-d7, a2-a5 may have been saved
  	global	_alloca
  _alloca:
  	mov.l	(%sp)+,%a0	# return addess

--- 79,85 -----
   */
  	text
  	set	PROBE,-128	# safety for C frame temporaries
! 	set	MAXREG,22	# d2-d7, a2-a5, fp0-fp7 may have been saved
  	global	_alloca
  _alloca:
  	mov.l	(%sp)+,%a0	# return addess
*** dist-18.53/src/crt0.c	Tue Aug 30 23:48:46 1988
--- Emacs/src/crt0.c	Wed Apr 12 18:55:03 1989
***************
*** 446,451
  #else /* new hp assembler */
  
  	asm("	text");
  	asm("	global	__start");
  	asm("	global	_exit");
  	asm("	global	_main");

--- 446,455 -----
  #else /* new hp assembler */
  
  	asm("	text");
+ 	asm("	set	float_loc,0xFFFFB000");
+ 	asm("	set	fpa_loc,0xFFF08000");
+ 	asm("	global	float_loc");
+ 	asm("	global	fpa_loc");
  	asm("	global	__start");
  	asm("	global	_exit");
  	asm("	global	_main");
***************
*** 461,466
  	asm("skip_float:");
  	asm("	subx.w	%d1,%d1");
  	asm("	mov.w	%d1,flag_68010");
  	asm("	mov.l	4(%a7),%d0");
  	asm("	beq.b	skip_1");
  	asm("	mov.l	%d0,%a0");

--- 465,473 -----
  	asm("skip_float:");
  	asm("	subx.w	%d1,%d1");
  	asm("	mov.w	%d1,flag_68010");
+ 	asm("	add.l	%d0,%d0");
+ 	asm("	subx.w	%d1,%d1");
+ 	asm("	mov.w	%d1,flag_fpa");
  	asm("	mov.l	4(%a7),%d0");
  	asm("	beq.b	skip_1");
  	asm("	mov.l	%d0,%a0");
***************
*** 492,497
  	asm("	comm	float_soft, 4");
  	asm("	comm	flag_68881, 4");
  	asm("	comm	flag_68010, 4");
  	
  #endif /* new hp assembler */
  #endif /* hp9000s300 */

--- 499,505 -----
  	asm("	comm	float_soft, 4");
  	asm("	comm	flag_68881, 4");
  	asm("	comm	flag_68010, 4");
+ 	asm("	comm	flag_fpa,   4");	
  	
  #endif /* new hp assembler */
  #endif /* hp9000s300 */
*** dist-18.53/src/m-hp9000s300.h	Fri Jun 10 05:09:19 1988
--- Emacs/src/xxx	Mon Apr 24 09:14:18 1989
***************
*** 166,168
  #define C_SWITCH_MACHINE -Wc,-Nd4000,-Ns3000
  #endif
  #endif

--- 166,176 -----
  #define C_SWITCH_MACHINE -Wc,-Nd4000,-Ns3000
  #endif
  #endif
+ 
+ /* If HPUX job control exists, define the following. */
+ 
+ #define HPUX_JOB_CONTROL
+ 
+ /* Define NEED_BSDTTY if you have such. */
+ 
+ #define NEED_BSDTTY
*** dist-18.53/src/sysdep.c	Tue Mar 21 18:40:19 1989
--- Emacs/src/sysdep.c	Sat Apr 22 00:02:13 1989
***************
*** 505,510
    killpg (getpgrp (0), SIGTSTP);
  
  #else
  #ifdef USG_JOBCTRL /* If you don't know what this is don't mess with it */
    ptrace (0, 0, 0, 0);		/* set for ptrace - caught by csh */
    kill (getpid (), SIGQUIT);

--- 505,518 -----
    killpg (getpgrp (0), SIGTSTP);
  
  #else
+ #ifdef HPUX_JOB_CONTROL
+   int pgrp;
+ 
+   if ((pgrp = getpgrp()) > 0) {
+     /* We send SIGTSTP to every process in the current process group */
+     kill(-pgrp, SIGTSTP);
+   }
+ #else	/* not HPUX_JOB_CONTROL */
  #ifdef USG_JOBCTRL /* If you don't know what this is don't mess with it */
    ptrace (0, 0, 0, 0);		/* set for ptrace - caught by csh */
    kill (getpid (), SIGQUIT);
***************
*** 577,582
    signal (SIGIO, sigio);
  #endif /* SIGIO */
  #endif /* no USG_JOBCTRL */
  #endif /* no SIGTSTP */
  #endif /* not VMS */
  }

--- 585,591 -----
    signal (SIGIO, sigio);
  #endif /* SIGIO */
  #endif /* no USG_JOBCTRL */
+ #endif /* not HPUX_JOB_CONTROL */
  #endif /* no SIGTSTP */
  #endif /* not VMS */
  }
***************
*** 1758,1763
  #endif BSD4_1
  
  #ifdef USG
  /*
   *	The BSD random(3) returns numbers in the range of
   *	0 to 2e31 - 1.  The USG rand(3C) returns numbers in the

--- 1767,1773 -----
  #endif BSD4_1
  
  #ifdef USG
+ #ifndef hpux
  /*
   *	The BSD random(3) returns numbers in the range of
   *	0 to 2e31 - 1.  The USG rand(3C) returns numbers in the
***************
*** 1778,1783
    srand (arg);
  }
  
  #endif /* USG */
  
  

--- 1788,1794 -----
    srand (arg);
  }
  
+ #endif /* hpux */
  #endif /* USG */
  
  
===============================================================================

guy@auspex.auspex.com (Guy Harris) (04/26/89)

>Check the user's {.cshrc,.profile} files.  If they are executing an stty
>command, it could very well be that they are performing a non-valid
>operation on a network socket (If you are unclear about what it means
>to have an operation not supported on a socket, see socket(2), or
>"ARPA Services User's Guide".)

I don't think *any* of the standard tty mode-setting "ioctl"s are valid
on sockets, which means just about any "stty" command will cause this
error.

>In other words, this is probably a valid, legal error message. 
>Personally, I get them all the time when I rlogin/xterm to my Sun;
>I find that ignoring the error messages causes no ill effects.

...other than perhaps minor irritation.

".profile" shouldn't be a problem; that's only executed by login shells,
and I certainly hope the shell fired off by "remsh" (I assume that, like
AT&T, HP dealt with the namespace collision between the 4.[23]BSD Remote
SHell and the S5 Restricted SHell by calling the former "remsh") isn't a
login shell (the vanilla BSD "rshd" doesn't stick a "-" in front of the
shell's name when passing it as the 0th argument, so it's not a login
shell there).

".cshrc" could be a problem, although I'd expect "stty"s to be in
".login" rather than ".cshrc" (is there any need to do it in a shell
other than your login shell?).  If you're doing an "stty" in ".cshrc",
you can keep it from happening in "rsh"/"remsh" shells by wrapping it in:

	if ( $?prompt ) then
		...
	endif

which makes it happen only in interactive shells.  You may want to wrap
other things in this as well....

If you have the Korn shell, or some Bourne shell variant that has a
per-instance ".rc" file (i.e., the moral equivalent of ".cshrc"), you'll
probably want some similar form of protection;

	case "$-" in

	*i*)
		...
		;;
	esac

worked for me with the Korn shell, as I remember.

ruf@Portia.Stanford.EDU (Erik Ruf) (04/26/89)

I recently posted a query on some problems we had observed with
HPUX 6.5.  Here is a summary of the responses I received:

1.  (problems with stopped X jobs; suspect "stty -tostop" is broken).
   
    No responses (any ideas?).


2.  (problems with missing symbols building gnuemacs18.51; X10 troubles)

    Several people pointed out (correctly) that the problem is in 
    gnuemacs' private crt0.o file, which fails to define some symbols.
    Solution is to patch emacs' crt0.c.  Apparently gnuemacs 18.53 fixes
    this problem for 6.2, but not for 6.5.  Apologies to HP for blaming
    them for a Gnu bug.

    Also, the 6.2 release of X10 *is* incompatible with 6.5, but an
    upgrade is available from HP for those who need to run X10 under 6.5.


3.  (problems with tset)

    No one else had problems.  (I haven't been able to verify the
    user's problem either...)


4.  (problems with remsh; stty errors)

    Many people surmised (correctly) that some users had stty commands
    in their .cshrc files, which complained.


Thanks to all who responded; if anyone gets to the bottom of the 
"stopped xterm job" problem, please le me know.  

Erik Ruf
Center for Integrated Systems
Stanford University

ruf@dolores.stanford.edu
...{decwrl,ucbvax}!dolores.stanford.edu!ruf
   

    

andyc@hpopd.HP.COM (Andrew Cunningham) (05/09/89)

I get complaints about jobs being stopped in X,
ZZ

andyc@hpopd.HP.COM (Andrew Cunningham) (05/09/89)

/ hpopd:comp.sys.hp / ruf@Portia.Stanford.EDU (Erik Ruf) /  1:34 am  Apr 26, 1989 /

1.  (problems with stopped X jobs; suspect "stty -tostop" is broken).
   
    No responses (any ideas?).

I get complaints that some jobs have been stopped, but they still seem
to run OK whether or not stty -tostop is used.  I dunno what the problem
is...  does anyone out there in netland know?

Perhaps I ought to learn to use ksh instead!!!

DISCLAIMER: My opinions are not necessarily those of HP.  
I am not involved with the development of HP 9000 hardware or
HP-UX, so don't ask me!