From xemacs-m  Mon May 26 02:35:36 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id CAA11843
	for <xemacs-beta@xemacs.org>; Mon, 26 May 1997 02:35:35 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id AAA10027; Mon, 26 May 1997 00:51:21 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id AAA09438; Mon, 26 May 1997 00:34:42 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id AAA27902; Mon, 26 May 1997 00:34:37 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id AAA04721; Mon, 26 May 1997 00:34:42 -0700
Date: Mon, 26 May 1997 00:34:42 -0700
Message-Id: <199705260734.AAA04721@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Kyle Jones <kyle_jones@wonderworks.com>
Cc: xemacs-beta@xemacs.org
Subject: 20.3-b2 build fails on BSD/OS 2.0
In-Reply-To: <QQcqyu13553.199705242105@crystal.WonderWorks.COM>
References: <QQcqyu13553.199705242105@crystal.WonderWorks.COM>
X-Mailer: VM 6.31 under 20.3 XEmacs Lucid (beta1)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "Kyle" == Kyle Jones <kyle_jones@wonderworks.com> writes:

Kyle> Same general problems as last time.
Kyle> 1. -lICE and -lSM were found and used this time but they were in
Kyle>    the wrong place in the link line.  I moved them between -lXt
Kyle>    and -lX11 and the unresovled references went away.

The order of the X libs is determined entirely by Autoconf 2's macro
AC_PATH_XTRA. All packages that use this should have the same problem.
Unfortunately, there are enough problems with AC_PATH_XTRA that I may
end up rewriting it.  On Solaris I don't see this problem, since I can 
link the libraries in any order - the implicit dependencies are taken
care of by the linker.  AIX also doesn't have the problem of being
ridiculously picky about library link order.  In my opinion, systems
implementing traditional linker semantics like NetBSD and Linux are broken.

From examining the implicit library dependencies on Solaris, it looks
like the correct order to test for X libraries is:

-lXm -lXpm -lXt -lSM -lICE -lX11 -lXext

while the current order implemented by configure is

-lSM -lICE -lXm -lXpm -lXext -lXt -lX11

Kyle> 2. termcap.o was missing from the objs list.  I added it and the
Kyle>    tgetent and tputs references were resolved.

Fixed (perhaps) in the next beta.

Kyle> 3. gcc was called with -nostdlib but there was no -lc on the link
Kyle>    line.  Can't bowl without a lane, can't link without the C
Kyle>    library.

I understand this somewhat now.  Perhaps all this stuff in
src/Makefile.in.in about ORDINARY_LINK is obsolete, but I would have
to play around with some systems to be sure.

Kyle> After fixing these problems, the build succeeded.

This helps confirm my suspicion that almost all systems can link
properly today with an `ordinary link', i.e. neither -lc nor
-lnostdlib.

Martin

