C compiler cannot create executables of amdgpu-dkms while installing amd romc drivers

I am following this Quick Start (Linux) — ROCm Documentation Home amd manual to install the romc drivers in SUSE and I am getting this error:

user@localhost:~> LANG=C sudo zypper install -f amdgpu-dkms
Loading repository data...
Reading installed packages...
Forcing installation of 'amdgpu-dkms-1:6.1.5.50600-1609671.noarch' from repository 'amdgpu'.
Resolving package dependencies...

The following package is going to be reinstalled:
  amdgpu-dkms

1 package to reinstall.
Overall download size: 10.8 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: amdgpu-dkms-1:6.1.5.50600-1609671.noarch (amdgpu)                                                                                                                                                                                             (1/1),  10.8 MiB    
Retrieving: amdgpu-dkms-6.1.5.50600-1609671.noarch.rpm .....................................................................................................................................................................................................[done (2.6 MiB/s)]

Checking for file conflicts: ...........................................................................................................................................................................................................................................[done]
Removing old amdgpu-6.1.5-1609671 DKMS files...
Deleting module amdgpu-6.1.5-1609671 completely from the DKMS tree.
Loading new amdgpu-6.1.5-1609671 DKMS files...
Building for 5.14.21-150500.53-default
Building initial module for 5.14.21-150500.53-default
configure: error: in `/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/dkms':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error! Bad return status for module build on kernel: 5.14.21-150500.53-default (x86_64)
Consult /var/lib/dkms/amdgpu/6.1.5-1609671/build/make.log for more information.
warning: %post(amdgpu-dkms-1:6.1.5.50600-1609671.noarch) scriptlet failed, exit status 10
(1/1) Installing: amdgpu-dkms-1:6.1.5.50600-1609671.noarch .............................................................................................................................................................................................................[done]

For more details

user@localhost:~> LANG=C sudo zypper -vvvv install -fy amdgpu-dkms 
Verbosity: 3
Entering non-interactive mode.
Non-option program arguments: 'amdgpu-dkms' 
Initializing Target
Checking whether to refresh metadata for openSUSE-Leap-15.5-1
Checking whether to refresh metadata for Update repository of openSUSE Backports
Checking whether to refresh metadata for Non-OSS Repository
Checking whether to refresh metadata for Open H.264 Codec (openSUSE Leap)
Checking whether to refresh metadata for Haupt-Repository
Checking whether to refresh metadata for Update repository with updates from SUSE Linux Enterprise 15
Checking whether to refresh metadata for Hauptaktualisierungs-Repository
Checking whether to refresh metadata for Aktualisierungs-Repository (Nicht-Open-Source-Software)
Loading repository data...
Reading installed packages...
Forcing installation of 'amdgpu-dkms-1:6.1.5.50600-1609671.noarch' from repository 'amdgpu'.
Resolving package dependencies...
Force resolution: No

The following 5 package updates will NOT be installed:
  gdb                   
    12.1-150400.15.9.1  x86_64  Update repository with updates from SUSE Linux Enterprise 15
    SUSE LLC <https://www.suse.com/>
  libcap2               
    2.63-150400.3.3.1   x86_64  Update repository with updates from SUSE Linux Enterprise 15
    SUSE LLC <https://www.suse.com/>
  libjansson4           
    2.14-150000.3.3.1   x86_64  Update repository with updates from SUSE Linux Enterprise 15
    SUSE LLC <https://www.suse.com/>
  perl-Net-SMTP-SSL     
    1.04-2.1            noarch  Centreon 18.10 Monitoring System for SLES (SLE_15_SP3)      
    obs://build.opensuse.org/home:interstar001
  perl-Term-ReadLine-Gnu
    1.45-22.1           x86_64  Centreon 18.10 Monitoring System for SLES (SLE_15_SP3)      
    obs://build.opensuse.org/home:interstar001

The following package is going to be reinstalled:
  amdgpu-dkms  1:6.1.5.50600-1609671  noarch  amdgpu  

1 package to reinstall.
Overall download size: 10.8 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): y
committing
Retrieving: amdgpu-dkms-1:6.1.5.50600-1609671.noarch (amdgpu)                                         (1/1),  10.8 MiB    
Retrieving: https://repo.radeon.com/amdgpu/latest/sle/15.5/main/x86_64/amdgpu-dkms-6.1.5.50600-1609671.n[done (2.1 MiB/s)]

Checking for file conflicts: .......................................................................................[done]
Removing old amdgpu-6.1.5-1609671 DKMS files...
Deleting module amdgpu-6.1.5-1609671 completely from the DKMS tree.
Loading new amdgpu-6.1.5-1609671 DKMS files...
Building for 5.14.21-150500.53-default
Building initial module for 5.14.21-150500.53-default
configure: error: in `/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/dkms':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error! Bad return status for module build on kernel: 5.14.21-150500.53-default (x86_64)
Consult /var/lib/dkms/amdgpu/6.1.5-1609671/build/make.log for more information.
warning: %post(amdgpu-dkms-1:6.1.5.50600-1609671.noarch) scriptlet failed, exit status 10
(1/1) Installing: amdgpu-dkms-1:6.1.5.50600-1609671.noarch .........................................................[done]
CommitResult  (total 1, done 1, error 0, skipped 0, updateMessages 0)
user@localhost:~> LANG=C sudo zypper lr
Repository priorities in effect:                                                          (See 'zypper lr -P' for details)
      50 (raised priority)  :  1 repository
      99 (default priority) : 10 repositories

