Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to build kernel modules after 530.41.03 #468

Open
apprehensions opened this issue Mar 1, 2023 · 19 comments · May be fixed by #609
Open

Failure to build kernel modules after 530.41.03 #468

apprehensions opened this issue Mar 1, 2023 · 19 comments · May be fixed by #609

Comments

@apprehensions
Copy link

NVIDIA Open GPU Kernel Modules Version

530.30.02

Operating System and Version

KISS

Kernel Release

6.1.13

Build Command

sh NVIDIA-Linux-x86_64-530.30.02-no-compat32.run --extract-only
cd kernel
make modules

Terminal output/Build Log

Creating directory NVIDIA-Linux-x86_64-530.30.02-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 530.30.02..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.2.0
  You are using:           cc (GCC) 12.2.0
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: set_pages_uc
 CONFTEST: list_is_first
 CONFTEST: set_memory_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: set_pages_array_uc
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: pde_data
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: dma_attr_macros
 CONFTEST: dma_map_page_attrs
 CONFTEST: write_cr4
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: of_get_ibm_chip_id
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_rebar_get_possible_sizes
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: dma_map_resource
 CONFTEST: get_backlight_device_by_name
 CONFTEST: timer_setup
 CONFTEST: pci_enable_msix_range
 CONFTEST: kernel_read_has_pointer_pos_arg
 CONFTEST: kernel_write_has_pointer_pos_arg
 CONFTEST: dma_direct_map_resource
 CONFTEST: tegra_get_platform
 CONFTEST: tegra_bpmp_send_receive
 CONFTEST: flush_cache_all
 CONFTEST: vmf_insert_pfn
 CONFTEST: jiffies_to_timespec
 CONFTEST: ktime_get_raw_ts64
 CONFTEST: ktime_get_real_ts64
 CONFTEST: full_name_hash
 CONFTEST: pci_enable_atomic_ops_to_root
 CONFTEST: vga_tryget
 CONFTEST: pgprot_decrypted
 CONFTEST: cc_mkdec
 CONFTEST: seq_read_iter
 CONFTEST: unsafe_follow_pfn
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_gem_object_put_unlocked
 CONFTEST: add_memory_driver_managed
 CONFTEST: device_property_read_u64
 CONFTEST: devm_of_platform_populate
 CONFTEST: of_dma_configure
 CONFTEST: of_property_count_elems_of_size
 CONFTEST: of_property_read_variable_u8_array
 CONFTEST: of_property_read_variable_u32_array
 CONFTEST: i2c_new_client_device
 CONFTEST: i2c_unregister_device
 CONFTEST: of_get_named_gpio
 CONFTEST: devm_gpio_request_one
 CONFTEST: gpio_direction_input
 CONFTEST: gpio_direction_output
 CONFTEST: gpio_get_value
 CONFTEST: gpio_set_value
 CONFTEST: gpio_to_irq
 CONFTEST: icc_get
 CONFTEST: icc_put
 CONFTEST: icc_set_bw
 CONFTEST: dma_buf_export_args
 CONFTEST: dma_buf_ops_has_kmap
 CONFTEST: dma_buf_ops_has_kmap_atomic
 CONFTEST: dma_buf_ops_has_map
 CONFTEST: dma_buf_ops_has_map_atomic
 CONFTEST: dma_buf_has_dynamic_attachment
 CONFTEST: dma_buf_attachment_has_peer2peer
 CONFTEST: dma_set_mask_and_coherent
 CONFTEST: devm_clk_bulk_get_all
 CONFTEST: get_task_ioprio
 CONFTEST: mdev_set_iommu_device
 CONFTEST: offline_and_remove_memory
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: radix_tree_empty
 CONFTEST: radix_tree_replace_slot
 CONFTEST: pnv_npu2_init_context
 CONFTEST: cpumask_of_node
 CONFTEST: ioasid_get
 CONFTEST: mm_pasid_set
 CONFTEST: migrate_vma_setup
 CONFTEST: mmget_not_zero
 CONFTEST: iommu_sva_bind_device_has_drvdata_arg
 CONFTEST: acpi_video_backlight_use_native
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: drm_dev_unref
 CONFTEST: get_user_pages_remote
 CONFTEST: get_user_pages
 CONFTEST: pin_user_pages_remote
 CONFTEST: pin_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_connector_has_vrr_capable_property
 CONFTEST: drm_framebuffer_get
 CONFTEST: drm_dev_put
 CONFTEST: drm_format_num_planes
 CONFTEST: drm_connector_for_each_possible_encoder
 CONFTEST: drm_rotation_available
 CONFTEST: drm_vma_offset_exact_lookup_locked
 CONFTEST: nvhost_dma_fence_unpack
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: is_export_symbol_gpl_sme_active
 CONFTEST: is_export_symbol_present_swiotlb_map_sg_attrs
 CONFTEST: is_export_symbol_present_swiotlb_dma_ops
 CONFTEST: is_export_symbol_present___close_fd
 CONFTEST: is_export_symbol_present_close_fd
 CONFTEST: is_export_symbol_present_get_unused_fd
 CONFTEST: is_export_symbol_present_get_unused_fd_flags
 CONFTEST: is_export_symbol_present_nvhost_get_default_device
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_byte_offset
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_aperture
 CONFTEST: is_export_symbol_present_tegra_dce_register_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_unregister_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_client_ipc_send_recv
 CONFTEST: is_export_symbol_present_dram_clk_to_mc_clk
 CONFTEST: is_export_symbol_present_get_dram_num_channels
 CONFTEST: is_export_symbol_present_tegra_dram_types
 CONFTEST: is_export_symbol_present_pxm_to_node
 CONFTEST: is_export_symbol_present_screen_info
 CONFTEST: is_export_symbol_present_i2c_bus_status
 CONFTEST: is_export_symbol_present_tegra_fuse_control_read
 CONFTEST: is_export_symbol_present_tegra_get_platform
 CONFTEST: is_export_symbol_present_pci_find_host_bridge
 CONFTEST: is_export_symbol_present_int_active_memcg
 CONFTEST: dma_ops
 CONFTEST: swiotlb_dma_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_has_address
 CONFTEST: vm_insert_pfn_prot
 CONFTEST: vmf_insert_pfn_prot
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: kmem_cache_has_kobj_remove_work
 CONFTEST: sysfs_slab_unlink
 CONFTEST: proc_ops
 CONFTEST: timespec64
 CONFTEST: vmalloc_has_pgprot_t_arg
 CONFTEST: pci_channel_state
 CONFTEST: mm_has_mmap_lock
 CONFTEST: pci_dev_has_ats_enabled
 CONFTEST: remove_memory_has_nid_arg
 CONFTEST: add_memory_driver_managed_has_mhp_flags_arg
 CONFTEST: num_registered_fb
 CONFTEST: pci_driver_has_driver_managed_dma
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: vm_fault_t
 CONFTEST: mmu_notifier_ops_invalidate_range
 CONFTEST: migrate_vma_added_flags
 CONFTEST: migrate_device_range
 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_device_list
 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_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
 CONFTEST: drm_atomic_helper_plane_destroy_state_has_plane_arg
 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: drm_gem_object_has_resv
 CONFTEST: drm_crtc_state_has_pageflip_flags
 CONFTEST: drm_crtc_state_has_async_flip
 CONFTEST: drm_crtc_state_has_vrr_enabled
 CONFTEST: drm_format_modifiers_present
 CONFTEST: drm_vma_node_is_allowed_has_tag_arg
 CONFTEST: drm_vma_offset_node_has_readonly
 CONFTEST: drm_display_mode_has_vrefresh
 CONFTEST: drm_driver_master_set_has_int_return_type
 CONFTEST: drm_driver_has_gem_free_object
 CONFTEST: drm_prime_pages_to_sg_has_drm_device_arg
 CONFTEST: drm_driver_has_gem_prime_callbacks
 CONFTEST: drm_crtc_atomic_check_has_atomic_state_arg
 CONFTEST: drm_gem_object_vmap_has_map_arg
 CONFTEST: drm_plane_atomic_check_has_atomic_state_arg
 CONFTEST: drm_device_has_pdev
 CONFTEST: drm_crtc_state_has_no_vblank
 CONFTEST: drm_mode_config_has_allow_fb_modifiers
 CONFTEST: drm_has_hdr_output_metadata
 CONFTEST: dma_resv_add_fence
 CONFTEST: dma_resv_reserve_fences
 CONFTEST: reservation_object_reserve_shared_has_num_fences_arg
 CONFTEST: drm_connector_has_override_edid
 CONFTEST: drm_master_has_leases
 CONFTEST: drm_file_get_master
 CONFTEST: drm_modeset_lock_all_end
 CONFTEST: drm_connector_lookup
 CONFTEST: drm_connector_put
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: nvidia_grid_csp_build
 CONFTEST: pm_runtime_available
 CONFTEST: pci_class_multimedia_hd_audio
 CONFTEST: drm_available
 CONFTEST: vfio_pci_core_available
 CONFTEST: cmd_uphy_display_port_init
 CONFTEST: cmd_uphy_display_port_off
 CONFTEST: drm_atomic_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
 CONFTEST: drm_alpha_blending_available
 CONFTEST: ib_peer_memory_symbols
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-acpi.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-acpi.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-cray.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-dma.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-dma.o] Error 1
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-cray.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-mmap.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-mmap.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-p2p.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-p2p.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-pat.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-pat.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-usermap.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-usermap.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-vm.c:24:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-vm.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-vtophys.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-vtophys.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/os-interface.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/os-interface.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-procfs.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-procfs.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-nano-timer.c:30:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-nano-timer.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv.c:33:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv.h:41,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv-linux.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv-dmabuf.h:27,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-dmabuf.c:24:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-dmabuf.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv-pci-types.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-pci.c:25:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv.h:41,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv-linux.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv-pci.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-pci.c:26:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-pci.o] Error 1
In file included from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/conftest.h:28,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/os-interface.h:40,
                 from /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-i2c.c:28:
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
/tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc/nv_stdarg.h:33:14: fatal error: stdarg.h: No such file or directory
   33 |     #include <stdarg.h>
      |              ^~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/nvidia/nv-i2c.o] Error 1
