Subject: problems configuring audio/mpg321
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 01/24/2004 23:13:33
I have severe problems configuring audio/mpg321. Maybe someone on the
list can help me out?

I have narrowed it down to the following issue: the configure script
tries to compile confest.c calling (a bit simplified) cc conftest.c
-L/usr/local/pkgsrc/lib -lz.
The compiler complains it cannot find a file for -lz, and configure thus
What happens is that it is not directly /usr/bin/cc which is being
called but rather a (/bin/ksh) wrapper script in work/.buildlink/bin
(also called cc).
This script contains the following lines to build the real cc command
line (eval exec $cmd) called eventually:

while $test $# -gt 0; do
        arg="$1"; shift
        . $private_cache
        case $skipcache,$cachehit in
        no,no)  . $cache ;;
        case $cachehit in
        no)     . $logic ;;
        cmd="$cmd $arg"

This, as can be verified from the wrapperlog, in my case throws away the
-L/usr/local/pkgsrc/lib arg (from the args that the cc script used to be
called with). That is why the real cc afterwards does not find libz.

Forther research shows that the problem appears to be the following
(called from work/.buildlink/bin/.logic-trans):

echo "X-L/usr/local/pkgsrc/lib" | /usr/local/bin/sed -f

yields just X.

Why does it transorm away this argument?

Can anyone explain what is going wrong here?

Georg Schwarz     +49 177 8811442