[comp.windows.x] R3 on Sun-4/260 running SYS4-3.2

eho@reason.Princeton.EDU (Eric Ho) (11/10/88)

Has anyone encounter any problems in building & running R3 on a Sun-4/260
running SYS4-3.2 or on Sun-3's running 3.3 ?

Any pointers will be greatly appreciated.

email = (eho@mind.princeton.edu  Or eho@phoenix.princeton.edu)


--

regards.

-eric-

mcneill@eplrx7.UUCP (mcneill) (11/11/88)

From article <EHO.88Nov10122259@reason.Princeton.EDU>, by
eho@reason.Princeton.EDU (Eric Ho):  > Has anyone encounter any problems in
building & running R3 on a Sun-4/260 > running SYS4-3.2 or on Sun-3's
running 3.3 ?  > Make ran without a hitch on our Sun-3's SunOS 3.5.  We had
1 problem with our 4/260 Sys4-3.2.  This version of the SunOS seems to be
missing the symbol "alloca".  I ran nm on alloca.o from /lib/libc.a and got:

00000000 T ___builtin_alloca

While on my sun3 I got:

00000000 T _alloca

I've called Sun software support on this one...I haven't got a response
yet.  By the way has anybody noticed that the 2 hour response time that sun
promises has been more like 2 days of late?

But you can get around this by using the alloca routine provided in the
server/os/4.2bsd directory.

    Keith D. McNeill              |    E.I. du Pont de Nemours & Co.
    uunet!eplrx7!mcneill          |    Experimental Station
    (302) 695-7395                |    P.O. Box 80357
                                  |    Wilmington, Delaware 19880-0357
-- 
    Keith D. McNeill              |    E.I. du Pont de Nemours & Co.
    uunet!eplrx7!mcneill          |    Experimental Station
    (302) 695-7395                |    P.O. Box 80357
                                  |    Wilmington, Delaware 19880-0357

guy@auspex.UUCP (Guy Harris) (11/12/88)

>This version of the SunOS seems to be missing the symbol "alloca".

You got it.  There is no library routine named "alloca" on SPARC
machines.  There are, however:

	1) a library routine named __builtin_alloca

	2) an include file named <alloca.h>, that defines "alloca(x)" as
	   "__builtin_alloca(x)"

so that the compiler will be able to make "alloca(x)" work right.  (The
name change permits people to have routines named "alloca" in their code
that does not behave like "__builtin_alloca"; the compiler special-cases
calls to "__builtin_alloca", and leaves calls to "alloca" alone.)

Any code compiled using the Sun compilers on a Sun-4 has to include
<alloca.h> to work correctly.  Try

	#ifdef sparc
	#include <alloca.h>
	#endif

Michaels@MCC.COM (Wilson M. Michaels) (11/14/88)

From article <EHO.88Nov10122259@reason.Princeton.EDU>, by
eho@reason.Princeton.EDU (Eric Ho):  > Has anyone encounter any problems in
building & running R3 on a Sun-4/260 > running SYS4-3.2 or on Sun-3's
running 3.3 ?  > Make ran without a hitch on our Sun-3's SunOS 3.5.  We had
1 problem with our 4/260 Sys4-3.2.  This version of the SunOS seems to be
missing the symbol "alloca".

I fixed this problem by making a change to the file:

   "util/imake.includes/Sun.macros"

There seems to be some sort of hybridization going on in the Sun4-3.2
OS.   Following the comment line:

  /* define this as you like for server compilation */

is a line that was:

  #if SunOSPlatform && OSMajorVersion >= 4

I changed it to:

  #if SunOSPlatform && (( OSMajorVersion >= 4 ) || ( HOSTTYPE == sun4 ))

You need to verify that HOSTTYPE is getting set in your environment.  No
other changes were needed to solve the alloca problem.   Of course you
must to a make World again to get the Imake to fix things up correctly.
Someone who is familiar with the Sun OS needs to check that HOSTTYPE is
the right thing to test.

  -- Wilson M. Michaels

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (11/15/88)

You might try the following patch in util/imake.includes/Sun.macros:

*** /tmp/,RCSt1a10834			Mon Nov 14 11:57:56 1988
--- util/imake.includes/Sun.macros	Mon Nov 14 11:57:23 1988
***************
*** 65,71 ****
  #endif
  
  /* define this as you like for server compilation */
! #if SunOSPlatform && OSMajorVersion >= 4
  #define ServerDefines SunWindowsDefines -DINCLUDE_ALLOCA_H
  #else
  #define ServerDefines SunWindowsDefines
--- 65,71 ----
  #endif
  
  /* define this as you like for server compilation */
! #if SunOSPlatform && (OSMajorVersion >= 4 || defined(sparc))
  #define ServerDefines SunWindowsDefines -DINCLUDE_ALLOCA_H
  #else
  #define ServerDefines SunWindowsDefines