Can't start Xorg on OpenSUSE 15.0 after video driver update

Hello,

Xorg doesn’t start after recent Nvidia driver update from OpenSUSE 15.0 repository.
If I remove /etc/X11/xorg.conf (generated by nvidia-xconfig) Xorg starts with, I believe, nouveau (although xf86-video-nouveau package is not installed), nvidia-settings crashes with “ERROR: Unable to load info from any available system”.

There’s no nvidia kernel module installed for the currently running kernel, please reinstall the driver.

sudo lspci -k -d 10de:*

should show “nvidia” as available kernel driver like

Kernel modules: nvidia_drm, nvidia

I’m using this repository: https://download.nvidia.com/opensuse/leap/15.0

I tried to reinstall the driver, see zypper’s output below.
libelf-devel and elfutils kernel-devel are installed.

EDIT: kernel-devel is installed. Are any other packages must be installed?

Installing: nvidia-gfxG05-kmp-default-418.43_k4.12.14_lp150.11-lp150.9.1.x86_64 ..............................................................................[done]
Additional rpm output:
depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory                                                                                                           
depmod: ERROR: fstatat(5, nvidia-modeset.ko): No such file or directory                                                                                                   
depmod: ERROR: fstatat(5, nvidia-uvm.ko): No such file or directory                                                                                                       
depmod: ERROR: fstatat(5, nvidia-drm.ko): No such file or directory                                                                                                       
/usr/src/kernel-modules/nvidia-418.43-default /                                                                                                                           
rm -f -r conftest                                                                                                                                                         
make[1]: Entering directory '/usr/src/linux-4.12.14-lp150.12.48'                                                                                                          
make[2]: Entering directory '/usr/src/linux-4.12.14-lp150.12.48-obj/x86_64/default'                                                                                       
make[2]: Leaving directory '/usr/src/linux-4.12.14-lp150.12.48-obj/x86_64/default'                                                                                        
make[1]: Leaving directory '/usr/src/linux-4.12.14-lp150.12.48'                                                                                                           
/                                                                                                                                                                         
/usr/src/linux-4.12.14-lp150.12.48/Makefile:971: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.                                                                                                                                                             
make[1]: *** [Makefile:152: sub-make] Error 2                                                                                                                             
make: *** [Makefile:24: __sub-make] Error 2                                                                                                                               
make: Entering directory '/usr/src/linux-4.12.14-lp150.12.48-obj/x86_64/default'                                                                                          
/usr/src/linux-4.12.14-lp150.12.48/Makefile:971: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.                                                                                                                                                             
make[1]: *** [Makefile:152: sub-make] Error 2                                                                                                                             
make: *** [Makefile:24: __sub-make] Error 2                                                                                                                               
make: Leaving directory '/usr/src/linux-4.12.14-lp150.12.48-obj/x86_64/default'                                                                                           
/usr/src/kernel-modules/nvidia-418.43-default /                                                                                                                           
make[1]: *** /lib/modules//source: No such file or directory.  Stop.                                                                                                      
make: *** [Makefile:79: modules] Error 2                                                                                                                                  
/                                                                                                                                                                         
install: cannot stat '/usr/src/kernel-modules/nvidia-418.43-default/nvidia*.ko': No such file or directory

The packages you installed should be sufficient but something is broken. What are the versions of the installed
libelf-devel
elfutils
Please post the output of
ldd /usr/bin/eu-objdump

libelf-devel and elfutils both are 0.168-lp150.2.48, according to zypper info.

> ldd /usr/bin/eu-objdump 
        linux-vdso.so.1 (0x00007ffddb71b000)
        libasm.so.1 => /usr/lib64/libasm.so.1 (0x00007f373f777000)
        libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007f373f55f000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f373f35b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f373efa1000)
        libdw.so.1 => /usr/lib64/libdw.so.1 (0x00007f373ed59000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f373fb89000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f373eb42000)
        liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f373e907000)
        libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f373e6ea000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f373e4cc000)

Looks normal. What’s the output of
echo “int main() {}” | gcc -xc -o /dev/null -lelf -
Edit: typo

> echo "int main() {}" | gcc -xc -o /dev/null -lelf -
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

> file /usr/lib/libc.so
/usr/lib/libc.so: ASCII text

> cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

It looks like you’re running a 32bit userland on a 64bit kernel, there are also other errors in the log about this. Maybe just a wronf /usr/lib symlink? What’s the output of
ls -l /usr

drwxr-xr-x   4 root root   4096 Oct 26 15:53 X11R6
drwxr-xr-x   2 root root 106496 Mar  3 19:37 bin
drwxr-xr-x  87 root root  12288 Dec  1 11:30 include
drwxr-xr-x 130 root root  49152 Mar  3 21:44 lib
drwxr-xr-x 162 root root 204800 Mar  3 19:37 lib64
drwxr-xr-x  11 root root   4096 Jun  7  2018 local
drwxr-xr-x   2 root root  24576 Mar  1 17:19 sbin
drwxr-xr-x 379 root root  12288 Mar  3 19:37 share
drwxr-xr-x   9 root root   4096 Feb 20 18:56 src
drwxr-xr-x   5 root root   4096 Jun  7  2018 x86_64-suse-linux

OS is 64-bit, but I have many 32-bit packages installed, including glibc-32bit.

A multilib install is not uncommon but most distros have /usr/lib32 for 32bit libs, /usr/lib64 for 64bit libs and /usr/lib being a symlink to /usr/lib64. I don’t know how Suse specifically handles this so the directory setup might be correct and you’re just missing some library path entry. You’d better revert to the Suse forums to have your setup checked.

OK, I will. Thank you for your time.

As a workaround to have the driver installed, maybe try to set
LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"

Solution found: install glibc-devel-*
There are three packages that match the mask, and one or more of those should be declared as a dependency of the driver package.

I suspected so but thought that the minimal build package for SuSE would include that. Moreover, not the driver but the kernel-devel package is triggering that error due to CONFIG_UNWINDER_ORC=y being set, so it should be a dependency for that package. Glad you solved your issue.

Actually, glibc-devel was installed. The other thee were glibc-devel-static, glibc-devel-32bit and glibc-devel-static-32bit. Was the 64-bit static library the missing part or it’s all about 32-bit?
Anyway, thank you for hints.

That’s even more puzzling, glibc-devel should have been sufficient, the devel-32bit packages should have been skipped and the devel-static should only be used with gcc’s -static switch. So I can only speculate about the deeper reason, either some bogus cflags set in your environment or an odd gcc bug. Should have used -v switch to have a more verbose output.