Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!rice!sun-spots-request From: gill!paul@uunet.uu.net (Paul Nordstrom) Newsgroups: comp.sys.sun Subject: Re: Problem compiling CLX under Sun OS 4.1 on a Sparcstation 1+ Keywords: SunOS Message-ID: <8187@brazos.Rice.edu> Date: 25 May 90 19:33:11 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 36 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n169 X-Sun-Spots-Digest: Volume 9, Issue 180, message 14 In article <7892@brazos.Rice.edu> you write: > >I am using Sun's "X/Open compatiblity package", OpenWindows 1.0.1, for X >support. X seems to work OK, except when i try to compile CLX (common lisp >interface to X) under Austin Kyoto Common Lisp, I get the following error: > > >(xlib:compile-clx) > ;;; Default paths: #"" #"" > ;;; cc -c socket.c -o socket.o -DUNIXCONN > Compiling sockcl.lsp. > End of Pass 1. > End of Pass 2. > OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3 > Finished compiling sockcl.o.ld: sockcl.o: bad secondary magic number > > Error: The linkage editor failed. > Error signalled by SYSTEM:FASLINK. I had the same problem with my Oregon C++ compiler. In my case, the compiler was writing out object files in 512 byte blocks (for efficiency). At the end of the object code, the compiler just zero filled to the end of the 512 byte block. New to the SunOS 4.1 object file format there is some additional junk after the symbol table (possibly to support a browser or something, maybe?). Anyway, this additional info is protected by a magic number, hence the error message "bad secondary magic number". In my case, the solution was very simple: all I had to do was to write a short program to truncate the object file at the end of the symbol table. If you would like, I could send the code. Note that I also had to tear apart the libraries, truncate the object files therein, and rebuild them. If you look at your object files (I used bpatch) and see a lot of binary zeros at the end, I would think that that is your problem as well. Hope this helps. Paul Nordstrom Gill & Co., L.P. uunet!gill!paul