Subject: wrapper cc does into infinite loop
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 11/13/2004 20:30:34
With the current pkgsrc, when I try to compile a package it goes into an
endless loop (until the machine runs out of processes) as soon as the wrapper
cc is called.
Some investigation shows that work/.wrapper/bin/cc calls itself (recursively)
with the eval $cmd statement at the end of the script.
In the beginning of work/.wrapper/bin/cc cmd is inistailized to
cmd="/usr/people/schwarz/pkgsrc/net/netcat/work/.wrapper/bin/cc" (as an example
for net/netcat; same with other packages).
This happens because in mk/wrapper/ it reads
Now this is substituted in by

Before that, absdir is set like this:

        case $${wrappee} in                                             \
        /*)                                                             \
                absdir=;                                                \
                ;;                                                      \
        *)                                                              \
                save_IFS="$$IFS";                                       \
                IFS=":";                                                \
                for dir in $${PATH}; do                                 \
                        case $${dir} in                                 \
                        *${BUILDLINK_DIR}*)                             \
                                ;;                                      \
                        *)                                              \
                                if [ -f $${dir}/$${wrappee} ] ||        \
                                   [ -h $${dir}/$${wrappee} ] &&        \
                                   [ -x $${dir}/$${wrappee} ]; then     \
                                        absdir=$${dir}/;                \
                                        wrappee=$${absdir}$${wrappee};  \
                                        break;                          \
                                fi;                                     \
                                ;;                                      \
                        esac;                                           \
                done;                                                   \

I assume that PATH contains work/.wrapper/bin, so this is why absdir must be
set accordingly. I'm not sure why this happens, nor do I understand why absdir
is necessary at all (before finally calling eval cmd, work/.wrapper/bin/cc sets
PATH so that it includes the compiler's bin dir).

I removed the absdir mumbo from, and then it worked.   

Georg Schwarz   +49 177 8811442