[comp.windows.x] xrooms on Sun4 OS 4.0.3 does not compile

felix@ai.sri.com (Francois Felix INGRAND) (08/14/90)

I tried to install xrooms on a Sun4, OS 4.0.3, X11R4, but I get the following problem:

cc -o xrooms xrMain.o xrSetup.o    xrGen.o xrApp.o xrXawUI.o xrXawRoom.o xrNames
.o xrProfile.o xrProto.o  xrProtoArgs.o xrProtoIter.o xrDoProto.o  xrActions.o
xrXUtils.o xrDebug.o -g  ../lib/librooms.a ../utils/libutils.a  -lXaw -lXmu -lXt
 -lX11 -lm  -lXext
ld: Undefined symbol
   _alloca
*** Error code 1
make: Fatal error: Command failed for target `xrooms'

Any idea where is this symbol defined?

Thanks in advance,
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Francois Felix INGRAND                          SRI International, AIC
felix@AI.SRI.COM                                333, Ravenswood Avenue
(415) 859-5584                                  MENLO PARK, CA 94025, USA
"Read my Lisp... No new syntax" (nil)

guy@auspex.auspex.com (Guy Harris) (08/15/90)

>ld: Undefined symbol
>   _alloca
>*** Error code 1
>make: Fatal error: Command failed for target `xrooms'
>
>Any idea where is this symbol defined?

"/usr/include/alloca.h":

	/*	@(#)alloca.h	1.3	88/02/07	SMI	*/
	#if defined(sparc)
	# define alloca(x) __builtin_alloca(x)
	#endif

Basically, you need to find those source files that call "alloca" and
put in something like

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

at the front of them.  Be warned that some other compilers also need
assistance in coping with "alloca"....

erik@westworld.esd.sgi.com (Erik Fortune) (08/16/90)

In article <3887@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes:
>>ld: Undefined symbol
>>   _alloca
>>*** Error code 1
>>make: Fatal error: Command failed for target `xrooms'
>>
>>Any idea where is this symbol defined?
>
>"/usr/include/alloca.h":
>
>	/*	@(#)alloca.h	1.3	88/02/07	SMI	*/
>	#if defined(sparc)
>	# define alloca(x) __builtin_alloca(x)
>	#endif
>
>Basically, you need to find those source files that call "alloca" and
>put in something like
>
>	#ifdef sparc
>	#include <alloca.h>
>	#endif
>
>at the front of them.  Be warned that some other compilers also need
>assistance in coping with "alloca"....

Add Guy's include to xrooms/utils/machdep.h -- all of the other source files
include it.

-- Erik