Path: utzoo!utgpu!water!watmath!clyde!att!alberta!ubc-cs!coho!daveg From: daveg@coho.UUCP (Dave Gagne) Newsgroups: comp.emacs Subject: Re: Problems with building emacs on SunOS 4.0 (EXPORT) Summary: SunOS 4.0_Export "cc -Bstatic" don't work. Message-ID: <263@coho.UUCP> Date: 27 Aug 88 20:34:37 GMT References: <611@expya.ex.ac.uk> Organization: UBC Dept. of Electrical Engineering, Vancouver, Canada Lines: 66 In article <611@expya.ex.ac.uk>, admin@cs.ex.ac.uk (System Administrator) writes: > I am having some problems with building gnu emacs 18.51 on our sun 3 > running SunOS 4.0 and I wonder if someone can help me out. > > I have used s-sunos4.h which contains So far so good. > _edata: ld: user attempt to redefine loader-defined symbol > _end: user attempt to redefine loader-defined symbol > _etext: /lib/libc.a(des_crypt.o): multiply defined > > so I changed the LD=ld to LD=cc and cleared the LDFLAGS macro in No need to do this. > Has anyone else seen similar problems? Yes indeed. Anyone who does not live in the jolly US of A. > Khalid Sattar JANET: admin@uk.ac.exeter.cs > Computer Science Dept. UUCP: ukc!expya!admin > University of Exeter What you are encountering is a screw-up in SunOS 4.0_Export. This problem only occurs in the "EXPORT" version of SunOS 4.0: ie the software which Sun ships outside of the USA. The problem has something to do with Sun not wanting to ship their DES chips outside of the good 'ole USA. What we poor foreigners get instead is some buggered up software. What all this means is that "cc -Bstatic ..." WILL NOT WORK ON SUNOS 4.0 EXPORT without a little help from "ar". The static C-library is /lib/libc.a, and this is where the problem occurs. There are a bunch of .o files in there relating to DES stuff (des_crypt.o, des_soft.o, _crypt.o, etc). All of them will case cc -Bstatic to die as you found with the errors: > _edata: ld: user attempt to redefine loader-defined symbol > _end: user attempt to redefine loader-defined symbol > _etext: /lib/libc.a(des_crypt.o): multiply defined In order to make cc -Bstatic useful, you must remove all the brain-damaged .o files from /lib/libc.a. To do this use ar d /lib/libc.a des_crypt.o des_soft.o _crypt.o .... (Make a backup of /lib/libc.a first, you may decide you need the "real" thing someday). Note that there are a bunch of these files, I can't remember all of them. You will find them quick enough by trying to compile ANY C program, even one which does NOTHING. After you have done this, Emacs should compile OK. I was able to get both the "normal" text version and the X-windows (X11R2) version to compile OK. It seems to me that the Suntools version may not have worked, but I may just be halucinating. Dave. -- +---------------------------------------------------------------------------+ | Dave Gagne. UBC VLSI Salmon Net o /\ /\ | | _____ o \ / \ | | daveg@ee.ubc.ca \/ o\_o \ / \ | | daveg%ee.ubc.ca@relay.ubc.ca /\_____/ \ / \ | | daveg@ee.ubc.cdn%ean.ubc.ca@RELAY.CSNET \/ \ | +---------------------------------------------------------------------------+