_MIPS_SZLONG undefined on SGI after doing h2ph 
Author Message
 _MIPS_SZLONG undefined on SGI after doing h2ph

I built perl on an SGI rinning IRIX 5.2.  Now I'm trying to run swatch
(a perl appl to monitor log files in real time).

Whenever I try to invoke it, I get the following error:

Undefined subroutine "main'_MIPS_SZLONG" called
       at /usr/local/lib/perl/sys/types.ph line 6.

(It's actually a one line error message, but oh so loooooooong)

I setup the library with the following command (right out of the man
page):

cd /usr/include; h2ph * sys/*

In sgidefs.h, it appears that _MIPS_SZLONG is defined by the compiler
rather then a header file, which mean it remains an undefined
subroutine (every reference inb a *.ph file is to &_MIPS_SZLONG).

Any ideas on how to fix?  All suggestions appreciated.

Thanks,
Rob

      _ _ _ _           _    _ _ _ _ _  
     /\_\_\_\_\        /\_\ /\_\_\_\_\_\  
    /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  Robert J. Tanner
   /\/_/__\/_/ __    /\/_/    /\/_/       Ames Research Center
  /\/_/_/_/_/ /\_\  /\/_/    /\/_/        (415) 604-0537
 /\/_/ \/_/  /\/_/_/\/_/    /\/_/        

 ____________________________________________________________________



Sat, 19 Jul 1997 09:04:05 GMT  
 _MIPS_SZLONG undefined on SGI after doing h2ph

Quote:
>Whenever I try to invoke it, I get the following error:

>Undefined subroutine "main'_MIPS_SZLONG" called
>       at /usr/local/lib/perl/sys/types.ph line 6.

>(It's actually a one line error message, but oh so loooooooong)

>I setup the library with the following command (right out of the man
>page):

>cd /usr/include; h2ph * sys/*

Examine the solution I posted on Saturday for DEC Alpha machines running
OSF/1. This appears to be exactly the same problem. I've fixed h2ph to
"do the right thing".

-Randy


Systems Analyst                             voice : (515) 294-9316
Computation Center                          office: 113 Durham
Iowa State University           http://www.public.iastate.edu/~cfrandal/



Sat, 19 Jul 1997 11:38:42 GMT  
 _MIPS_SZLONG undefined on SGI after doing h2ph

Quote:

>Any ideas on how to fix?  All suggestions appreciated.

I had a similar problem with a script. The other responder probably
has the "correct" solution (I didn't dig up the post he was referring
to) but adding the following to my script worked:

        sub _MIPS_SZLONG
        {
         32;
        }

--
Kevin Luster, Project Reality | Silicon Graphics MS-880
Kicking Sega's {*filter*}          | 2011 N. Shoreline Blvd

http://www.*-*-*.com/ ~kluster/Visigoth.html



Sat, 19 Jul 1997 15:50:46 GMT  
 _MIPS_SZLONG undefined on SGI after doing h2ph

Quote:

> I built perl on an SGI rinning IRIX 5.2.  Now I'm trying to run swatch
> (a perl appl to monitor log files in real time).
> Whenever I try to invoke it, I get the following error:
> Undefined subroutine "main'_MIPS_SZLONG" called
>        at /usr/local/lib/perl/sys/types.ph line 6.

[...]

Quote:
> In sgidefs.h, it appears that _MIPS_SZLONG is defined by the compiler
> rather then a header file, which mean it remains an undefined
> subroutine (every reference inb a *.ph file is to &_MIPS_SZLONG).

Correct, it is a compiler definition.  The way we handle it is to
patch h2ph which them fixes the .ph files.  Look at /usr/sbin/h2ph
from the perl that comes with Irix (in the eoe2.sw.gifts_perl
subsystem which is perl-4.036) for the patch.  It's a very
straight-forward merge.

Here's a patch for perl5.000:h2ph

*** h2ph.orig   Tue Sep 27 11:49:31 1994
--- h2ph        Tue Sep 27 16:01:22 1994
***************
*** 53,58 ****
--- 53,76 ----
            }
        }
        if (s/^#\s*//) {
+ # check for sgidefs.h, where we need to insert the compiler
+ # defined macros:
+           if ($file eq 'sgidefs.h' && /__cplusplus/) {
+               print OUT <<END
+ # Grrr.  Compiler defines in include files...
+     eval 'sub _MIPS_FPSET {16;}';
+     eval 'sub _MIPS_SZINT {32;}';
+     eval 'sub _MIPS_SZLONG {32;}';
+     eval 'sub _MIPS_SZPTR {32;}';
+     eval 'sub _MIPS_ISA {_MIPS_ISA_MIPS1;}';
+     eval 'sub _MIPS_SIM {_MIPS_SIM_ABI32;}';
+ #
+ END
+           }
+           if ($file =~ /select.h/ && /^ifndef NBBY/) {
+               print OUT "require 'sgidefs.ph';\n";
+           }
+
            if (s/^define\s+(\w+)//) {
                $name = $1;
                $new = '';
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 Networking Services,        / GIGO *really* means: Garbage in, Gospel Out
 Silicon Graphics, Inc      /
  <a href="http://reality.sgi.com/employees/scotth/">non-virtual home page</a>



Mon, 28 Jul 1997 07:11:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Compiling perl 5 on SGI

2. Warning while compiling on SGI Indy (IRIX 5.2)

3. DBI::DBD, Oracle8, SGI IRIX 6.4

4. swatch port on SGI

5. problem: building oraperl on sgi

6. SGI and Perl Question.

7. SGI::FAM 1.002 trial release

8. -u flag of perl under SGI IRIX 5.2

9. signal problems on HP-UX and SGI

10. Linking old and new DBD-Oracle 32-bit object together with SGI

11. PERL for SGI

12. core dumps with type glob on SUN, SGI, and AIX

 

 
Powered by phpBB® Forum Software