[comp.lang.perl] Perl on an Intergraph?

wwm@wa8tzg.mi.org (Bill Meahan) (05/02/91)

OK, perl hackers, you were so wonderfully helpful on my last round ....

In my continuing effort to put perl 4.003 on the polyglot machines at
work, I've run into a REALLY STRANGE one.

I'm trying to put perl on an Intergraph under CTIX (basically SYSVR2).
Perl compiles without problem or complaint under the Green Hills
compiler supplied by Intergraph, but when I try to test it, BOOM!

Run as 'make test' :

		 cd t && chmod +x TEST */*.t
		 cd t && (rm -f perl; ln -s ../perl .) && ./perl TEST </dev/tty
	base/cond......./base/cond.t: print: not found
	./base/cond.t: =: not found
	./base/cond.t: eq: not found
	./base/cond.t: ne: not found
	./base/cond.t: eq: not found
	./base/cond.t: print: not found
	./base/cond.t: ne: not found
	./base/cond.t: print: not found
	./base/cond.t: ==: not found
	./base/cond.t: !=: not found
	./base/cond.t: ==: not found
	./base/cond.t: print: not found
	./base/cond.t: !=: not found
	./base/cond.t: print: not found
	FAILED on test 0
	Failed a basic test--cannot continue.
	*** Error code 8 (ignored)

But running tests individually I get:

Run as 'perl t/base/comp.t' :
	1..4
	ok 1
	ok 2
	ok 3
ok 4


In fact, I can run every test manually and only cpp.t and goto.t fail
(goto.t fails test 3 but ALSO says 'ok 3' - go figure).

Clues?

Compiled with and without optimization, with and without Larry's malloc.
-- 
Bill Meahan (WA8TZG)             |   Programming is simple:
wwm@wa8tzg.mi.org  OR            |
uunet!mailrus!sharkey!wa8tzg!wwm |   All you have to do is put the right
"Home for Cybernetic Orphans"    |   numbers in the right memory locations!

lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) (05/03/91)

In article <1991May1.171000.234@wa8tzg.mi.org> wwm@wa8tzg.mi.org (Bill Meahan) writes:
: 
: I'm trying to put perl on an Intergraph under CTIX (basically SYSVR2).
: Perl compiles without problem or complaint under the Green Hills
: compiler supplied by Intergraph, but when I try to test it, BOOM!
: 
: Run as 'make test' :
: 
: 		 cd t && chmod +x TEST */*.t
: 		 cd t && (rm -f perl; ln -s ../perl .) && ./perl TEST </dev/tty
: 	base/cond......./base/cond.t: print: not found
: 	./base/cond.t: =: not found
: 	./base/cond.t: eq: not found
: 	./base/cond.t: ne: not found
: 	./base/cond.t: eq: not found
: 	./base/cond.t: print: not found
: 	./base/cond.t: ne: not found
: 	./base/cond.t: print: not found
: 	./base/cond.t: ==: not found
: 	./base/cond.t: !=: not found
: 	./base/cond.t: ==: not found
: 	./base/cond.t: print: not found
: 	./base/cond.t: !=: not found
: 	./base/cond.t: print: not found
: 	FAILED on test 0
: 	Failed a basic test--cannot continue.
: 	*** Error code 8 (ignored)

It would appear that you have $sharpbang set to '#!' in config.sh, when
in fact your kernel doesn't recognize it.  The hint is the "not found"
messages--Perl doesn't ever give such a message, but the shells do
frequently.  Hence, a shell is attempting to execute a Perl script.

Either you used a foreign config.sh file on this machine, or Configure
got loused up over #!, possibly because you ran it under some shell other
than /bin/sh that emulates #!.  Or a Nazi spy snuck in while you weren't
watching and edited your config.sh...

Larry

wwm@wa8tzg.mi.org (Bill Meahan) (05/04/91)

In article <1991May2.173540.4290@jpl-devvax.jpl.nasa.gov> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
>In article <1991May1.171000.234@wa8tzg.mi.org> wwm@wa8tzg.mi.org (Bill Meahan) writes:
>: 
>: I'm trying to put perl on an Intergraph under CTIX (basically SYSVR2).
>: Perl compiles without problem or complaint under the Green Hills
>: compiler supplied by Intergraph, but when I try to test it, BOOM!
>: 
>: Run as 'make test' :
>: 
>: 		 cd t && chmod +x TEST */*.t
>: 		 cd t && (rm -f perl; ln -s ../perl .) && ./perl TEST </dev/tty
>: 	base/cond......./base/cond.t: print: not found
>: 	./base/cond.t: =: not found
>: 	./base/cond.t: eq: not found
>: 	./base/cond.t: ne: not found
>: 	./base/cond.t: eq: not found
>: 	./base/cond.t: print: not found
>: 	./base/cond.t: ne: not found
>: 	./base/cond.t: print: not found
>: 	./base/cond.t: ==: not found
>: 	./base/cond.t: !=: not found
>: 	./base/cond.t: ==: not found
>: 	./base/cond.t: print: not found
>: 	./base/cond.t: !=: not found
>: 	./base/cond.t: print: not found
>: 	FAILED on test 0
>: 	Failed a basic test--cannot continue.
>: 	*** Error code 8 (ignored)
>
>It would appear that you have $sharpbang set to '#!' in config.sh, when
>in fact your kernel doesn't recognize it.  The hint is the "not found"
>messages--Perl doesn't ever give such a message, but the shells do
>frequently.  Hence, a shell is attempting to execute a Perl script.
>
>Either you used a foreign config.sh file on this machine, or Configure
>got loused up over #!, possibly because you ran it under some shell other
>than /bin/sh that emulates #!.  Or a Nazi spy snuck in while you weren't
>watching and edited your config.sh...
>
>Larry

Well, maybe the Nazis edited my Configure script :-)

I **manually** edited config.sh to NOT recognize '#!' and perl compiled
and tested OK.
      
      BUT

Configure INSISTS that "#!" works, even when run explicitly under 'sh'
by doing a:
  $/bin/sh Configure
EVEN THOUGH '#!' DOESN'T WORK!
It also didn't detect that I ran it with ksh the very first time through.

I double checked: /bin/sh is NOT linked/aliased to ksh or csh.

I grant, Intergraphs run the Mutant UNIX From Hell (obstensibly 'pure'
SYS V - but it ISN'T) so perhaps I've just stumbled across something
Configure hasn't dealt with before.

BTW - on some SYS V machines (the I-graph AND my home 3B1) the 'new'
"force a script to run perl even though it doesn't support #!" statement
doesn't seem to work properly.  On a program which does interactive I/O,
the input constantly thinks it has an input and so I can watch the
prompt from the perl script scroll up my screen at a fascinatingly high
rate.  Using the 'old' version (from 3.044 'nih') cures the problem.

THANKS FOR ALL THE HELP!
-- 
Bill Meahan (WA8TZG)             |   Programming is simple:
wwm@wa8tzg.mi.org  OR            |
uunet!mailrus!sharkey!wa8tzg!wwm |   All you have to do is put the right
"Home for Cybernetic Orphans"    |   numbers in the right memory locations!