#  | Alias                       | Name                                                    | Enabled | GPG Check | Refresh
---+-----------------------------+---------------------------------------------------------+---------+-----------+--------
 1 | amdgpu                      | amdgpu                                                  | Yes     | (r ) Yes  | No
 2 | home_interstar001_Centreon  | Centreon 18.10 Monitoring System for SLES (SLE_15_SP3)  | Yes     | (r ) Yes  | No
 3 | openSUSE-Leap-15.5-1        | openSUSE-Leap-15.5-1                                    | Yes     | (r ) Yes  | Yes
 4 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debu-> | No      | ----      | ----
 5 | repo-backports-update       | Update repository of openSUSE Backports                 | Yes     | (r ) Yes  | Yes
 6 | repo-debug                  | Debug Repository                                        | No      | ----      | ----
 7 | repo-debug-non-oss          | Debug Repository (Non-OSS)                              | No      | ----      | ----
 8 | repo-debug-update           | Update Repository (Debug)                               | No      | ----      | ----
 9 | repo-debug-update-non-oss   | Update Repository (Debug, Non-OSS)                      | No      | ----      | ----
10 | repo-non-oss                | Non-OSS Repository                                      | Yes     | (r ) Yes  | Yes
11 | repo-openh264               | Open H.264 Codec (openSUSE Leap)                        | Yes     | (r ) Yes  | Yes
12 | repo-oss                    | Haupt-Repository                                        | Yes     | (r ) Yes  | Yes
13 | repo-sle-debug-update       | Update repository with debuginfo for updates from SUS-> | No      | ----      | ----
14 | repo-sle-update             | Update repository with updates from SUSE Linux Enterp-> | Yes     | (r ) Yes  | Yes
15 | repo-source                 | Source Repository                                       | No      | ----      | ----
16 | repo-update                 | Hauptaktualisierungs-Repository                         | Yes     | (r ) Yes  | Yes
17 | repo-update-non-oss         | Aktualisierungs-Repository (Nicht-Open-Source-Software) | Yes     | (r ) Yes  | Yes
18 | rocm                        | rocm                                                    | Yes     | (r ) Yes  | No

That is all a mess. What are you trying to do?

Are you a programmer and try to debug software?

