Subject: Re: Weird problem building some packages
To: None <firstname.lastname@example.org>
From: Tom Ivar Helbekkmo <email@example.com>
Date: 12/29/2002 10:46:55
I had a problem with packages using "buildlink2" for a while, which I
reported here a couple of weeks ago. Since then, I've figured out
that the problem actually is that, with the current buildlink kit,
the package source has to be physically on /usr/pkgsrc -- the reason
things didn't work for me was that my /usr/pkgsrc was a symlink to
/usr/local/pkgsrc (I had more disk space available there). Changing
the symlink to a nullfs mount fixed it.
The full text of my previous message follows below. Note that I say
that when running the exact same command line manually, it works.
I've since found out that all it takes to make it fail from the manual
command line is to use a PATH that causes ...work/.buildlink/bin/cc to
be run instead of the normal cc. As far as I can tell, the problem is
that there are sed scripts that assume that /usr/pkgsrc/... and
/usr/local/... are non-overlapping, distinct prefixes. If this can't
be changed to something that doesn't trip up as easily, perhaps the
buildlink kit could be modified to check the location of the package
source, and produce an error message if it's in the wrong place?
> I'm seeing a strange situation on one of my i386-current systems,
> which affects some package builds. It's so far occured during the
> build of mozilla and rpm, and I'll give an example from the latter:
> gmake: Entering directory `/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/misc'
> cc -I/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4 -I/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4 -O2 -pipe -I/usr/local/include -DHAVE_CONFIG_H -I/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/lib -I/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/misc -I/usr/local/include -c -o getmntent.o getmntent.c
> In file included from getmntent.c:1:
> miscfn.h:4: config.h: No such file or directory
> gmake: *** [getmntent.o] Error 1
> gmake: Leaving directory `/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/misc'
> It's not finding config.h, but look:
> athene# ls -l /usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/config.h
> -rw-r--r-- 1 root wheel 4485 Dec 13 08:39 /usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4/config.h
> Note the "-I/usr/local/pkgsrc/misc/rpm/work/rpm-2.5.4" in the command
> line. In fact, if I chdir to the directory and run the cc command
> manually, just the way it's output by gmake above, it works -- the
> compile completes without error.
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway
www.eunet.no T: +47-22092958 M: +47-93013940 F: +47-22092901