make[1]: *** [Makefile:2005: /tmp/23233/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel] Error 2
make: *** [Makefile:82: modules] Error 2

More Info

this only occured after updating to 530.30.02 from 525.89.02

@aritger
Copy link
Collaborator

aritger commented Mar 1, 2023

Thanks for the report. That is curious. Just to double check: building the 525.89.02 kernel modules with the same 6.1.13 target kernel works?

530.xx changed a few things with how conftest handles CFLAGS. That's the only thing I can think of that would cause this.

Could I trouble you to perform the following experiment?

(1) Make the following edit to conftest.sh:

diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh
index b6a152af6986..66f5fc502f94 100755
--- a/kernel-open/conftest.sh
+++ b/kernel-open/conftest.sh
@@ -5937,6 +5937,9 @@ case "$5" in
     ;;

     compile_tests)
+
+        echo "$*" > conftest.log.$$
+
         #
         # Run a series of compile tests to determine the set of interfaces
         # and features available in the target kernel.

(that should apply to kernel-open/conftest.sh as well as kernel/conftest.sh)

(2) Do make modules as in your repro steps.

(3) Grep the conftest.log.* files for "dma_buf_export". Paste the contents of the dma_buf_export log file here.

(4) Repeat steps 1-3 with 525.89.02.

I'm curious to see how the CFLAGS in the log files differ between 530.30.02 and 525.89.02.