If not, delete all debug repositories.

You are mixing repos for different distributions
SLE is not the same as Leap 15.5

All codecs can be found in the packman repo, delete the h264 repo and add the community repositories

Libdvdcss
Packman

You want to use Davin resolve or do video editing,
You need the codecs in the packman repo
gstreamer-plugins- dirty/ugly/bad
libdvdread6 and others
Only then, all video codecs in Blender/DaVinvci/VLC Play everything.

(1) I certainly will not delete the OpenSUSE official repository for h264 codecs, it was installed by default and I don’t want to change it for a third party.
(2) debug repos did come by default for some reason, but if you note they are disabled. So they are like if they never were installed.
(3) You are not helping to see why the amd rocm drivers are not installing well.
(4) And DaVinci either comes with their own codec libraries or it identified them as installed, because it did not complained about missing dependencies.

I am trying to understand your system, as you have opened many questions.

Your Centreon on does definitely not look right

https://download.opensuse.org/repositories/home:/interstar001:/Centreon/

15.5 should be yours, but it is still von 15.4

Look at the log:
Consult
/var/lib/dkms/amdgpu/6.1.5-1609671/build/make.log
for more information

Post the content here.

DKMS make.log for amdgpu-6.1.5-1609671 for kernel 5.14.21-150500.53-default (x86_64)
Mon Jul  3 16:58:02 CST 2023
make: Entering directory '/usr/src/linux-5.14.21-150500.53-obj/x86_64/default'
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_main.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_fence.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_entity.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/drm_gem_ttm_helper.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_tt.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/drm_buddy.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo_util.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo_vm.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_module.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/main.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_execbuf_util.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/symbols.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_range_manager.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_resource.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_drv.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_device.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_common.o
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_module.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/drm_gem_ttm_helper.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_kernel_params.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_kms.o
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo_vm.o] Error 1
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:20:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h: In function 'kcl_register_shrinker':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_shrinker.h:14:16: error: too many arguments to function 'register_shrinker'
         return register_shrinker(shrinker, fmt);
                ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-5.14.21-150500.53/include/linux/mm.h:20:0,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/scatterlist.h:8,
                 from /usr/src/linux-5.14.21-150500.53/include/linux/dma-mapping.h:10,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/kcl_dma_mapping.h:5,
                 from /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/backport/backport.h:8,
                 from <command-line>:0:
/usr/src/linux-5.14.21-150500.53/include/linux/shrinker.h:93:12: note: declared here
 extern int register_shrinker(struct shrinker *shrinker);
            ^~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_atombios.o
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo.o] Error 1
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_resource.o] Error 1
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_range_manager.o] Error 1
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/atombios_crtc.o
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_execbuf_util.o] Error 1
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/dma-buf/dma-resv.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_backlight.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_connectors.o
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_tt.o] Error 1
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/atom.o
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm/ttm_bo_util.o] Error 1
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:540: /var/lib/dkms/amdgpu/6.1.5-1609671/build/ttm] Error 2
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_fence.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_ioctl.o
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_drv.c: At top level:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_drv.c:28:10: fatal error: drm/drm_fbdev_generic.h: No such file or directory
 #include <drm/drm_fbdev_generic.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_drv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_kthread.o
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_io.o
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/bin/sh: ld: command not found
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_fence.o] Error 127
make[3]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_fence.o'
make[3]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_seq_file.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_suspend.o
/bin/sh: ld: command not found
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/drm_buddy.o] Error 127
make[2]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/drm_buddy.o'
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_pci.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_mm.o
/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_device_init':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_device.c:3994:5: error: implicit declaration of function 'apple_gmux_detect'; did you mean 'apple_gmux_present'? [-Werror=implicit-function-declaration]
     apple_gmux_detect(NULL, NULL)))
     ^~~~~~~~~~~~~~~~~
     apple_gmux_present
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_memory.o
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/backport/backport.h:107:0,
                 from <command-line>:0:
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_alloc_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: error: implicit declaration of function 'drm_fb_helper_alloc_info'; did you mean 'drm_fb_helper_fill_info'? [-Werror=implicit-function-declaration]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~
                drm_fb_helper_fill_info
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:10:16: warning: return makes pointer from integer without a cast [-Wint-conversion]
         return drm_fb_helper_alloc_info(fb_helper);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h: In function '_kcl_drm_fb_helper_unregister_fbi':
