🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23763

Re: alloca error building X11R4 on a Sparc 2

#23763
From: Dave Jones
Date: Sun, 16 Jun 1991 00:37
34 lines
1576 bytes
From article <9106131454.AA12581@gateway.mitre.org>, by palmer@gateway.mitre.ORG (Forrest Palmer):
> 
> Hi,
> 
>    I've just built X11R4 (pl. 18) on a Sparc 2 running 4.1.1. There
> were no errors but when I start any X program I get the following
> error :
> 
> ld.so: call to undefined procedure _alloca from 0xf772302c

On my SPARC machine, alloca is not named alloca. It's named "__builtin_alloca".
(YOU figure it out. I can't. The compiler has to give special treatment to
alloca calls made as parameters to functions, so maybe they changed the name
so that the compiler can "know" whether the alloca refered to is the system
alloca or a user-defined one. Who knows. The bottom line is that your code
is now broke.)

There's an include-file called "alloca.h" that has the following macro in it:

#if defined(sparc)
# define alloca(x) __builtin_alloca(x)
#endif

> A test program I wrote that used alloca worked fine.

Perhaps you included the file and they did not?

Put this at the head of every file that uses alloca, ahead of any extern
declaration of alloca.


#if defined(sparc)
#	include <alloca.h>
#endif
Technical Details
Message-ID: <18923@prometheus.megatest.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!daver!dlb!megatest!djones
References: <9106131454.AA12581@gateway.mitre.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!daver!dlb!megatest!djones
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.windows.x
Subject: Re: alloca error building X11R4 on a Sparc 2
Message-ID: <18923@prometheus.megatest.UUCP>
Date: 16 Jun 91 00:37:18 GMT
References: <9106131454.AA12581@gateway.mitre.org>
Organization: Megatest Corporation, San Jose, Ca
Lines: 34