Subject: Re: pkg/15216: building japanese/freewnn-server fails
To: None <taya@ba2.so-net.ne.jp>
From: Masao Uebayashi <uebayasi@soum.co.jp>
List: netbsd-bugs
Date: 01/12/2002 23:43:07
[ Forgot to send the previous mail to netbsd-bugs, so I quote the
  whole message. ]

> > >Description:
> > 	building japanese/freewnn-server fails.
> > 	
> > making all in Wnn/pubdic...
> > make FZK_FLAG=-DKANSAI std.fzk
> > cc -E -traditional  -DKANSAI fzk.master | egrep -v '^(# |$)' | ../../Wnn/jutil/atof -h ../../Wnn/jd/hinsi.data std.fzk
> > cc: fzk.master: linker input file unused since linking not done
> > Bad format near line 0 "".
> > File must start with \attribute
> > *** Error code 1
> > 
> > Stop.
> (snip)
> 
> Please apply the flollowing patch to misc/freewnn-common.
> 
> Regards,
> Masao
> 
> Index: patches/patch-ad
> ===================================================================
> RCS file: /cvsroot/pkgsrc/misc/freewnn-common/patches/patch-ad,v
> retrieving revision 1.2
> diff -u -r1.2 patch-ad
> --- patch-ad	1999/09/03 04:24:10	1.2
> +++ patch-ad	2002/01/12 14:32:46
> @@ -1,11 +1,23 @@
> -$NetBSD: patch-ad,v 1.2 1999/09/03 04:24:10 sakamoto Exp $
> +$NetBSD$
>  
> ---- ./configure.in.orig	Tue Apr  6 12:12:19 1999
> -+++ ./configure.in	Thu Sep  2 14:57:48 1999
> -@@ -55,5 +55,5 @@
> +--- configure.in.orig	Tue Apr  6 03:12:19 1999
> ++++ configure.in
> +@@ -54,11 +54,15 @@
> +         CPP=/lib/cpp
>       fi
>       ;;
>  -"FreeBSD")
> ++dnl cpp is used to process some *.fzk files, which are not C source but ordinal
> ++dnl text, so no header file is needed.
> ++dnl XXX Newer NetBSD's cpp is renamed as /usr/libexec/cpp0, not
> ++dnl XXX /usr/libexec/cpp, so invoke the right one here.
>  +"FreeBSD" | "NetBSD" | "OpenBSD")
>       CCOPTIONS="-DCSRG_BASED"
>       CDEBUGFLAGS="-O2 -fno-strength-reduce"
> +-    if test -x /usr/libexec/cpp; then
> +-        CPP=/usr/libexec/cpp
> ++    if test -x /usr/bin/cpp; then
> ++        CPP=/usr/bin/cpp
> +     fi
> +     ;;
> + "SunOS")
> Index: patches/patch-ae
> ===================================================================
> RCS file: /cvsroot/pkgsrc/misc/freewnn-common/patches/patch-ae,v
> retrieving revision 1.2
> diff -u -r1.2 patch-ae
> --- patch-ae	1999/09/03 04:24:10	1.2
> +++ patch-ae	2002/01/12 14:32:46
> @@ -1,11 +1,19 @@
> -$NetBSD: patch-ae,v 1.2 1999/09/03 04:24:10 sakamoto Exp $
> +$NetBSD$
>  
> ---- ./configure.orig	Tue Apr  6 12:12:18 1999
> -+++ ./configure	Thu Sep  2 14:57:48 1999
> -@@ -705,5 +705,5 @@
> +--- configure.orig	Sat Jan 12 23:26:04 2002
> ++++ configure
> +@@ -704,11 +704,11 @@
> +         CPP=/lib/cpp
>       fi
>       ;;
>  -"FreeBSD")
>  +"FreeBSD" | "NetBSD" | "OpenBSD")
>       CCOPTIONS="-DCSRG_BASED"
>       CDEBUGFLAGS="-O2 -fno-strength-reduce"
> +-    if test -x /usr/libexec/cpp; then
> +-        CPP=/usr/libexec/cpp
> ++    if test -x /usr/bin/cpp; then
> ++        CPP=/usr/bin/cpp
> +     fi
> +     ;;
> + "SunOS")

The comment was partialy wrong, although the patch was correct. The
cpp to be used is not /usr/libexec/cpp0 but /usr/bin/cpp. The reason
the comment said that /usr/libexec/cpp0 is to be used was that I first
found that /usr/libexec/cpp has been renamed as
/usr/libexec/cpp0. Next I found that /usr/libexec/cpp* invokes linker,
which is apparently not needed in this context.

Regards,
Masao