/var/lib/dkms/amdgpu/6.1.5-1609671/build/include/kcl/backport/kcl_drm_fb_helper.h:19:9: error: implicit declaration of function 'drm_fb_helper_unregister_info'; did you mean 'drm_fb_helper_unregister_fbi'? [-Werror=implicit-function-declaration]
         drm_fb_helper_unregister_info(fb_helper);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         drm_fb_helper_unregister_fbi
/bin/sh: ld: command not found
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_entity.o] Error 127
make[3]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_entity.o'
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_sched.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_fence.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_reservation.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_drm_cache.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_drm_fb.o
  CC [M]  /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_drm_print.o
/bin/sh: ld: command not found
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/dma-buf/dma-resv.o] Error 127
make[3]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/dma-buf/dma-resv.o'
make[3]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/atombios_crtc.o] Error 1
/bin/sh: ld: command not found
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_main.o] Error 127
make[3]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler/sched_main.o'
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:540: /var/lib/dkms/amdgpu/6.1.5-1609671/build/scheduler] Error 2
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_fence.o] Error 1
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_atombios.o] Error 1
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_connectors.o] Error 1
/bin/sh: ld: command not found
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_pci.o] Error 127
make[3]: *** Deleting file '/var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl/kcl_pci.o'
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_kms.o] Error 1
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/atom.o] Error 1
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:540: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdkcl] Error 2
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:276: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu/amdgpu_device.o] Error 1
make[2]: *** [/usr/src/linux-5.14.21-150500.53/scripts/Makefile.build:540: /var/lib/dkms/amdgpu/6.1.5-1609671/build/amd/amdgpu] Error 2
make[1]: *** [/usr/src/linux-5.14.21-150500.53/Makefile:1895: /var/lib/dkms/amdgpu/6.1.5-1609671/build] Error 2
make: *** [../../../linux-5.14.21-150500.53/Makefile:220: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-5.14.21-150500.53-obj/x86_64/default'

This seems to be the issue.

Run cnf ld to determine the correct package to install.

Weirdly after installing binutils (the package that cnf said me), cd is still missing.

Some extra info:

$ file /usr/bin/ld
/usr/bin/ld: broken symbolic link to /etc/alternatives/ld

Here’s what I am seeing:

nwrdell:croot 90# ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 20 Nov  3  2022 /usr/bin/ld -> /etc/alternatives/ld
nwrdell:croot 91# ls -l /etc/alternatives/ld
lrwxrwxrwx 1 root root 15 Jun 24 21:31 /etc/alternatives/ld -> /usr/bin/ld.bfd
nwrdell:croot 92# ls -l /usr/bin/ld.bfd
-rwxr-xr-x 1 root root 9295712 Nov  3  2022 /usr/bin/ld.bfd

Trying to use this information to repair my ld gives me this:

> sudo alternatives --install /usr/bin/ld ld /usr/bin/ld.bfd 0
update-alternatives: warning: alternative /usr/bin/ld.gold (part of link group ld) doesn't exist; removing from list of alternatives
update-alternatives: error: /var/lib/alternatives/ld corrupt: unexpected end of file while trying to read master file

Something is broken.

Have you tried a forced reinstall of binutils?

I hale tried it at least one time

According to a google search, gold linker is deprecated (as of 2020).

removing /var/lib/alternatives/ld and repairing with the command mentiond before fixed the problem.

2 Likes