kitakar5525 / surface-ipu3-cameras

20 stars 8 forks source link

Running make errors and doesn't work #18

Open undefined06855 opened 1 year ago

undefined06855 commented 1 year ago

If I run make the following happens:

make -C "/lib/modules/"5.19.0-41-generic"/build" M=/home/undefined0/projects/cameras/surface-ipu3-cameras modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-41-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov5693.o
  CC [M]  /home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov7251.o
  CC [M]  /home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.o
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c: In function ‘ov8865_mipi_configure’:
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c:1475:17: error: initialization of ‘struct v4l2_fwnode_bus_mipi_csi2 *’ from incompatible pointer type ‘struct v4l2_mbus_config_mipi_csi2 *’ [-Werror=incompatible-pointer-types]
 1475 |                 &sensor->endpoint.bus.mipi_csi2;
      |                 ^
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c:1476:49: error: invalid use of undefined type ‘struct v4l2_fwnode_bus_mipi_csi2’
 1476 |         unsigned int lanes_count = bus_mipi_csi2->num_data_lanes;
      |                                                 ^~
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c: In function ‘ov8865_state_mipi_configure’:
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c:2245:17: error: initialization of ‘struct v4l2_fwnode_bus_mipi_csi2 *’ from incompatible pointer type ‘struct v4l2_mbus_config_mipi_csi2 *’ [-Werror=incompatible-pointer-types]
 2245 |                 &sensor->endpoint.bus.mipi_csi2;
      |                 ^
/home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.c:2290:36: error: invalid use of undefined type ‘struct v4l2_fwnode_bus_mipi_csi2’
 2290 |         lanes_count = bus_mipi_csi2->num_data_lanes;
      |                                    ^~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/undefined0/projects/cameras/surface-ipu3-cameras/drivers/media/i2c/ov8865.o] Error 1
make[1]: *** [Makefile:1850: /home/undefined0/projects/cameras/surface-ipu3-cameras] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-41-generic'
make: *** [Makefile:9: all] Error 2

And if I run sudo make instead (Didn't think this would do anything, really)

make -C "/lib/modules/"5.19.0-41-generic"/build" M= modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-41-generic'
  SYNC    include/config/auto.conf.cmd
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[3]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make[2]: *** [Makefile:632: syncconfig] Error 2
make[1]: *** [Makefile:734: include/config/auto.conf.cmd] Error 2
make[1]: *** [include/config/auto.conf.cmd] Deleting file 'include/generated/autoconf.h'
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-41-generic'
make: *** [Makefile:9: all] Error 2

Are there some dependencies or something I've missed out?

undefined06855 commented 1 year ago

I installed a couple of packages I think it needed, flex and bison, and sudo make gives this error instead:


make -C "/lib/modules/"5.19.0-41-generic"/build" M= modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-41-generic'
  SYNC    include/config/auto.conf.cmd
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'. Stop.
make[1]: *** [arch/x86/Makefile:232: archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-41-generic'
make: *** [Makefile:9: all] Error 2```