Subject: bin/2393: gxditview should be linked with -lSM and -lICE when using X11R6
To: None <gnats-bugs@NetBSD.ORG>
From: None <thomas@cevis.uni-Bremen.de>
List: netbsd-bugs
Date: 05/10/1996 19:51:12
>Number:         2393
>Category:       bin
>Synopsis:       gxditview should be linked with -lSM and -lICE when using X11R6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 10 14:20:09 1996
>Last-Modified:
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        NetBSD-current 960509
>Environment:
	
System: NetBSD ed209 1.1B NetBSD 1.1B (ED209) #0: Fri May 10 01:02:33 MET DST 1996 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386

Machine: i386
>Description:
	Trying to link gxditview statically using X11R6 causes missing symbols
	to be reported since gxditview is not linked against the SM and ICE
	libraries.
>How-To-Repeat:
	try "cd /usr/src/gnu/usr.bin/groff/xditview" and then
	"make LDFLAGS=-Wl,-Bstatic".
>Fix:
*** gnu/usr.bin/groff/xditview/Makefile-	Sat Oct 14 01:31:39 1995
--- gnu/usr.bin/groff/xditview/Makefile	Sun Oct 29 02:56:07 1995
***************
*** 16,21 ****
--- 16,24 ----
  XINCDIR=	/usr/X386/include
  XLIBDIR=	/usr/X386/lib
  .endif
+ .if exists($(XLIBDIR)/libSM.a)
+ LIBXTR6=	-lSM -lICE
+ .endif
  
  .if defined(XINCDIR) && defined(XLIBDIR)
  BINDIR=		/usr/bin
***************
*** 24,30 ****
  CFLAGS+=	-I$(XINCDIR) -DFONTPATH=\"/usr/share/groff_font\"
  SRCS+=		xditview.c Dvi.c draw.c font.c lex.c page.c parse.c \
  		XFontName.c DviChar.c device.c
! LDADD+=		-L$(XLIBDIR) -lXaw -lXmu -lXt -lXext -lX11 -lm 
  DPADD+=		$(LIBM)
  
  afterinstall:
--- 27,33 ----
  CFLAGS+=	-I$(XINCDIR) -DFONTPATH=\"/usr/share/groff_font\"
  SRCS+=		xditview.c Dvi.c draw.c font.c lex.c page.c parse.c \
  		XFontName.c DviChar.c device.c
! LDADD+=		-L$(XLIBDIR) -lXaw -lXmu -lXt $(LIBXTR6) -lXext -lX11 -lm 
  DPADD+=		$(LIBM)
  
  afterinstall:
>Audit-Trail:
>Unformatted: