Building NVIDIA 418 on the latest Manjaro

I’m getting the following error log:

DKMS make.log for nvidia-418.113 for kernel 6.6.8-2-MANJARO (x86_64)
Mon Dec 25 01:47:29 AM EST 2023
make[1]: Entering directory '/usr/lib/modules/6.6.8-2-MANJARO/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 13.2.1 20230801
  You are using:           cc (GCC) 13.2.1 20230801
  SYMLINK /var/lib/dkms/nvidia/418.113/build/nvidia/nv-kernel.o
  SYMLINK /var/lib/dkms/nvidia/418.113/build/nvidia-modeset/nv-modeset-kernel.o
 CONFTEST: INIT_WORK
 CONFTEST: remap_pfn_range
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: follow_pfn
 CONFTEST: vmap
 CONFTEST: set_pages_uc
 CONFTEST: list_is_first
 CONFTEST: set_memory_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: change_page_attr
 CONFTEST: pci_get_class
 CONFTEST: pci_choose_state
 CONFTEST: vm_insert_page
 CONFTEST: acpi_device_id
 CONFTEST: acquire_console_sem
 CONFTEST: console_lock
 CONFTEST: kmem_cache_create
 CONFTEST: on_each_cpu
 CONFTEST: smp_call_function
 CONFTEST: acpi_evaluate_integer
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: acpi_walk_namespace
 CONFTEST: pci_domain_nr
 CONFTEST: pci_dma_mapping_error
 CONFTEST: sg_alloc_table
 CONFTEST: sg_init_table
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: efi_enabled
 CONFTEST: proc_create_data
 CONFTEST: pde_data
 CONFTEST: proc_remove
 CONFTEST: pm_vt_switch_required
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: write_cr4
 CONFTEST: of_get_property
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: of_get_ibm_chip_id
 CONFTEST: for_each_online_node
 CONFTEST: node_end_pfn
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_remove_bus_device
 CONFTEST: request_threaded_irq
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: dma_map_resource
 CONFTEST: backlight_device_register
 CONFTEST: register_acpi_notifier
 CONFTEST: timer_setup
 CONFTEST: pci_enable_msix_range
 CONFTEST: compound_order
 CONFTEST: do_gettimeofday
 CONFTEST: dma_direct_map_resource
 CONFTEST: vmf_insert_pfn
 CONFTEST: remap_page_range
 CONFTEST: address_space_init_once
 CONFTEST: kbasename
 CONFTEST: fatal_signal_pending
 CONFTEST: list_cut_position
 CONFTEST: vzalloc
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: bitmap_clear
 CONFTEST: usleep_range
 CONFTEST: radix_tree_empty
 CONFTEST: radix_tree_replace_slot
 CONFTEST: pnv_npu2_init_context
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: get_user_pages_remote
 CONFTEST: get_user_pages
 CONFTEST: drm_gem_object_lookup
 CONFTEST: drm_atomic_state_ref_counting
 CONFTEST: drm_driver_has_gem_prime_res_obj
 CONFTEST: drm_atomic_helper_connector_dpms
 CONFTEST: drm_connector_funcs_have_mode_in_name
 CONFTEST: drm_framebuffer_get
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_dev_put
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: is_export_symbol_present_swiotlb_map_sg_attrs
 CONFTEST: is_export_symbol_present_swiotlb_dma_ops
 CONFTEST: i2c_adapter
 CONFTEST: pm_message_t
 CONFTEST: irq_handler_t
 CONFTEST: acpi_device_ops
 CONFTEST: acpi_op_remove
 CONFTEST: outer_flush_all
 CONFTEST: proc_dir_entry
 CONFTEST: scatterlist
 CONFTEST: sg_table
 CONFTEST: file_operations
 CONFTEST: vm_operations_struct
 CONFTEST: atomic_long_type
 CONFTEST: file_inode
 CONFTEST: task_struct
 CONFTEST: kuid_t
 CONFTEST: dma_ops
 CONFTEST: swiotlb_dma_ops
 CONFTEST: dma_map_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_present
 CONFTEST: vm_fault_has_address
 CONFTEST: backlight_properties_type
 CONFTEST: vmbus_channel_has_ringbuffer_page
 CONFTEST: kmem_cache_has_kobj_remove_work
 CONFTEST: sysfs_slab_unlink
 CONFTEST: fault_flags
 CONFTEST: atomic64_type
 CONFTEST: address_space
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: node_states_n_memory
 CONFTEST: drm_bus_present
 CONFTEST: drm_bus_has_bus_type
 CONFTEST: drm_bus_has_get_irq
 CONFTEST: drm_bus_has_get_name
 CONFTEST: drm_driver_has_legacy_dev_list
 CONFTEST: drm_driver_has_set_busid
 CONFTEST: drm_crtc_state_has_connectors_changed
 CONFTEST: drm_init_function_args
 CONFTEST: drm_mode_connector_list_update_has_merge_type_bits_arg
 CONFTEST: drm_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: kref_has_refcount_of_type_refcount_t
 CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
 CONFTEST: drm_crtc_helper_funcs_has_atomic_enable
 CONFTEST: drm_mode_object_find_has_file_priv_arg
 CONFTEST: dma_buf_owner
 CONFTEST: drm_connector_list_iter
 CONFTEST: drm_atomic_helper_swap_state_has_stall_arg
 CONFTEST: drm_driver_prime_flag_present
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_hyperv_available
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: drm_available
 CONFTEST: drm_atomic_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-frontend.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-instance.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-acpi.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-chrdev.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-cray.o
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-dma.o
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-frontend.c:12:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
  CC [M]  /var/lib/dkms/nvidia/418.113/build/nvidia/nv-gvi.o
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-instance.c:12:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-frontend.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-instance.o] Error 1
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-acpi.c:14:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv.c:13:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-acpi.o] Error 1
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv.o] Error 1
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-chrdev.c:14:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-chrdev.o] Error 1
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-cray.c:14:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-cray.o] Error 1
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-dma.c:14:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-dma.o] Error 1
In file included from /var/lib/dkms/nvidia/418.113/build/nvidia/nv-gvi.c:14:
/var/lib/dkms/nvidia/418.113/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: No such file or directory
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/nvidia/418.113/build/nvidia/nv-gvi.o] Error 1
make[2]: *** [/usr/lib/modules/6.6.8-2-MANJARO/build/Makefile:1913: /var/lib/dkms/nvidia/418.113/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.6.8-2-MANJARO/build'
make: *** [Makefile:81: modules] Error 2

Does anyone have an idea on how to fix it? I’ve followed a couple guides online and have the Open Source drivers disabled through the GRUB config. I’ve also tried applying these patches after some users reported having them fix 3xx version installs, and had the 6.5 patch apply successfully but not the 6.6 one. The driver also did not install properly. My build utilities are all up-to-date and I have the proper Linux headers installed.

  The kernel was built by: gcc (GCC) 13.2.1 20230801
  You are using:           cc (GCC) 13.2.1 20230801

I had those messages at updates for the compiler package but for me they usually show a different version number of gcc, not the gcc/cc difference shown here, My compiler mismatches can be fixed by booting into a TTY and running:
sudo dkms autoinstall
Try it, if it doesn’t work there’s no damage, build will just fail again.

1 Like

Just tried that and the error is the same. It says stdarg.h isn’t found, so maybe there’s a dependency I’ve missed?