Subject: Re: pkg/8829: cannot build new lesstif with old lesstif still installed
To: None <nocturne@arepa.com>
From: Greg A. Woods <woods@most.weird.com>
List: netbsd-bugs
Date: 11/20/1999 15:46:57
[ On Friday, November 19, 1999 at 18:33:07 (-0500), nocturne@arepa.com wrote: ]
> Subject: pkg/8829: cannot build new lesstif with old lesstif still installed
>
> > /usr/local/bin/pkglibtool-a.out-1.2p2 --mode=link cc -O2 -I/usr/X11R6/include -DNONSTANDARD_CONVERTERS -DLESSTIF_VERBOSE -DLESSTIF_PRODUCTION -Wl,-R/lib -L/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/local/lib -L/usr/local/lib -Wl,-R/lib -L/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/local/lib -L/usr/local/lib -o mwm colormaps.o cursors.o decorate.o defaults.o desktop.o events.o functions.o icons.o menus.o misc.o move.o mwm.o mwmerr.o mwmparse.o mwmlex.o pager.o pan.o props.o resize.o resources.o screens.o windows.o ../../../lib/Xm-2.0/libXm.la -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11
> > cc -O2 -I/usr/X11R6/include -DNONSTANDARD_CONVERTERS -DLESSTIF_VERBOSE -DLESSTIF_PRODUCTION -Wl,-R/lib -L/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/local/lib -L/usr/local/lib -Wl,-R/lib -L/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/local/lib -L/usr/local/lib -o .libs/mwm colormaps.o cursors.o decorate.o defaults.o desktop.o events.o functions.o icons.o menus.o misc.o move.o mwm.o mwmerr.o mwmparse.o mwmlex.o pager.o pan.o props.o resize.o resources.o screens.o windows.o -R/usr/X11R6/lib -L../../../lib/Xm-2.0/.libs -lXm -L/lib -L/usr/X11R6/lib -L/usr/local/lib -L/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11
> > icons.o: Undefined symbol `__LtXpmReadFileToImage' referenced from text segment
> > collect2: ld returned 1 exit status
> > *** Error code 1
>
> This is caused because the linking, by its syntax, finds the obsolete
> -lXm before the newly built one, and thus cannot find the symbol
> LtXpmReadFileToImage which was added to libXm between the obsolete
> library version and the new revision.
Yes. pkgsrc/mk/pkg.bsd.mk is putting -L/usr/X11R6/lib in the wrong place.
Note how it appears both early in the command-line and then again much
later *after* "-lXm" appears.
I started a thread about this very problem in tech-pkg last month.
Since then I've been using this change quite successfully to solve the
problem (though I've not yet tried it with the new lesstif! ;-):
Index: pkgsrc/mk/bsd.pkg.mk
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1.1.17
diff -c -c -r1.1.1.17 bsd.pkg.mk
*** pkgsrc/mk/bsd.pkg.mk 1999/11/15 19:31:54 1.1.1.17
--- pkgsrc/mk/bsd.pkg.mk 1999/11/20 18:48:16
***************
*** 172,180 ****
PATCH_SUM_FILE?= ${FILESDIR}/patch-sum
.if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11)
! LDFLAGS+= -Wl,-R${MOTIFBASE}/lib -L${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib
.endif
! LDFLAGS+= -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
--- 172,180 ----
PATCH_SUM_FILE?= ${FILESDIR}/patch-sum
.if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11)
! LDFLAGS+= -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib
.endif
! LDFLAGS+= -Wl,-R${LOCALBASE}/lib
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>