Date: Mon, 1 Jan 2001 08:00:08 -0800 (PST) From: Martin Kraft <martin.kraft@fal.de> To: freebsd-ports@FreeBSD.org Subject: Re: ports/20705: xwave port fails to build Message-ID: <200101011600.f01G08814221@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/20705; it has been noted by GNATS. From: Martin Kraft <martin.kraft@fal.de> To: freebsd-gnats-submit@FreeBSD.org Cc: khera@kciLink.com, tkato@prontomail.ne.jp, reissell@cc.helsinki.fi, andrews@technologist.com, trevor@jpj.net, sblank@addcom.de Subject: Re: ports/20705: xwave port fails to build Date: Mon, 1 Jan 2001 16:39:59 +0100 Dear friends of FreeBSD and Xwave, the current xwave port in FreeBSD is a product of some people; at least Kato Tsuguru and Trevor Johnson did lot of the work. Being listed as the Maintainer of this port in the Makefile, I got some notices in the last 6 months from people having trouble building the port. I am sorry, to answer this late. Too busy. I guess, the current port has two problems: 1. If /usr/X11R6/lib/libfwf.a exists on the system, (eg. as a consequence of building the port /usr/ports/x11-toolkits/FWF before), xwave links this file instead of its own (older) libfwf.a. In src/Imakefile the line XLIBS= -L../lib -lfwf -lXaw -lXpm -lXmu -lXt -lX11 cannot guarantee, that libfwf.a is taken from ../lib, because imake includes -L/usr/X11R6/lib _BEFORE_ -L../lib. I am not experienced in compiler options, but replacing the above line by XLIBS= ../lib/libfwf.a -lXaw -lXpm -lXmu -lXt -lX11 does the job. I propose to replace patch-aa by this one: BEGIN OF NEW patch-aa --- src/Imakefile.orig Mon Nov 9 00:22:55 1998 +++ src/Imakefile Mon Jan 1 12:49:37 2001 @@ -13,8 +13,14 @@ PROGRAMS= xwave AUDIOLIBS=-L../ccitt -lccitt -L../adpcm2pcm -ladpcm -L../ieee -lieee -XLIBS= -L../lib -lfwf -lXaw -lXpm -lXmu -lXt -lX11 -LIBS= $(OSLIBS) $(XLIBS) $(AUDIOLIBS) -lm -lc + +# XLIBS= -L../lib -lfwf -lXaw -lXpm -lXmu -lXt -lX11 +# "-L../lib -lfwf" substituted by "../lib/libfwf.a" because Linker +# used /usr/X11R6/lib/libfwf.a on systems, where this file exists. +# 2001-01-01 Martin Kraft + +XLIBS= ../lib/libfwf.a -lXaw -lXpm -lXmu -lXt -lX11 +LIBS= $(OSLIBS) $(XLIBS) $(AUDIOLIBS) -lm NormalProgramTarget(xwave,$(OBJS),,$(LIBS),) END OF NEW patch-aa 2. The second (and more serious) problem arises during the build of xwave's own libfwf.a. Randomly, at least one of the OBJS is not 'ar'ed into libfwf. Is this a problem of the parallelized make? You can not repeat exactly the error; the next time, another of FWF's OBJS might be missing in libfwf.a. Maybe there is a problem related to the change in FWF/FWF.rules in VERSION 3.65 (see FWF/README.NOTES: "Hacked FWF.rules to make AddToLibrary try to build library only if objects are newer than library."). Since I am not at all a compiler and linker specialist, I propose, to do a final 'ar' of all OBJS after all of them are build. This can be done by adding an auxiliary target in FWF/Imakefile. I propose to replace patch-ap by this one: BEGIN OF NEW patch-ap --- FWF/Imakefile.orig Mon Nov 9 00:22:54 1998 +++ FWF/Imakefile Mon Jan 1 15:47:50 2001 @@ -9,14 +9,25 @@ MakeDirectories(all,$(ALLDIRS)) InitSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) MakeObjectsSubdirs($(SUBDIRS)) MakeExecsSubdirs($(SUBDIRS)) GatherDescriptionSubdirs($(SUBDIRS)) +MAINOBJS = src/Board/Board.o src/Button/Button.o src/Common/Common.o src/Frame/Frame.o src/Group/Group.o src/Label/Label.o src/RadioGroup/RadioGrp.o src/RowCol/RowCol.o src/Toggle/Toggle.o +MISCOBJS = src/misc/VarArgs.o +CONVOBJS = src/converters/long.o src/converters/icon.o src/converters/choosecol.o src/converters/StrToPmap.o src/converters/Pen.o src/converters/strarray.o +STRGOBJS = src/tabstring/DrawImageString.o src/tabstring/DrawString.o src/tabstring/Tablist2Tabs.o src/tabstring/TextWidth.o src/tabstring/strnchr.o + +$(FWF_LIBDIR)/auxtarget: $(MAINOBJS) $(MISCOBJS) $(CONVOBJS) $(STRGOBJS) + ar -r $(FWF_LIBDIR)/$(FWF_LIBNAME) $(MAINOBJS) $(MISCOBJS) $(CONVOBJS) $(STRGOBJS) + ranlib $(FWF_LIBDIR)/$(FWF_LIBNAME) + echo "lib complete." > $(FWF_LIBDIR)/auxtarget + #ifdef BuildExecs -AllTarget(init objects execs $(FWF_MANDIR)/fwf.man) +AllTarget(init objects execs $(FWF_LIBDIR)/auxtarget $(FWF_MANDIR)/fwf.man) #else -AllTarget(init objects $(FWF_MANDIR)/fwf.man) +AllTarget(init objects $(FWF_LIBDIR)/auxtarget $(FWF_MANDIR)/fwf.man) #endif ConstructIndex(init) END OF NEW patch-ap I am shure, the trick can be done much more nicer. At least, this modified patch did the trick for me. Hopefully all of you will be able to build xwave using these two modified patch files. Wishing you all the best for the new year 2001! Martin Kraft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101011600.f01G08814221>