Subject: Re: pkgsrc compilation failure on redhat linux 7.2
To: Jan Schaumann <jschauma@netmeister.org>
From: Niilo Kajander <nk@atki.net>
List: tech-pkg
Date: 12/19/2002 07:23:44
On Wed, 18 Dec 2002 13:30:24 -0500
Jan Schaumann <jschauma@netmeister.org> wrote:
> Niilo Kajander <nk@atki.net> wrote:
>
> > On OpenBSD/i386 it worked fine, some packages got built nicely but
> > converters/libiconv didn't.
> >
> > cc -I. -I. -I.. -I./.. -O1 -march=pentiumpro
> > -I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
> > -I/usr/pkgsrc/converters/libiconv/work/.buildlink/include
> > -DHAVE_CONFIG_H -DLIBDIR=\"/usr/pkg/lib\" -c ./localcharset.c -fPIC
> > -DPIC -o .libs/localcharset.o ./localcharset.c: In function
> > `get_charset_aliases': ./localcharset.c:115: syntax error before `/'
> > *** Error code 1
>
> This looks like the same error I'm getting on Irix. As far as I can
> tell, it's got to do with buildlink2's substitution of
> -DLIBDIR=\"/usr/pkg/lib\"
>
> In /usr/pkgsrc/converters/work/.buildlink/bin/.logic-trans you
> probably find
>
> -DLIBDIR=\"/usr/pkg/lib\") arg="-DLIBDIR=\\\"/usr/pkg/lib\\\"" ;; #1
> -DLIBDIR=\\/usr/pkg/lib\\) arg="-DLIBDIR=\\\/usr/pkg/lib\\\" ;; #1
Actually the only line which matches LIBDIR is:
-DLIBDIR=\"/usr/pkg/lib\") arg="-DLIBDIR=\\"/usr/pkg/lib\\"" ;; #1
>
> Note that the first one is correct, while the second one is a false
> duplicate (I believe), leading to the above error.
>
> If you add 'set -x' to your /usr/pkg/bin/libtool and to
> /usr/pkgsrc/mk/buildlink2/wrapper.sh you will get a lot of debugging
> output that shows how where and when the paramter is substituted.
> Maybe that can help to track down the problem. You may also want to
> set PKG_DEBUG_LEVEL=2 in /etc/mk.conf. (It generates a lot of
> debugging output, you probably want to redirect all output (stdout and
> stderr) to a log file.)
>
> -Jan
>
> --
> A common mistake that people make when trying to design something
> completely foolproof is to underestimate the ingenuity of complete
> fools.