From khera@kciLink.com  Fri Aug 18 12:21:23 2000
Return-Path: <khera@kciLink.com>
Received: from kci.kciLink.com (kci.kciLink.com [204.117.82.1])
	by hub.freebsd.org (Postfix) with ESMTP id CF8A637B42C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Aug 2000 12:21:22 -0700 (PDT)
Received: from onceler.kciLink.com (onceler.kciLink.com [204.117.82.2])
	by kci.kciLink.com (Postfix) with ESMTP id 443ABE8B4
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Aug 2000 15:21:22 -0400 (EDT)
Received: (from khera@localhost)
	by onceler.kciLink.com (8.9.3/8.9.3) id PAA05479;
	Fri, 18 Aug 2000 15:21:22 -0400 (EDT)
	(envelope-from khera@kci.kciLink.com)
Message-Id: <200008181921.PAA05479@onceler.kciLink.com>
Date: Fri, 18 Aug 2000 15:21:22 -0400 (EDT)
From: <khera@kciLink.com>
Reply-To: khera@kciLink.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: ports/audio/xwave fails to build on 4.1-STABLE
X-Send-Pr-Version: 3.2

>Number:         20705
>Category:       ports
>Synopsis:       xwave port fails to build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    trevor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 18 12:30:00 PDT 2000
>Closed-Date:    Mon Mar 5 14:37:55 PST 2001
>Last-Modified:  Mon Mar 05 14:38:36 PST 2001
>Originator:     Vivek Khera
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
>Environment:

	
all source cvsup'd today, buildworld today.

>Description:

	
xwave port fails to build, croaking with the following error:

cc -o xwave       -L/usr/X11R6/lib xwave.o filebrowse.o menu.o fileop.o edit.o graphics.o button.o       audio.o sample_settings.o misc.o status.o record_dialog.o       audio_file.o aifc.o effects.o help.o riff.o au.o  -L../lib -lfwf -lXaw -lXpm -lXmu -lXt -lX11 -L../ccitt -lccitt -L../adpcm2pcm -ladpcm -L../ieee -lieee -lm    -lxpg4  -Wl,-rpath,/usr/X11R6/lib
/usr/X11R6/lib/libXaw.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
../lib/libfwf.a(RadioGrp.o)(.data+0x20): undefined reference to `xfwfGroupClassRec'
../lib/libfwf.a(Toggle.o): In function `expose':
Toggle.o(.text+0x569): undefined reference to `xfwfButtonClassRec'
../lib/libfwf.a(Toggle.o)(.data+0x120): undefined reference to `xfwfButtonClassRec'
*** Error code 1

Stop in /u/onceler1/usr/ports/audio/xwave/work/xwave2-981109/src.
*** Error code 1


>How-To-Repeat:

	
cd /usr/ports/audio/xwave
make

>Fix:

	

don't know.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-ports 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Sat Aug 19 05:49:27 PDT 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20705 

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
 
 
 
Responsible-Changed-From-To: freebsd-ports->trevor 
Responsible-Changed-By: trevor 
Responsible-Changed-When: Mon Jan 8 11:07:37 PST 2001 
Responsible-Changed-Why:  
I'll look at this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20705 
State-Changed-From-To: open->closed 
State-Changed-By: trevor 
State-Changed-When: Mon Mar 5 14:37:55 PST 2001 
State-Changed-Why:  
committed--thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20705 
>Unformatted:
