Solved Missing pkg_descr when building bash dependencies

I'm trying to build a statically linked version of shells/bash and I am getting the following error from a dependency:

Code:
===>  Staging for gettext-tools-0.19.6
===>  gettext-tools-0.19.6 depends on executable: indexinfo - found
===>  Generating temporary packing list
** Missing pkg-descr for gettext-tools-0.19.6.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/gettext-tools
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/gettext-tools
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/shells/bash
*** Error code 1

Stop.
make: stopped in /usr/ports/shells/bash

I'm getting a similar error in the devel/m4 port as well as shown below:

Code:
===>  Staging for m4-1.4.17_1,1
===>  m4-1.4.17_1,1 depends on executable: indexinfo - found
===>  Generating temporary packing list
** Missing pkg-descr for m4-1.4.17_1,1.
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/bison
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/bison
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/shells/bash
*** Error code 1

Stop.
make: stopped in /usr/ports/shells/bash

I can get around this by installing pre-compiled packages using the pkg install command, but what I want to know is why am I getting this error? Is this a bug or is there something else going on?

I checked the port and the file pkg-descr is present. I updated the ports tree with make update using subversion right before I tried to build it. The command that I used to initially create the ports tree is svn checkout https://svn.freebsd.org/ports/head /usr/ports. So I am assuming that it's using the same server to update the ports tree.

Additionally, this is not the first time that I have ran into this problem. Any ideas as to what is going on?

EDIT:

On further investigation, I ran the following command:
make -V DESCR -V PKGDIR -V MASTERDIR
It printed the following results:
Code:
/usr/ports/packages/pkg-descr
/usr/ports/packages
/usr/ports/devel/gettext-tools

I ran make with the -dA option and I cannot find where PGKDIR is picking up that value. So, I dug into bsd.port.mk and I found where it is being assigned but it apparently isn't. The output file does not have a "Global : PKGDIR" (Spaces inserted to prevent smilies from being printed) line anywhere. It is getting it from somewhere, now the question is where.

Any ideas?
 
Code:
/usr/ports/packages/pkg-descr
/usr/ports/packages
/usr/ports/devel/gettext-tools
Hmm. Here's what it outputs on my machine (I see Global:PKGDIR = ${MASTERDIR} too):
Code:
/usr/ports/devel/gettext-tools/pkg-descr
/usr/ports/devel/gettext-tools
/usr/ports/devel/gettext-tools
Do you have anything in /etc/make.conf?
 
/etc/make.conf was one of the first things I checked. I'm not sure what else it could be. I also noticed that in bsd.port.mk, I noticed that the assignment being used is PKGDIR?=${MASTERDIR} where the ?= operator is a conditional assignment which basically means that 'assign this variable if it isn't already assigned (or defined).' So it's getting it BEFORE bsd.port.mk is even read in.
 
After lots and lots of digging, I figured out where the errant PKGDIR value was coming from: The environment. I found it was being set in .profile. Removing it fixed the problem. Since .profile was originally written 10-15 years ago, it's time for an audit and update as the primary shell on this system is a statically linked shells/pdksh.
 
Last edited by a moderator:
Back
Top