Thanks.

@apprehensions
Copy link
Author

530.30.02:

cc x86_64 /lib/modules/6.1.13teapot/build /lib/modules/6.1.13teapot/build compile_tests -O2 -D__KERNEL__ -DKBUILD_BASENAME="#conftest8170" -DKBUILD_MODNAME="#conftest8170" -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include -Wno-implicit-function-declaration -Wno-strict-prototypes -I/lib/modules/6.1.13teapot/build/include/asm-x86/mach-default -I/lib/modules/6.1.13teapot/build/arch/x86/include/asm/mach-default -include /lib/modules/6.1.13teapot/build/include/generated/autoconf.h -I/lib/modules/6.1.13teapot/build/include -I/lib/modules/6.1.13teapot/build/include/uapi -I/lib/modules/6.1.13teapot/build/include/xen -I/lib/modules/6.1.13teapot/build/include/generated/uapi -I/lib/modules/6.1.13teapot/build/arch/x86/include -I/lib/modules/6.1.13teapot/build/arch/x86/include/uapi -I/lib/modules/6.1.13teapot/build/arch/x86/include/generated -I/lib/modules/6.1.13teapot/build/arch/x86/include/generated/uapi -mfentry -DCC_USING_FENTRY -I/tmp/7668/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc -I/tmp/7668/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel -Wall   -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"530.30.02\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -fno-pie dma_buf_export_args

525.89.02:

cc x86_64 /lib/modules/6.1.13teapot/build /lib/modules/6.1.13teapot/build compile_tests -O2 -D__KERNEL__ -DKBUILD_BASENAME="#conftest12651" -DKBUILD_MODNAME="#conftest12651" -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include -Wno-implicit-function-declaration -Wno-strict-prototypes -I/lib/modules/6.1.13teapot/build/include/asm-x86/mach-default -I/lib/modules/6.1.13teapot/build/arch/x86/include/asm/mach-default -include /lib/modules/6.1.13teapot/build/include/generated/autoconf.h -I/lib/modules/6.1.13teapot/build/include -I/lib/modules/6.1.13teapot/build/include/uapi -I/lib/modules/6.1.13teapot/build/include/xen -I/lib/modules/6.1.13teapot/build/include/generated/uapi -I/lib/modules/6.1.13teapot/build/arch/x86/include -I/lib/modules/6.1.13teapot/build/arch/x86/include/uapi -I/lib/modules/6.1.13teapot/build/arch/x86/include/generated -I/lib/modules/6.1.13teapot/build/arch/x86/include/generated/uapi -mfentry -DCC_USING_FENTRY -I/tmp/11993/build/nvidia/NVIDIA-Linux-x86_64-525.89.02-no-compat32/kernel/common/inc -I/tmp/11993/build/nvidia/NVIDIA-Linux-x86_64-525.89.02-no-compat32/kernel -Wall -MD   -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"525.89.02\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -fno-pie dma_buf_export_args

there is NO difference:

--- 530
+++ 525
@@ -5,8 +5,8 @@
 compile_tests
 -O2
 -D__KERNEL__
--DKBUILD_BASENAME="#conftest8170"
--DKBUILD_MODNAME="#conftest8170"
+-DKBUILD_BASENAME="#conftest12651"
+-DKBUILD_MODNAME="#conftest12651"
 -nostdinc
 -isystem
 /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include
@@ -26,9 +26,10 @@
 -I/lib/modules/6.1.13teapot/build/arch/x86/include/generated/uapi
 -mfentry
 -DCC_USING_FENTRY
--I/tmp/7668/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel/common/inc
--I/tmp/7668/build/nvidia/NVIDIA-Linux-x86_64-530.30.02-no-compat32/kernel
+-I/tmp/11993/build/nvidia/NVIDIA-Linux-x86_64-525.89.02-no-compat32/kernel/common/inc
+-I/tmp/11993/build/nvidia/NVIDIA-Linux-x86_64-525.89.02-no-compat32/kernel
 -Wall
+-MD


 -Wno-cast-qual
@@ -37,7 +38,7 @@
 -D__KERNEL__
 -DMODULE
 -DNVRM
--DNV_VERSION_STRING=\"530.30.02\"
+-DNV_VERSION_STRING=\"525.89.02\"
 -Wno-unused-function
 -Wuninitialized
 -fno-strict-aliasing

well, other than -MD.

i'd also like to clarify i am on linux-headers version 5.15.41-1

@retardtank
Copy link

I'd suspect I may have the same problem.

On the same setup 525.89.02 builds fine, while on 530.30.02 the following result:

# cd /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel # make modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.86-0-lts'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219
  You are using:           cc (Alpine 11.2.1_git20220219) 11.2.1 20220219
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 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_connector_has_vrr_capable_property
 CONFTEST: drm_framebuffer_get
 CONFTEST: drm_dev_put
 CONFTEST: drm_format_num_planes
 CONFTEST: drm_connector_for_each_possible_encoder
 CONFTEST: drm_rotation_available
 CONFTEST: drm_vma_offset_exact_lookup_locked
 CONFTEST: nvhost_dma_fence_unpack
  CC [M]  /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/nvidia/nv.o
