🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2801

problem mixing compilers

#2801
From: Glenn P. Davis
Date: Fri, 05 Jan 1990 03:36
56 lines
2004 bytes
Environment: sun3, Sun OS 4.O.3, gcc version 1.36

#define HasGcc YES
#define HasSunOSSharedLibraries YES

When attempting to link simple Xaw programs using the sun cc complier,
referencing system X libs built as above, there are unresovled externals
which are not in gcc-gnulib. Linking with gcc is no problem.

Repeat By:

===== simple make file, test.mk ====
INCLUDES =
DEFINES =
CPPFLAGS = $(INCLUDES) $(DEFINES)

LOADLIBS = -lXaw -lXmu -lXt -lX11

xhw : xhw.o
	$(LINK.c) $(LINKOPTS) xhw.o $(LOADLIBS) -o $@
==== end of test.mk ===


Script started on Thu Jan  4 20:01:55 1990
	(groucho) 94 % pwd
	/u3/X11R4/mit/examples/Xaw
	(groucho) 95 % rm xhw ; make -f test.mk
	cc     -sun3  xhw.o  -lXaw -lXmu -lXt -lX11 -o xhw
	(groucho) 96 % xhw
	ld.so: call to undefined procedure __GetHostname from 0xebc073a
	(groucho) 97 % rm xhw ; make CC=gcc -f test.mk
	gcc     -sun3  xhw.o  -lXaw -lXmu -lXt -lX11 -o xhw
	(groucho) 98 % xhw
		# window apprears as it should
	(groucho) 99 % rm xhw ; make LINKOPTS=-Bstatic -f test.mk
	cc     -sun3 -Bstatic xhw.o  -lXaw -lXmu -lXt -lX11 -o xhw
	Undefined:
	_XrmDestroyDatabase
	__GetHostname
	*** Error code 1
	make: Fatal error: Command failed for target `xhw'
	(groucho) 100 % exit
script done on Thu Jan  4 20:05:42 1990

Note: adding the gnu library, gcc-gnulib, to the end of LOADLIBS,
makes no difference.

(Cross Posted to comp.windows.x)

Glenn P. Davis
UCAR / Unidata
PO Box 3000                   1685 38th St.
Boulder, CO 80307-3000        Boulder, CO  80301

(303) 497 8643
Technical Details
Message-ID: <5897@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!groucho!davis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!groucho!davis
From: davis@groucho.ucar.edu (Glenn P. Davis)
Newsgroups: gnu.gcc.bug
Subject: problem mixing compilers
Keywords: gcc, sun3
Message-ID: <5897@ncar.ucar.edu>
Date: 5 Jan 90 03:36:20 GMT
Sender: news@ncar.ucar.edu
Reply-To: davis@groucho.UCAR.EDU (Glenn P. Davis)
Distribution: gnu
Organization: Unidata/UCAR, Boulder CO
Lines: 56