Freescale / kernel-module-imx-gpu-viv

FSL Community fork of Vivante i.MX GPU Linux kernel driver
GNU General Public License v2.0
54 stars 30 forks source link

cross-compilation is failing #13

Closed R3D9477 closed 5 years ago

R3D9477 commented 5 years ago

Hi. I tried to cross-compile this module with gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabihf and process was failed with:

drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_lock’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:241:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:241:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:241:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_unlock’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:282:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:282:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:282:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_cache’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:329:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:329:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:329:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_query’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:387:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:387:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:387:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_timestamp’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:430:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:430:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:430:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_set_tiling’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:464:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:464:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:464:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_get_tiling’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:499:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:499:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:499:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_attach_aux’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:536:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:536:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:536:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:555:44: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
         gem_ts_obj = drm_gem_object_lookup(file, args->ts_handle);
                                            ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:555:50: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
         gem_ts_obj = drm_gem_object_lookup(file, args->ts_handle);
                                                  ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:555:22: error: too few arguments to function ‘drm_gem_object_lookup’
         gem_ts_obj = drm_gem_object_lookup(file, args->ts_handle);
                      ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function ‘viv_ioctl_gem_ref_node’:
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:602:37: error: passing argument 1 of ‘drm_gem_object_lookup’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                     ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_device *’ but argument is of type ‘struct drm_file *’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:602:43: error: passing argument 2 of ‘drm_gem_object_lookup’ makes pointer from integer without a cast [-Werror=int-conversion]
     gem_obj = drm_gem_object_lookup(file, args->handle);
                                           ^~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: expected ‘struct drm_file *’ but argument is of type ‘__u32 {aka unsigned int}’
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
                        ^~~~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:602:15: error: too few arguments to function ‘drm_gem_object_lookup’
     gem_obj = drm_gem_object_lookup(file, args->handle);
               ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:59:0:
include/drm/drm_gem.h:178:24: note: declared here
 struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,

What I'm doing wrong? Thanks!

otavio commented 5 years ago

It is likely missing something on your toolchain. We usually build it inside Yocto Project or using the Yocto Project generated toolchain, so it works fine in case you have all dependencies available.

R3D9477 commented 5 years ago

@otavio Ok, thanks for answer