Subject: problems configuring audio/mpg321
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <geos@epost.de>
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
fails.
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:

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

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
/usr/people/schwarz/pkgsrc/audio/mpg321/work/.buildlink/bin/.transform.s
ed

yields just X.

Why does it transorm away this argument?

Can anyone explain what is going wrong here?
Thanks. 
 

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 geos@epost.de     +49 177 8811442