[comp.unix.xenix] PCOMM compile woes: Has this happened to You???

0rrodrig@teknowledge-vaxc.ARPA (Russ Rodriguez) (10/12/88)

Hello there, Xenix Development System Hackers (SCO V2.2.1).  I have the
following nasty error message when compiling PCOMM V1.1 with patches
1-4 faithfully applied.  When I run the makefile, all the subprograms
compile without error, but when run thru the linker, I get the message 
listed below.  Can any more knowledgeable person help me identify and
solve this problem?  Thanks in advance!
*************************************************************************

cc -SEG 1000 -F 5000 -M2l admin.o chg_dir.o curses.o d_delete.o d_lib.o
  ( much deleted here ...)
... xmodem.o -o pcomm -ltermcap -lcurses 

Fixup overflow near 008b in segment PREPROC_TEXT in /lib/Llibc.a(signal.o) 
  offset 262d8H

*** Error code 1

Stop.

**********************************************************************
Below is the relevent portion of the makefile that I'm using, basically
as included in the original Pcomm shell archives, but with the link
switches "-ltermcap -lcurses", as I am using the SCO XENIX 2.2.1 
development system.
*************************************************************************

MYSTDIO = -I/usr/include
CFLAGS = $(MYSTDIO) -W -Od -LARGE -M2l
CURSES = -ltermcap -lcurses 
LDFLAGS = -SEG 1000 -F 5000 -M2l

PCOMM = $(GETCWD) $(GETOPT) admin.o chg_dir.o curses.o d_delete.o \
	( ... much deleted here to conserve space ...)
	x_menu.o x_rcv.o x_send.o x_win.o xmodem.o

INPUT =	input.o vcs.o

all:	pcomm pcomm_input

pcomm:	$(PCOMM)
	$(CC) $(LDFLAGS) $(PCOMM) -o pcomm $(CURSES)

pcomm_input:	$(INPUT)
	$(CC) $(LDFLAGS) $(INPUT) -o pcomm_input $(CURSES)

lint:
	lint -p -Dlint *.c

admin.o:	config.h dial_dir.h param.h
(... much deleted here to conserve space ... )
xmodem.o:	config.h misc.h param.h xmodem.h
*************************************************************************

Russell Rodriguez
------------------------------------------------------------------------------
Disclaimer:       The opinions of Russ Rodriguez are his own and couldn't 
	    possibly reflect those of Teknowledge, Inc., of Palo Alto, CA
------------------------------------------------------------------------------
internet:  0rrodrig@teknowledge-vaxc.arpa
usenet:	   {uunet|sun|ucbvax|decwrl|uw-beaver}!0rrodrig%teknowledge-vaxc.arpa

debra@alice.UUCP (Paul De Bra) (10/12/88)

(Russ Rodriguez) writes:
>Hello there, Xenix Development System Hackers (SCO V2.2.1).  I have the
>following nasty error message when compiling PCOMM V1.1 with patches
>1-4 faithfully applied.  When I run the makefile, all the subprograms
>compile without error, but when run thru the linker, I get the message
>listed below...
>
>cc -SEG 1000 -F 5000 -M2l admin.o chg_dir.o ... -ltermcap -lcurses
>
>Fixup overflow near 008b in segment PREPROC_TEXT in /lib/Llibc.a(signal.o)
>  offset 262d8H
>
>*** Error code 1
>
>Stop.

Ah yes, my favorite SCO bug !!!

Here's the kludge to get around it:
1) extract signal.o from /lib/Llibc.a ("ar x /lib/Llibc.a signal.o")
2) compile the program again, but put signal.o in there as the first .o file
   ("cc -SEG 1000 -F 5000 -M2l signal.o admin.o chg_dir.o ... -lcurses")

I encountered this problem several times before, when using signals in large
programs (not that curses stuff uses signals). This fix always worked for me.

Hope it solves your problem.

Paul.

-- 
|--------------------------
|debra@research.att.com   |
|uunet!research!debra     |
|--------------------------