In file included from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/common/inc/conftest.h:28,
                 from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/common/inc/nv_stdarg.h:29,
                 from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/common/inc/os-interface.h:40,
                 from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/nvidia/nv.c:33:
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel/conftest/functions.h:71:2: error: #error dma_buf_export() conftest failed!
   71 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel/conftest/functions.h:83:2: error: #error wait_on_bit_lock() conftest failed!
   83 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel/conftest/functions.h:86:2: error: #error radix_tree_replace_slot() conftest failed!
   86 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
In file included from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/common/inc/nv-linux.h:32,
                 from /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/nvidia/nv.c:34:
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel/common/inc/nv-lock.h:40:10: fatal error: asm/semaphore.h: No such file or directory
   40 | #include <asm/semaphore.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:289: /dist/NVIDIA-Linux-x86_64-530.30.02/kernel/nvidia/nv.o] Error 1
make[1]: *** [Makefile:1902: /dist/NVIDIA-Linux-x86_64-530.30.02/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.86-0-lts'
make: *** [Makefile:82: modules] Error 2
/dist/NVIDIA-Linux-x86_64-530.30.02/kernel # uname -a
Linux hostname 5.15.86-0-lts #1-Alpine SMP Mon, 02 Jan 2023 10:18:15 +0000 x86_64 Linux

@apprehensions
Copy link
Author

fixed build on my machine with 525.105.17

@apprehensions
Copy link
Author

apprehensions commented Apr 1, 2023

however, has not been fixed as of 530.41.03, same errors

@apprehensions apprehensions reopened this Apr 1, 2023
@apprehensions apprehensions changed the title Failure to build kernel modules after 530.30.02 Failure to build kernel modules after 530.41.03 Apr 1, 2023
@aritger
Copy link
Collaborator

aritger commented May 30, 2023

@apprehensions : are you still seeing this problem with the latest 535.43.02 release?

@apprehensions
Copy link
Author

apprehensions commented May 30, 2023

Sorry, I no longer have an Nvidia graphics card.

Though, I will test soon, thanks.

@retardtank
Copy link

@aritger For what it's worth, I can confirm that the same (or at least seemingly similar) problem occurs with 535.43.02 on Alpine Linux 3.16, kernel 5.15.86. While on that same system, 525.xx still works fine.

/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel # make modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.86-0-lts'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219
  You are using:           cc (Alpine 11.2.1_git20220219) 11.2.1 20220219
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: set_pages_uc
 CONFTEST: list_is_first
 CONFTEST: set_memory_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: set_pages_array_uc
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: pde_data
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: dma_attr_macros
 CONFTEST: dma_map_page_attrs
 CONFTEST: write_cr4
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: of_get_ibm_chip_id
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_rebar_get_possible_sizes
 CONFTEST: wait_for_random_bytes
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: dma_map_resource
 CONFTEST: get_backlight_device_by_name
 CONFTEST: timer_setup
 CONFTEST: pci_enable_msix_range
 CONFTEST: kernel_read_has_pointer_pos_arg
 CONFTEST: kernel_write_has_pointer_pos_arg
 CONFTEST: dma_direct_map_resource
 CONFTEST: tegra_get_platform
 CONFTEST: tegra_bpmp_send_receive
 CONFTEST: flush_cache_all
 CONFTEST: vmf_insert_pfn
 CONFTEST: jiffies_to_timespec
 CONFTEST: ktime_get_raw_ts64
 CONFTEST: ktime_get_real_ts64
 CONFTEST: full_name_hash
 CONFTEST: pci_enable_atomic_ops_to_root
 CONFTEST: vga_tryget
 CONFTEST: pgprot_decrypted
 CONFTEST: cc_mkdec
 CONFTEST: seq_read_iter
 CONFTEST: unsafe_follow_pfn
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_gem_object_put_unlocked
 CONFTEST: add_memory_driver_managed
 CONFTEST: device_property_read_u64
 CONFTEST: devm_of_platform_populate
 CONFTEST: of_dma_configure
 CONFTEST: of_property_count_elems_of_size
 CONFTEST: of_property_read_variable_u8_array
 CONFTEST: of_property_read_variable_u32_array
 CONFTEST: i2c_new_client_device
 CONFTEST: i2c_unregister_device
 CONFTEST: of_get_named_gpio
 CONFTEST: devm_gpio_request_one
 CONFTEST: gpio_direction_input
 CONFTEST: gpio_direction_output
 CONFTEST: gpio_get_value
 CONFTEST: gpio_set_value
 CONFTEST: gpio_to_irq
 CONFTEST: icc_get
 CONFTEST: icc_put
 CONFTEST: icc_set_bw
 CONFTEST: dma_buf_export_args
 CONFTEST: dma_buf_ops_has_kmap
 CONFTEST: dma_buf_ops_has_kmap_atomic
 CONFTEST: dma_buf_ops_has_map
 CONFTEST: dma_buf_ops_has_map_atomic
 CONFTEST: dma_buf_has_dynamic_attachment
 CONFTEST: dma_buf_attachment_has_peer2peer
 CONFTEST: dma_set_mask_and_coherent
 CONFTEST: devm_clk_bulk_get_all
 CONFTEST: get_task_ioprio
 CONFTEST: mdev_set_iommu_device
 CONFTEST: offline_and_remove_memory
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: radix_tree_empty
 CONFTEST: radix_tree_replace_slot
 CONFTEST: pnv_npu2_init_context
 CONFTEST: cpumask_of_node
 CONFTEST: ioasid_get
 CONFTEST: mm_pasid_set
 CONFTEST: migrate_vma_setup
 CONFTEST: mmget_not_zero
 CONFTEST: mmgrab
 CONFTEST: iommu_sva_bind_device_has_drvdata_arg
 CONFTEST: vm_fault_to_errno
 CONFTEST: acpi_video_backlight_use_native
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: get_user_pages_remote
 CONFTEST: get_user_pages
 CONFTEST: pin_user_pages_remote
 CONFTEST: pin_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_connector_has_vrr_capable_property
 CONFTEST: drm_framebuffer_get
 CONFTEST: drm_dev_put
 CONFTEST: drm_format_num_planes
 CONFTEST: drm_connector_for_each_possible_encoder
 CONFTEST: drm_rotation_available
 CONFTEST: drm_vma_offset_exact_lookup_locked
 CONFTEST: nvhost_dma_fence_unpack
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: is_export_symbol_gpl_sme_active
 CONFTEST: is_export_symbol_present_swiotlb_map_sg_attrs
 CONFTEST: is_export_symbol_present_swiotlb_dma_ops
 CONFTEST: is_export_symbol_present___close_fd
 CONFTEST: is_export_symbol_present_close_fd
 CONFTEST: is_export_symbol_present_get_unused_fd
 CONFTEST: is_export_symbol_present_get_unused_fd_flags
 CONFTEST: is_export_symbol_present_nvhost_get_default_device
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_byte_offset
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_aperture
 CONFTEST: is_export_symbol_present_tegra_dce_register_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_unregister_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_client_ipc_send_recv
 CONFTEST: is_export_symbol_present_dram_clk_to_mc_clk
 CONFTEST: is_export_symbol_present_get_dram_num_channels
 CONFTEST: is_export_symbol_present_tegra_dram_types
 CONFTEST: is_export_symbol_present_pxm_to_node
 CONFTEST: is_export_symbol_present_screen_info
 CONFTEST: is_export_symbol_present_i2c_bus_status
 CONFTEST: is_export_symbol_present_tegra_fuse_control_read
 CONFTEST: is_export_symbol_present_tegra_get_platform
 CONFTEST: is_export_symbol_present_pci_find_host_bridge
 CONFTEST: is_export_symbol_present_tsec_comms_send_cmd
 CONFTEST: is_export_symbol_present_tsec_comms_set_init_cb
 CONFTEST: is_export_symbol_present_tsec_comms_clear_init_cb
 CONFTEST: is_export_symbol_present_tsec_comms_alloc_mem_from_gscco
 CONFTEST: is_export_symbol_present_tsec_comms_free_gscco_mem
 CONFTEST: is_export_symbol_present_int_active_memcg
 CONFTEST: dma_ops
 CONFTEST: swiotlb_dma_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_has_address
 CONFTEST: vm_insert_pfn_prot
 CONFTEST: vmf_insert_pfn_prot
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: kmem_cache_has_kobj_remove_work
 CONFTEST: sysfs_slab_unlink
 CONFTEST: proc_ops
 CONFTEST: timespec64
 CONFTEST: vmalloc_has_pgprot_t_arg
 CONFTEST: mm_has_mmap_lock
 CONFTEST: pci_channel_state
 CONFTEST: pci_dev_has_ats_enabled
 CONFTEST: remove_memory_has_nid_arg
 CONFTEST: add_memory_driver_managed_has_mhp_flags_arg
 CONFTEST: num_registered_fb
 CONFTEST: pci_driver_has_driver_managed_dma
 CONFTEST: vm_area_struct_has_const_vm_flags
 CONFTEST: memory_failure_has_trapno_arg
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: vm_fault_t
 CONFTEST: mmu_notifier_ops_invalidate_range
 CONFTEST: migrate_vma_added_flags
 CONFTEST: migrate_device_range
 CONFTEST: handle_mm_fault_has_mm_arg
 CONFTEST: handle_mm_fault_has_pt_regs_arg
 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_device_list
 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_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
 CONFTEST: drm_atomic_helper_plane_destroy_state_has_plane_arg
 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: drm_gem_object_has_resv
 CONFTEST: drm_crtc_state_has_async_flip
 CONFTEST: drm_crtc_state_has_pageflip_flags
 CONFTEST: drm_crtc_state_has_vrr_enabled
 CONFTEST: drm_format_modifiers_present
 CONFTEST: drm_vma_node_is_allowed_has_tag_arg
 CONFTEST: drm_vma_offset_node_has_readonly
 CONFTEST: drm_display_mode_has_vrefresh
 CONFTEST: drm_driver_master_set_has_int_return_type
 CONFTEST: drm_driver_has_gem_free_object
 CONFTEST: drm_prime_pages_to_sg_has_drm_device_arg
 CONFTEST: drm_driver_has_gem_prime_callbacks
 CONFTEST: drm_crtc_atomic_check_has_atomic_state_arg
 CONFTEST: drm_gem_object_vmap_has_map_arg
 CONFTEST: drm_plane_atomic_check_has_atomic_state_arg
 CONFTEST: drm_device_has_pdev
 CONFTEST: drm_crtc_state_has_no_vblank
 CONFTEST: drm_mode_config_has_allow_fb_modifiers
 CONFTEST: drm_has_hdr_output_metadata
 CONFTEST: dma_resv_add_fence
 CONFTEST: dma_resv_reserve_fences
 CONFTEST: reservation_object_reserve_shared_has_num_fences_arg
 CONFTEST: drm_connector_has_override_edid
 CONFTEST: drm_master_has_leases
 CONFTEST: drm_file_get_master
 CONFTEST: drm_modeset_lock_all_end
 CONFTEST: drm_connector_lookup
 CONFTEST: drm_connector_put
 CONFTEST: drm_driver_has_dumb_destroy
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: nvidia_grid_csp_build
 CONFTEST: pm_runtime_available
 CONFTEST: pci_class_multimedia_hd_audio
 CONFTEST: drm_available
 CONFTEST: vfio_pci_core_available
 CONFTEST: mdev_available
 CONFTEST: cmd_uphy_display_port_init
 CONFTEST: cmd_uphy_display_port_off
 CONFTEST: memory_failure_mf_sw_simulated_defined
 CONFTEST: drm_atomic_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
 CONFTEST: drm_alpha_blending_available
 CONFTEST: ib_peer_memory_symbols
  CC [M]  /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.o
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/conftest.h:28,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv_stdarg.h:29,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/os-interface.h:40,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:33:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/conftest/functions.h:72:2: error: #error dma_buf_export() conftest failed!
   72 | #error dma_buf_export() conftest failed!
      |  ^~~~~
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/conftest/functions.h:84:2: error: #error wait_on_bit_lock() conftest failed!
   84 | #error wait_on_bit_lock() conftest failed!
      |  ^~~~~
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/conftest/functions.h:87:2: error: #error radix_tree_replace_slot() conftest failed!
   87 | #error radix_tree_replace_slot() conftest failed!
      |  ^~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:32,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-lock.h: In function 'nv_down_read_interruptible':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-lock.h:66:13: error: implicit declaration of function 'signal_pending' [-Werror=implicit-function-declaration]
   66 |         if (signal_pending(current))
      |             ^~~~~~~~~~~~~~
In file included from ./include/linux/rcuwait.h:6,
                 from ./include/linux/percpu-rwsem.h:7,
                 from ./include/linux/fs.h:33,
                 from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:727,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/sched/signal.h: At top level:
./include/linux/sched/signal.h:361:19: error: static declaration of 'signal_pending' follows non-static declaration
  361 | static inline int signal_pending(struct task_struct *p)
      |                   ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:32,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-lock.h:66:13: note: previous implicit declaration of 'signal_pending' with type 'int()'
   66 |         if (signal_pending(current))
      |             ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:29:13: error: conflicting types for 'vm_fault_t'; have 'int'
   29 | typedef int vm_fault_t;
      |             ^~~~~~~~~~
In file included from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/mm_types.h:705:32: note: previous declaration of 'vm_fault_t' with type 'vm_fault_t' {aka 'unsigned int'}
  705 | typedef __bitwise unsigned int vm_fault_t;
      |                                ^~~~~~~~~~
In file included from ./arch/x86/include/asm/processor.h:17,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'NV_GET_USER_PAGES':
./arch/x86/include/asm/current.h:18:17: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
   18 | #define current get_current()
      |                 ^~~~~~~~~~~~~
      |                 |
      |                 struct task_struct *
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:88:31: note: in expansion of macro 'current'
   88 |         return get_user_pages(current, current->mm, start, nr_pages, write,
      |                               ^~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:35: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |                     ~~~~~~~~~~~~~~^~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:88:47: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
   88 |         return get_user_pages(current, current->mm, start, nr_pages, write,
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:56: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |                                          ~~~~~~~~~~~~~~^~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:88:60: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
   88 |         return get_user_pages(current, current->mm, start, nr_pages, write,
      |                                                            ^~~~~~~~
      |                                                            |
      |                                                            long unsigned int
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1832:67: note: expected 'struct page **' but argument is of type 'long unsigned int'
 1832 |                             unsigned int gup_flags, struct page **pages,
      |                                                     ~~~~~~~~~~~~~~^~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:88:70: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
   88 |         return get_user_pages(current, current->mm, start, nr_pages, write,
      |                                                                      ^~~~~
      |                                                                      |
      |                                                                      int
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1833:53: note: expected 'struct vm_area_struct **' but argument is of type 'int'
 1833 |                             struct vm_area_struct **vmas);
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:88:16: error: too many arguments to function 'get_user_pages'
   88 |         return get_user_pages(current, current->mm, start, nr_pages, write,
      |                ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:6: note: declared here
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |      ^~~~~~~~~~~~~~
In file included from ./include/uapi/linux/posix_types.h:5,
                 from ./include/uapi/linux/types.h:14,
                 from ./include/linux/types.h:6,
                 from ./include/linux/list.h:5,
                 from ./include/linux/module.h:12,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'NV_GET_USER_PAGES_REMOTE':
./include/linux/stddef.h:8:14: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
    8 | #define NULL ((void *)0)
      |              ^~~~~~~~~~~
      |              |
      |              void *
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:182:35: note: in expansion of macro 'NULL'
  182 |             return get_user_pages(NULL, mm, start, nr_pages, write, force, pages, vmas);
      |                                   ^~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:35: note: expected 'long unsigned int' but argument is of type 'void *'
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |                     ~~~~~~~~~~~~~~^~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:182:41: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
  182 |             return get_user_pages(NULL, mm, start, nr_pages, write, force, pages, vmas);
      |                                         ^~
      |                                         |
      |                                         struct mm_struct *
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:56: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |                                          ~~~~~~~~~~~~~~^~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:182:52: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
  182 |             return get_user_pages(NULL, mm, start, nr_pages, write, force, pages, vmas);
      |                                                    ^~~~~~~~
      |                                                    |
      |                                                    long unsigned int
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1832:67: note: expected 'struct page **' but argument is of type 'long unsigned int'
 1832 |                             unsigned int gup_flags, struct page **pages,
      |                                                     ~~~~~~~~~~~~~~^~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:182:62: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
  182 |             return get_user_pages(NULL, mm, start, nr_pages, write, force, pages, vmas);
      |                                                              ^~~~~
      |                                                              |
      |                                                              int
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1833:53: note: expected 'struct vm_area_struct **' but argument is of type 'int'
 1833 |                             struct vm_area_struct **vmas);
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:182:20: error: too many arguments to function 'get_user_pages'
  182 |             return get_user_pages(NULL, mm, start, nr_pages, write, force, pages, vmas);
      |                    ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-pgprot.h:30,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:33,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
./include/linux/mm.h:1831:6: note: declared here
 1831 | long get_user_pages(unsigned long start, unsigned long nr_pages,
      |      ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:34,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_page_fault_va':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:206:31: error: 'struct vm_fault' has no member named 'virtual_address'
  206 |     return (unsigned long)(vmf->virtual_address);
      |                               ^~
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mmap_read_lock':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:215:20: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  215 |     down_read(&mm->mmap_sem);
      |                    ^~~~~~~~
      |                    mmap_base
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mmap_read_unlock':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:224:18: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  224 |     up_read(&mm->mmap_sem);
      |                  ^~~~~~~~
      |                  mmap_base
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mmap_write_lock':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:233:21: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  233 |     down_write(&mm->mmap_sem);
      |                     ^~~~~~~~
      |                     mmap_base
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mmap_write_unlock':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:242:19: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  242 |     up_write(&mm->mmap_sem);
      |                   ^~~~~~~~
      |                   mmap_base
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mm_rwsem_is_locked':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:251:33: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  251 |     return rwsem_is_locked(&mm->mmap_sem);
      |                                 ^~~~~~~~
      |                                 mmap_base
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h: In function 'nv_mmap_get_lock':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-mm.h:260:17: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
  260 |     return &mm->mmap_sem;
      |                 ^~~~~~~~
      |                 mmap_base
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h: At top level:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:40:8: error: redefinition of 'struct timespec64'
   40 | struct timespec64 {
      |        ^~~~~~~~~~
In file included from ./include/linux/time.h:7,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/time64.h:13:8: note: originally defined here
   13 | struct timespec64 {
      |        ^~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:77:33: error: conflicting types for 'timespec64_add'; have 'struct timespec64(const struct timespec64,  const struct timespec64)'
   77 | static inline struct timespec64 timespec64_add
      |                                 ^~~~~~~~~~~~~~
In file included from ./include/linux/time.h:7,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/time64.h:65:33: note: previous definition of 'timespec64_add' with type 'struct timespec64(struct timespec64,  struct timespec64)'
   65 | static inline struct timespec64 timespec64_add(struct timespec64 lhs,
      |                                 ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:95:34: error: conflicting types for 'timespec64_sub'; have 'struct timespec64(const struct timespec64,  const struct timespec64)'
   95 | static inline struct timespec64  timespec64_sub
      |                                  ^~~~~~~~~~~~~~
In file included from ./include/linux/time.h:7,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/time64.h:77:33: note: previous definition of 'timespec64_sub' with type 'struct timespec64(struct timespec64,  struct timespec64)'
   77 | static inline struct timespec64 timespec64_sub(struct timespec64 lhs,
      |                                 ^~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:113:19: error: conflicting types for 'timespec64_to_ns'; have 's64(struct timespec64 *)' {aka 'long long int(struct timespec64 *)'}
  113 | static inline s64 timespec64_to_ns(struct timespec64 *ts)
      |                   ^~~~~~~~~~~~~~~~
In file included from ./include/linux/time.h:7,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/time64.h:127:19: note: previous definition of 'timespec64_to_ns' with type 's64(const struct timespec64 *)' {aka 'long long int(const struct timespec64 *)'}
  127 | static inline s64 timespec64_to_ns(const struct timespec64 *ts)
      |                   ^~~~~~~~~~~~~~~~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h: In function 'nv_ktime_get_raw_ns':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:122:24: error: passing argument 1 of 'ktime_get_raw_ts64' from incompatible pointer type [-Werror=incompatible-pointer-types]
  122 |     ktime_get_raw_ts64(&ts);
      |                        ^~~
      |                        |
      |                        struct timespec64 *
In file included from ./include/linux/ktime.h:232,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:14,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/timekeeping.h:41:51: note: expected 'struct timespec64 *' but argument is of type 'struct timespec64 *'
   41 | extern void ktime_get_raw_ts64(struct timespec64 *ts);
      |                                ~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h: In function 'nv_sleep_ms':
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:185:24: error: passing argument 1 of 'ktime_get_raw_ts64' from incompatible pointer type [-Werror=incompatible-pointer-types]
  185 |     ktime_get_raw_ts64(&tm_aux);
      |                        ^~~~~~~
      |                        |
      |                        struct timespec64 *
In file included from ./include/linux/ktime.h:232,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:14,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/timekeeping.h:41:51: note: expected 'struct timespec64 *' but argument is of type 'struct timespec64 *'
   41 | extern void ktime_get_raw_ts64(struct timespec64 *ts);
      |                                ~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:37,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-time.h:221:32: error: passing argument 1 of 'ktime_get_raw_ts64' from incompatible pointer type [-Werror=incompatible-pointer-types]
  221 |             ktime_get_raw_ts64(&tm_aux);
      |                                ^~~~~~~
      |                                |
      |                                struct timespec64 *
In file included from ./include/linux/ktime.h:232,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:14,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:24:
./include/linux/timekeeping.h:41:51: note: expected 'struct timespec64 *' but argument is of type 'struct timespec64 *'
   41 | extern void ktime_get_raw_ts64(struct timespec64 *ts);
      |                                ~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.c:34:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h: At top level:
/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/common/inc/nv-linux.h:45:10: fatal error: linux/autoconf.h: No such file or directory
   45 | #include <linux/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[2]: *** [scripts/Makefile.build:289: /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel/nvidia/nv.o] Error 1
make[1]: *** [Makefile:1902: /tmp/NVIDIA-Linux-x86_64-535.43.02/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.86-0-lts'
make: *** [Makefile:82: modules] Error 2

@aritger
Copy link
Collaborator

aritger commented May 31, 2023

@apprehensions: your log snippets in #468 (comment) are surprising. You said you are on linux-headers version 5.15.41-1, but your log shows you building 6.1.13teapot kernel headers. It would be good if you could test the -MD experiment described below (you should be able to test build, without having an NVIDIA GPU).

@retardtank: could you please conduct the same experiment described here: #468 (comment)

Then, as a separate experiment, if the problem is really that 530.xx and newer branches is missing -MD from CFLAGS, try making this change:

diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh
index 538b0b2..d168702 100755
--- a/kernel-open/conftest.sh
+++ b/kernel-open/conftest.sh
@@ -6315,7 +6315,7 @@ case "$5" in
         #
         shift 5

-        CFLAGS=$1
+        CFLAGS="$1 -MD"
         shift

         for i in $*; do compile_test $i; done

@retardtank
Copy link

@aritger

There was no difference adding -MD to CFLAGS as described, same error (with make clean; make modules).

535.43.02:

cc x86_64 /lib/modules/5.15.86-0-lts/build /lib/modules/5.15.86-0-lts/build compile_tests -O2 -D__KERNEL__ -DKBUILD_BASENAME="#conftest14957" -DKBUILD_MODNAME="#conftest14957" -nostdinc -isystem /usr/lib/gcc/x86_64-alpine-linux-musl/11.2.1/include -Wno-implicit-function-declaration -Wno-strict-prototypes -I/lib/modules/5.15.86-0-lts/build/include/asm-x86/mach-default -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/asm/mach-default -include /lib/modules/5.15.86-0-lts/build/include/generated/autoconf.h -I/lib/modules/5.15.86-0-lts/build/include -I/lib/modules/5.15.86-0-lts/build/include/uapi -I/lib/modules/5.15.86-0-lts/build/include/xen -I/lib/modules/5.15.86-0-lts/build/include/generated/uapi -I/lib/modules/5.15.86-0-lts/build/arch/x86/include -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/uapi -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/generated -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/generated/uapi -mfentry -DCC_USING_FENTRY -I/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel-open/common/inc -I/tmp/NVIDIA-Linux-x86_64-535.43.02/kernel-open -Wall   -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"535.43.02\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -fno-pie dma_buf_export_args

525.89.02:

cc x86_64 /lib/modules/5.15.86-0-lts/build /lib/modules/5.15.86-0-lts/build compile_tests -O2 -D__KERNEL__ -DKBUILD_BASENAME="#conftest18547" -DKBUILD_MODNAME="#conftest18547" -nostdinc -isystem /usr/lib/gcc/x86_64-alpine-linux-musl/11.2.1/include -Wno-implicit-function-declaration -Wno-strict-prototypes -I/lib/modules/5.15.86-0-lts/build/include/asm-x86/mach-default -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/asm/mach-default -include /lib/modules/5.15.86-0-lts/build/include/generated/autoconf.h -I/lib/modules/5.15.86-0-lts/build/include -I/lib/modules/5.15.86-0-lts/build/include/uapi -I/lib/modules/5.15.86-0-lts/build/include/xen -I/lib/modules/5.15.86-0-lts/build/include/generated/uapi -I/lib/modules/5.15.86-0-lts/build/arch/x86/include -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/uapi -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/generated -I/lib/modules/5.15.86-0-lts/build/arch/x86/include/generated/uapi -mfentry -DCC_USING_FENTRY -I/dist/NVIDIA-Linux-x86_64-525.89.02/kernel-open/common/inc -I/dist/NVIDIA-Linux-x86_64-525.89.02/kernel-open -Wall -MD   -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"525.89.02\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -fno-pie dma_buf_export_args

Thanks.

@folknor
Copy link

folknor commented Jan 29, 2024

Getting this exact problem on ubuntu 24.04 noble using the recent nvidia 550.40.07-0ubuntu0~gpu24.04.1 packages from the graphics-drivers ppa.

@cottsak
Copy link

cottsak commented Feb 8, 2024

same problem on ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20231207 using:

  • NVIDIA-Linux-x86_64-410.104.run, and
  • NVIDIA-Linux-x86_64-470.57.02.run

@retardtank
Copy link

retardtank commented Feb 10, 2024

I've solved this with 545.29.06 on Alpine Linux 3.19, by installing gnu coreutils.

On my system at least, I'd guess that there might been some discrepancy in the busybox counterpart of some standard command that gets called on, eventually causing conftest to fail.

@git-bruh git-bruh linked a pull request Mar 7, 2024 that will close this issue
@git-bruh
Copy link

git-bruh commented Mar 7, 2024

#609

@StidOfficial
Copy link

#609

Work for me, on Alpine Linux v3.19.

@flukejones
Copy link

I'm hitting this same error log on Fedora 41 with Kernel 6.11.

@flukejones
Copy link

I hit this again. It appears that the cause was my compiler was not the same as the one used to build my kernel. Updating both fixed it.

@laion01
Copy link

laion01 commented Nov 12, 2024

fixed build on my machine with 525.105.17

Could you help me to build it on my machine? @apprehensions

@apprehensions
Copy link
Author

Sorry, I switched to AMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants