Kernel/nvidia/nv-acpi.c:750:43: error: 'struct acpi_device' has no member named 'children'

  • system: "x86_64-linux"
  • host os: Linux 5.19.9, NixOS, 22.05 (Quokka), 22.05.3242.72783a2d0db
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.8.1
  • channels(root): "home-manager-22.05.tar.gz, nixos-22.05"
  • channels(usera): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

ilding '/nix/store/8gr7fali6j90wdfnqz4xm9b2gbr1sdk0-nvidia-x11-515.48.07-6.0.2.drv'...
unpacking sources
Creating directory NVIDIA-Linux-x86_64-515.48.07
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 515.48.07................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
source root is NVIDIA-Linux-x86_64-515.48.07
setting SOURCE_DATE_EPOCH to timestamp 1653625931 of file NVIDIA-Linux-x86_64-515.48.07/nvidia-bug-report.sh
patching sources
configuring
no configure script, doing nothing
building
Building linux driver against kernel: /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev
make[1]: Entering directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source'
make[2]: Entering directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/build'
  SYMLINK /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-kernel.o
  SYMLINK /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia-modeset/nv-modeset-kernel.o
 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: sg_alloc_table
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: efi_enabled
 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: dma_attr_macros
 CONFTEST: dma_map_page_attrs
 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: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_remove_bus_device
 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
 CONFTEST: kthread_create_on_node
 CONFTEST: of_find_matching_node
 CONFTEST: dev_is_pci
 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: hlist_for_each_entry
 CONFTEST: pci_enable_atomic_ops_to_root
 CONFTEST: vga_tryget
 CONFTEST: pgprot_decrypted
 CONFTEST: cc_mkdec
 CONFTEST: iterate_fd
 CONFTEST: seq_read_iter
 CONFTEST: sg_page_iter_page
 CONFTEST: unsafe_follow_pfn
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_gem_object_put_unlocked
 CONFTEST: set_close_on_exec
 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: 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: acpi_bus_get_device
 CONFTEST: address_space_init_once
 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: cpumask_of_node
 CONFTEST: ioasid_get
 CONFTEST: migrate_vma_setup
 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_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_int_active_memcg
 CONFTEST: file_operations
 CONFTEST: is_export_symbol_present_kthread_create_on_node
 CONFTEST: kuid_t
 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: vmbus_channel_has_ringbuffer_page
 CONFTEST: device_driver_of_match_table
 CONFTEST: device_of_node
 CONFTEST: node_states_n_memory
 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: mt_device_gre
 CONFTEST: remove_memory_has_nid_arg
 CONFTEST: add_memory_driver_managed_has_mhp_flags_arg
 CONFTEST: address_space
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: mmu_notifier_ops_invalidate_range
 CONFTEST: vm_fault_t
 CONFTEST: migrate_vma_added_flags
 CONFTEST: make_device_exclusive_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_async_flip
 CONFTEST: drm_crtc_state_has_pageflip_flags
 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: dma_resv_add_fence
 CONFTEST: dma_resv_reserve_fences
 CONFTEST: reservation_object_reserve_shared_has_num_fences_arg
 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: 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]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-pci.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-dmabuf.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-cray.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-dma.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-i2c.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-mmap.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-p2p.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-pat.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-procfs.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-procfs-utils.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-usermap.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-vm.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-vtophys.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/os-interface.o
  CC [M]  /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/os-mlock.o
In file included from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/preempt.h:11,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/spinlock.h:55,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-lock.h:29,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:32,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c: In function 'nv_acpi_ddc_method':
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:750:43: error: 'struct acpi_device' has no member named 'children'
  750 |     list_for_each_safe(node, next, &device->children)
      |                                           ^~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:643:21: note: in definition of macro 'list_for_each_safe'
  643 |         for (pos = (head)->next, n = pos->next; \
      |                     ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:643:32: warning: left-hand operand of comma expression has no effect [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value8;;]
  643 |         for (pos = (head)->next, n = pos->next; \
      |                                ^
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:750:5: note: in expansion of macro 'list_for_each_safe'
  750 |     list_for_each_safe(node, next, &device->children)
      |     ^~~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:750:43: error: 'struct acpi_device' has no member named 'children'
  750 |     list_for_each_safe(node, next, &device->children)
      |                                           ^~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:644:34: note: in definition of macro 'list_for_each_safe'
  644 |              !list_is_head(pos, (head)); \
      |                                  ^~~~
In file included from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:5,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:5,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/preempt.h:11,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/spinlock.h:55,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-lock.h:29,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:32,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:754:50: error: 'struct acpi_device' has no member named 'node'; did you mean 'fwnode'?
  754 |             list_entry(node, struct acpi_device, node);
      |                                                  ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:754:13: note: in expansion of macro 'list_entry'
  754 |             list_entry(node, struct acpi_device, node);
      |             ^~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/compiler_types.h:295:27: error: expression in static assertion is not an integer
  295 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:754:13: note: in expansion of macro 'list_entry'
  754 |             list_entry(node, struct acpi_device, node);
      |             ^~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv.h:35,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:28,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:754:50: error: 'struct acpi_device' has no member named 'node'; did you mean 'fwnode'?
  754 |             list_entry(node, struct acpi_device, node);
      |                                                  ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/stddef.h:16:58: note: in definition of macro 'offsetof'
   16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
      |                                                          ^~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:754:13: note: in expansion of macro 'list_entry'
  754 |             list_entry(node, struct acpi_device, node);
      |             ^~~~~~~~~~
In file included from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/preempt.h:11,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/spinlock.h:55,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-lock.h:29,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:32,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c: In function 'nv_acpi_mux_method':
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1175:43: error: 'struct acpi_device' has no member named 'children'
 1175 |     list_for_each_safe(node, next, &device->children)
      |                                           ^~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:643:21: note: in definition of macro 'list_for_each_safe'
  643 |         for (pos = (head)->next, n = pos->next; \
      |                     ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:643:32: warning: left-hand operand of comma expression has no effect [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value8;;]
  643 |         for (pos = (head)->next, n = pos->next; \
      |                                ^
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1175:5: note: in expansion of macro 'list_for_each_safe'
 1175 |     list_for_each_safe(node, next, &device->children)
      |     ^~~~~~~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1175:43: error: 'struct acpi_device' has no member named 'children'
 1175 |     list_for_each_safe(node, next, &device->children)
      |                                           ^~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:644:34: note: in definition of macro 'list_for_each_safe'
  644 |              !list_is_head(pos, (head)); \
      |                                  ^~~~
In file included from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:5,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:5,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/preempt.h:11,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/spinlock.h:55,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-lock.h:29,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:32,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1177:72: error: 'struct acpi_device' has no member named 'node'; did you mean 'fwnode'?
 1177 |         struct acpi_device *dev = list_entry(node, struct acpi_device, node);
      |                                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1177:35: note: in expansion of macro 'list_entry'
 1177 |         struct acpi_device *dev = list_entry(node, struct acpi_device, node);
      |                                   ^~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/compiler_types.h:295:27: error: expression in static assertion is not an integer
  295 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
   78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |         ^~~~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
   19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
      |                       ^~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1177:35: note: in expansion of macro 'list_entry'
 1177 |         struct acpi_device *dev = list_entry(node, struct acpi_device, node);
      |                                   ^~~~~~~~~~
In file included from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv.h:35,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:28,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:27:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1177:72: error: 'struct acpi_device' has no member named 'node'; did you mean 'fwnode'?
 1177 |         struct acpi_device *dev = list_entry(node, struct acpi_device, node);
      |                                                                        ^~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/stddef.h:16:58: note: in definition of macro 'offsetof'
   16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
      |                                                          ^~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/list.h:520:9: note: in expansion of macro 'container_of'
  520 |         container_of(ptr, type, member)
      |         ^~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.c:1177:35: note: in expansion of macro 'list_entry'
 1177 |         struct acpi_device *dev = list_entry(node, struct acpi_device, node);
      |                                   ^~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-dma.c: In function 'nv_dma_use_map_resource':
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-dma.c:783:5: warning: ISO C90 forbids mixed declarations and code [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeclaration-after-statement-Wdeclaration-after-statement8;;]
  783 |     const struct dma_map_ops *ops = get_dma_ops(dma_dev->dev);
      |     ^~~~~
In file included from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/kernel.h:26,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/arch/x86/include/asm/percpu.h:27,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/arch/x86/include/asm/preempt.h:6,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/preempt.h:78,
                 from /nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/spinlock.h:55,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-lock.h:29,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/common/inc/nv-linux.h:32,
                 from /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-vm.c:26:
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-vm.c: In function 'nv_get_max_sysmem_address':
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
   26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
      |                  ^~~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
   36 |         __builtin_choose_expr(__safe_cmp(x, y), \
      |                               ^~~~~~~~~~
/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/include/linux/minmax.h:52:25: note: in expansion of macro '__careful_cmp'
   52 | #define max(x, y)       __careful_cmp(x, y, >)
      |                         ^~~~~~~~~~~~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-vm.c:225:26: note: in expansion of macro 'max'
  225 |         global_max_pfn = max(global_max_pfn, node_end_pfn(node_id));
      |                          ^~~
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-mmap.c: In function 'nv_encode_caching':
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-mmap.c:343:16: warning: this statement may fall through [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough=-Wimplicit-fallthrough=8;;]
  343 |             if (NV_ALLOW_CACHING(memory_type))
      |                ^
/build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-mmap.c:346:9: note: here
  346 |         default:
      |         ^~~~~~~
make[3]: *** [/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/scripts/Makefile.build:249: /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/Makefile:1852: /build/NVIDIA-Linux-x86_64-515.48.07/kernel] Error 2
make[2]: Leaving directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/build'
make[1]: *** [Makefile:222: __sub-make] Error 2
make[1]: Leaving directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source'
make: *** [Makefile:82: modules] Error 2
error: builder for '/nix/store/8gr7fali6j90wdfnqz4xm9b2gbr1sdk0-nvidia-x11-515.48.07-6.0.2.drv' failed with exit code 2;
       last 10 log lines:
       > /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-mmap.c:346:9: note: here
       >   346 |         default:
       >       |         ^~~~~~~
       > make[3]: *** [/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/scripts/Makefile.build:249: /build/NVIDIA-Linux-x86_64-515.48.07/kernel/nvidia/nv-acpi.o] Error 1
       > make[3]: *** Waiting for unfinished jobs....
       > make[2]: *** [/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source/Makefile:1852: /build/NVIDIA-Linux-x86_64-515.48.07/kernel] Error 2
       > make[2]: Leaving directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/build'
       > make[1]: *** [Makefile:222: __sub-make] Error 2
       > make[1]: Leaving directory '/nix/store/j4n8vb4p1kb76iq8724c27wn2kc0v6ar-linux-6.0.2-dev/lib/modules/6.0.2/source'
       > make: *** [Makefile:82: modules] Error 2
       For full logs, run 'nix log /nix/store/8gr7fali6j90wdfnqz4xm9b2gbr1sdk0-nvidia-x11-515.48.07-6.0.2.drv'.

What dies the error mean and how to solve it ?

It means that the nvidia driver version you’re running is incompatible with the kernel version. This is a nixos issue: Nvidia-X11 build failes on 22.05 with kernel 6.0 · Issue #195654 · NixOS/nixpkgs · GitHub

It’s already being worked on in linuxPackages.nvidia_x11: 515.65.01 -> 515.76 by ThoFrank · Pull Request #195843 · NixOS/nixpkgs · GitHub. I think it just needs review and then approval from someone with merge rights. I keep meaning to review it, but haven’t had the mindspace - if you want to check out that branch and build your system with it to test I’m sure it’d be appreciated.

There’s some guidance for review here: Nixpkgs 22.05 manual

Alternatively, you can stop using linuxKernel_latest, instead using the default stable kernel. I believe that should fix things, assuming your hardware is compatible with an older kernel. Or switch to unstable for the time being, since the driver has already been updated there. Or wait until someone gets around to merging that PR :slight_smile:

the system is on 5.19.5.9

what could now be different from the review that ThoFrank did?


nix-shell -p nixpkgs-review --run “nixpkgs-review pr 195843”

$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs release-22.05:refs/nixpkgs-review/0 pull/195843/head:refs/nixpkgs-review/1
..
$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/ae/.cache/nixpkgs-review/pr-195843-1/build.nix
error: builder for '/nix/store/n049xlfv9qmv9fsn139hf039w8mnmn4q-linux-6.0.2.drv' failed with exit code 2;
last 10 log lines:
> Failed to encode BTF
> make[2]: *** [../scripts/Makefile.modfinal:59: drivers/gpu/drm/tiny/repaper.ko] Error 1
> make[2]: *** Deleting file 'drivers/gpu/drm/tiny/repaper.ko'
>   BTF [M] drivers/gpu/drm/vkms/vkms.ko
> make[2]: *** [../scripts/Makefile.modfinal:60: drivers/gpu/drm/nouveau/nouveau.ko] Error 1
> /nix/store/0q9hm42fapihzj1d64nxqmbml7fpb2d6-binutils-2.38/bin/ld: final link failed: No space left on device
>   BTF [M] drivers/gpu/drm/vmwgfx/vmwgfx.ko
> make[2]: *** [../scripts/Makefile.modfinal:60: drivers/gpu/drm/amd/amdgpu/amdgpu.ko] Error 1
> make[1]: *** [../scripts/Makefile.modpost:134: __modpost] Error 2
> make: *** [../Makefile:1766: modules] Error 2
For full logs, run 'nix log /nix/store/n049xlfv9qmv9fsn139hf039w8mnmn4q-linux-6.0.2.drv'.
error: 1 dependencies of derivation '/nix/store/a5yab5vrsk2b490vqb52nbx123wv5z9v-nvidia-x11-515.76-6.0.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/i5gbvbayijgn7cwxiq2n50x43hp7snbn-review-shell.drv' failed to build

Link to currently reviewing PR:                                                                                                                                                                                                              
https://github.com/NixOS/nixpkgs/pull/195843
                                                                                                                                                                                                                                            
4 packages marked as broken and skipped:
linuxKernel.packages.hardkernel_4_14.nvidia_x11 linuxKernel.packages.linux_testing_bcachefs.nvidia_x11 linuxPackages_hardkernel_latest.nvidia_x11 linuxPackages_testing_bcachefs.nvidia_x11

1 package failed to build:
linuxPackages_latest-libre.nvidia_x11

31 packages built:
bottles bumblebee geekbench geekbench4 gl-gsync-demo gwe linuxKernel.packages.linux_4_14.nvidia_x11 linuxPackages_4_14_hardened.nvidia_x11 linuxKernel.packages.linux_4_19.nvidia_x11 linuxPackages_4_19_hardened.nvidia_x11 linuxKernel.pac
kages.linux_4_9.nvidia_x11 linuxKernel.packages.linux_5_10.nvidia_x11 linuxPackages_5_10_hardened.nvidia_x11 linuxPackages.nvidia_x11 linuxPackages_hardened.nvidia_x11 linuxKernel.packages.linux_5_19.nvidia_x11 linuxKernel.packages.linu
x_5_19_hardened.nvidia_x11 linuxKernel.packages.linux_5_4.nvidia_x11 linuxPackages_latest.nvidia_x11 linuxPackages-libre.nvidia_x11 linuxPackages_lqx.nvidia_x11 linuxPackages_xanmod.nvidia_x11 linuxPackages_xanmod_latest.nvidia_x11 linu
xPackages_xanmod_tt.nvidia_x11 linuxPackages_zen.nvidia_x11 mangohud monitor nvfancontrol primus psensor xpraWithNvenc

I didn’t spot that review, looks like it’s just waiting for someone with merge permissions.

Also having problems after updating here (22.05, Kernel 5.15): modprobe says it cannot insert nvidia due to wrong exec format. First time in years I have to do a channel rollback, o.O

Good:

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.74, NixOS, 22.05 (Quokka), 22.05.3767.6107f97012a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"home-manager-22.05.tar.gz, mypkgs, nixos-22.05, nur, unstable"`
 - channels(user): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

bad: 22.05.3848.c132d0837df

edit: solved with an upgrade to 22.05.3893.040c6d8374d