Subject: Re: aperture driver and 1.6I
To: None <>
From: MAEKAWA Masahide <>
List: current-users
Date: 10/11/2002 21:36:37
Rick Kelly <> wrote:
>>Just upgraded my -current machine to 1.6I. The aperture driver no longer
>>works. I'm running (or was running) XFree86 < 4.0. I tried rebuilding the
>>aperture driver, but it doesn't compile anymore.
>depend ===> module
>mkdep -a   -nostdinc -I. -I/usr2/src/pkgsrc/sysutils/aperture/work/module -isystem /usr/src/sys -isystem /usr/src/sys/arch -D_KERNEL -D_LKM  aperture.c i686_mem.c k6_mem.c xf86_mod.c
>xf86_mod.c:34: macro `MOD_DEV' used with only 4 args
>mkdep: compile failed.

In my analysis,
``make BSDSRCDIR=/some/where ...'' works fine.
``make -DBSDSRCDIR=/some/where ..'' doesn't work.

In the man page of make(1),

     make [-BeikNnqrstW] [-D variable] [-d flags] [-f makefile] [-I directory]
          [-j max_jobs] [-J private] [-m directory] [-T file] [-V variable]
          [variable=value] [target ...]

So we should use the former one, i think.

But pkgsrc warns us the follows if not set BSDSRCDIR,

% make
=> Checksum OK for aperture-2.0nb2/apNetBSD.shar.
===> Extracting for aperture-2.0nb2
Please set BSDSRCDIR in /etc/mk.conf, pointing it
to a directory that contains sources that match
your currently running system (esp. kernel), e.g.


``O.K. I will set it in /etc/mk.conf.'' This is wrong.

Even if we set BSDSRCDIR in /etc/mk.conf, the build will fail.
Because pkgsrc seems to define BSDSRCDIR by using -D.
so BSDSRCDIR doesn't have the proper path.

At least, we can see this problem when build emulators/vmware-module
and sysutils/aperture.

I am not the guru of pkgsrc. I don't know the correct fix.

The wordaround is:
    Don't trust warning by make(1).
    Don't use -DBSDSRCDIR=/some/where
    Use BSDSRCDIR=/some/where.

--- MAEKAWA Masahide
--- Key fingerprint = BC5E D8CB 816C 2CB5 8560  FDE3 6CB8 BF5D 8D50 F2EE