x11/nvidia-driver build failure in head/i386 @r253985 with clang

Jeff Roberson jroberson at jroberson.net
Wed Aug 7 18:51:04 UTC 2013


On Wed, 7 Aug 2013, David Wolfskill wrote:

> On Wed, Aug 07, 2013 at 01:20:34PM +0000, Alexey Dokuchaev wrote:
>> On Wed, Aug 07, 2013 at 06:02:41AM -0700, David Wolfskill wrote:
>>> [...]
>>> nvidia_subr.c:997:19: error: incompatible pointer types passing 'vm_map_t'
>>> (aka 'struct vm_map *') to parameter of type 'struct vmem *' [-Werror,
>>> -Wincompatible-pointer-types]
>>>         kmem_free(kernel_map,
>>>                   ^~~~~~~~~~
>>> @/vm/vm_extern.h:58:29: note: passing argument to parameter here
>>> void kmem_free(struct vmem *, vm_offset_t, vm_size_t);
>>
>> I've tested the new driver on my Julyish -CURRENT and it was all fine...
>> I suspect the problem might be with Jeff's r254025 (CC'ed).  I will see
>> what I can do about it, thanks for your report!
>
> Glad to heko!
>
>>> In the mean time, I will try to figure out what's wrong:
>>> nvidia-driver-304.51 built/ran OK in head/i386 @r253985 (with clang).
>>
>> Please share your findings once you have them. :-)
>
> Build still fails in head/i386 @r254052, similarly:
>
> ...
> clang -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -fno-common   -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -c nvidia_subr.c
> nvidia_subr.c:948:33: error: incompatible pointer types passing 'vm_map_t' (aka 'struct vm_map *') to parameter of type 'struct vmem *' [-Werror,-Wincompatible-pointer-types]
>    address = kmem_alloc_contig(kernel_map, size, flags, 0,
>                                ^~~~~~~~~~
> @/vm/vm_extern.h:54:44: note: passing argument to parameter here
> vm_offset_t kmem_alloc_contig(struct vmem *, vm_size_t size, int flags,
>                                           ^
> nvidia_subr.c:997:19: error: incompatible pointer types passing 'vm_map_t' (aka 'struct vm_map *') to parameter of type 'struct vmem *' [-Werror,-Wincompatible-pointer-types]
>        kmem_free(kernel_map,
>                  ^~~~~~~~~~
> @/vm/vm_extern.h:58:29: note: passing argument to parameter here
> void kmem_free(struct vmem *, vm_offset_t, vm_size_t);
>                            ^
> ....
>
> Not sure how much further I'll be able to get for a while; I'm
> out-of-town and Internet access is a bit flaky.  Sorry...
>

This is my fault.  The first argument to the kmem_ functions should now be 
kernel_arena or kmem_arena.  I don't know how to modify ports but I can 
produce a patch later today to resolve this unless someone beats me to it. 
It will be a simple substitution based on version.

Jeff


> Peace,
> david
> -- 
> David H. Wolfskill				david at catwhisker.org
> Taliban: Evil men with guns afraid of truth from a 14-year old girl.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
>


More information about the freebsd-ports mailing list