Subject: wrapper problem with X.Org from pkgsrc
To: None <tech-pkg@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: tech-pkg
Date: 11/12/2004 00:57:51
Hello,

misc/openoffice fails to build with X.Org which was built by pkgsrc.
It relates to wrapper.  I can build it with `NO_WRAPPER=yes'.

# cd /usr/pkgsrc/misc/openoffice && make
===> Checking for vulnerabilities in openoffice-1.1.1nb2
=> Checksum OK for openoffice-1.1.1/OOo_1.1.1p1_source.tar.bz2.
=> Checksum OK for openoffice-1.1.1/gpc231.tar.Z.
=> Checksum OK for openoffice-1.1.1/ooo_addons_111p1.tar.bz2.
=> Checksum OK for openoffice-1.1.1/helpcontent_81_unix.tgz.
===> Extracting for openoffice-1.1.1nb2
[snip]
mkdir ./unxbsdi2.pro/misc/build/nas-1.6/
mkdir: ./unxbsdi2.pro/misc/build/nas-1.6/: File exists
cd ./unxbsdi2.pro/misc/build/nas-1.6/ && xmkmf  && touch so_configured_nas
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/pkg/xorg/lib/X11/config
Imakefile.c:16: Imake.tmpl: No such file or directory
imake: Exit code 1.
  Stop.
dmake:  Error code 1, while making './unxbsdi2.pro/misc/build/so_configured_nas'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /usr/pkgsrc/misc/openoffice/work/oo_1.1
.1_src/nas
dmake:  Error code 1, while making 'build_all'
---* TG_SLO.MK *---
*** Error code 255

Stop.
make: stopped in /usr/pkgsrc/misc/openoffice
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/misc/openoffice
#

In wrapper phase, /usr/pkg/xorg/bin is not included in PATH.
Therefore wrapper fails to wrap imake.  Then if imake is executed,
it invokes wrapper's cc and wrapper replaces the arguments.

work/.work.log:

[*] /usr/pkgsrc/misc/openoffice/work/.wrapper/bin/cc -I. -D__i386__ -m32 -traditional -D__i386__ -DUseInstalled -I/usr/pkg/xorg/lib/X11/config -E Imakefile.c
<.> /usr/pkgsrc/misc/openoffice/work/.gcc/bin/gcc -I. -D__i386__ -m32 -traditional -DUseInstalled -I/usr/pkgsrc/misc/openoffice/work/.x11-buildlink/lib/X11/config -E Imakefile.c -I/usr/pkgsrc/misc/openoffice/work/.buildlink/include -L/work/tmp/pkgsrc/misc/openoffice/work/.buildlink/lib

  [*] original command
  <.> replaced command

Because Imake.tmpl does not exist in
/usr/pkgsrc/misc/openoffice/work/.x11-buildlink/lib/X11/config, it
fails to build.

This package uses imake to build.  Therefore the definitions which
is defined with `USE_IMAKE=yes' are needed, I think.  However,
`USE_IMAKE=yes' can't be added for this package because Imakefile
does not exist in the top of source directory.

Any ideas how to fix this?
-- 
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp