Subject: Re: can't compile anymore / Syntax error: word unexpected (expecting
To: Thomas Feddersen <thomas.feddersen@t-online.de>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-users
Date: 10/26/2006 19:03:39
Thomas Feddersen wrote:
> Attached please find the output from "make PKG_DEBUG_LEVEL=1"
> How can you ever read anything meaningful out ouf that?

The *.out file you sent me contains a line that starts with

 > *** Error

The error message came from the shell, so the cause is usually the 
command directly above that line. In your case, this is:

 > case /usr/pkg in ) buildlink_dir="..." ;;

This information is useful to see which code is executed. So I did a 
"grep -wr buildlink_dir $pkgsrcdir/mk", and found that the code comes 
from the file mk/buildlink3/bsd.buildlink3.mk. The lines over there read:

 > case ${BUILDLINK_PREFIX.${_pkg_}} in
 > ${X11BASE}) buildlink_dir="${BUILDLINK_X11_DIR}" ;;

Comparing that with the shell command above means that the variable 
X11BASE must be either undefined or empty.

The next question is: Why is that variable empty?

"make help topic=X11BASE" does not return anything useful in this case.
"grep -wrl X11BASE $pkgsrcdir/doc/guide" returns some matches, so let's 
look them up.

Unfortunately, the pkgsrc guide isn't very good at describing X11BASE, 
so I will have to look up the implementation in $pkgsrcdir/mk. I ran 
"grep -wrl ^X11BASE $pkgsrcdir/mk" to see which file defines X11BASE:

 > mk/bulk/pre-build
 > mk/pkginstall/header
 > mk/bsd.prefs.mk

Two of the three files are shell scripts, and bsd.prefs.mk contains some 
default values for variables that are _not_ user-settable. The 
definition depends on the X11_TYPE variable. Please run "make show-vars 
VARNAMES='X11_TYPE X11_BASE'" to show the values of these variables.

 > Is there any Howto or Man to it?

I don't think so, but maybe this explanation helps a bit.

Roland