LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vulkan 1.1.70 not loading libraries due to "wrong elf class 32" error (https://www.linuxquestions.org/questions/linux-newbie-8/vulkan-1-1-70-not-loading-libraries-due-to-wrong-elf-class-32-error-4175634621/)

Thoughtful_Sloth 07-21-2018 03:20 PM

vulkan 1.1.70 not loading libraries due to "wrong elf class 32" error
 
Hidiho!

I am trying to run the windows based game "Quantum Break" with the help of lutris and WINE. While trying to start the game, I run into following errors (excerpts from whole output):

Code:

Unhandled exception: page fault on read access to 0x00000000 in 64-bit code
from WINE

Code:

Backtrace:
=>0 0x0000000003046d42 in d3d_x64_f (+0x16d42) (0x000000003045fb10)
  1 0x00000000029b028a in renderer_x64_f (+0xf0289) (0x000000003045fb10)
  2 0x00000000029ad2f1 in renderer_x64_f (+0xed2f0) (0x000000003045ff00)
  3 0x00000000029a346a in renderer_x64_f (+0xe3469) (0x000000003045ff00)

from WINE

Code:

err:  DxvkInstance::createInstance: Failed to create Vulkan instance
err:  D3D11CreateDevice: Failed to create a DXGI factory

reported in console

Thus, I started researching and followed the hint on Vulkan. Indeed, when running vulkaninfo I get:
Code:

===========
VULKAN INFO
===========

Vulkan Instance Version: 1.1.70

ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
/home/abuild/rpmbuild/BUILD/Vulkan-LoaderAndValidationLayers-1.1.70.0/demos/vulkaninfo.c:2700: failed with VK_ERROR_INITIALIZATION_FAILED

Btw: This post on LQ describes a very similar problem, which sadly was not solved.

I checked thoroughly. My system has the 32-bit-libraries (in usr/lib) as well as corresponding 64-bit-libraries (in urs/lib64) available.
Does Vulkan call on wrong libraries? Is there an issue with my library setup? Am I still missing software?

I appreciate any hint. Thank you :)

hazel 07-22-2018 08:00 AM

Try using ldd with the name of your Vulcan binary. It should show you exactly which libraries the program is trying to bind to and whether it succeeds in finding them.

Thoughtful_Sloth 07-22-2018 03:03 PM

I tried, but I am embarrassed to admit, that I failed to identify the binary. I browsed vulkan associated files, but obviously there is no single file sticking out as a vulkan.exe would on a Windows system.

Would someone help me picking the right file? Is there a way to determine initial binaries of programs?

AwesomeMachine 07-22-2018 09:08 PM

Did you search the drive for anything with vulkan in the file name? I don't think it's going to be an exe, because those are Windows files.
Code:

$ locate -A -i vulkan bin

hazel 07-23-2018 08:24 AM

All binary executables (programs) are stored in one or other of the directories called bin. Here's a list of them for reference:
/bin: Essential system programs. Without these, Linux won't run at all.
/usr/bin: All the other programs that come with your system. Programs that are useful for real life but not essential in an emergency.
/usr/local/bin: Stuff that you built yourself from source.
/opt/bin: Some things that you install as ready-built binaries, like firefox, go here.
$HOME/bin: The (optional) bin subdirectory in your home directory. You can create a bin directory here and store private programs in it.

It's worth typing "echo $PATH" sometime. That will show you all the bin directories that get searched in for commands.

Thoughtful_Sloth 07-23-2018 01:40 PM

I looked indeed for files with "vulkan" in filename. There are a lot, but just "vulkaninfo" in a binary directory (/usr/bin/). Most are in /usr/lib or /usr/lib64, some in /usr/share.

AwesomeMachine 07-23-2018 02:03 PM

Quote:

Originally Posted by hazel (Post 5882610)
All binary executables (programs) are stored in one or other of the directories called bin. Here's a list of them for reference:
/bin: Essential system programs. Without these, Linux won't run at all.
/usr/bin: All the other programs that come with your system. Programs that are useful for real life but not essential in an emergency.
/usr/local/bin: Stuff that you built yourself from source.
/opt/bin: Some things that you install as ready-built binaries, like firefox, go here.
$HOME/bin: The (optional) bin subdirectory in your home directory. You can create a bin directory here and store private programs in it.

It's worth typing "echo $PATH" sometime. That will show you all the bin directories that get searched in for commands.


I think there also might be /sbin and /usr/sbin that contain binary executables.

AwesomeMachine 07-23-2018 02:05 PM

Quote:

Originally Posted by Thoughtful_Sloth (Post 5882709)
I looked indeed for files with "vulkan" in filename. There are a lot, but just "vulkaninfo" in a binary directory (/usr/bin/). Most are in /usr/lib or /usr/lib64, some in /usr/share.


OK, then vulkan must be just libraries.

hazel 07-23-2018 02:55 PM

Quote:

Originally Posted by AwesomeMachine (Post 5882712)
I think there also might be /sbin and /usr/sbin that contain binary executables.

Quite correct. But these two directories contain only "housekeeping" programs, so they are not on the path of ordinary users. Again /sbin is for the essential emergency ones and /usr/sbin for the less essential ones.

/lib is for essential libraries, /usr/lib(64) for less essential ones and /usr/share for data that programs need.

One of the big differences between Linux and Windows is that in Windows, you are confined to the playpen of My Documents. You are very strongly discouraged from trying to explore the rest of the system. In Linux, the whole system belongs to you and you are encouraged to explore it. Learning where different kinds of files are kept is part of the fun.

And, as you have noticed, Sloth, Linux files do not have to have a 3-letter extension to their names. Files that contain data often have one to show the data type (text, graphics, sound or whatever) but programs never do.

Thoughtful_Sloth 08-01-2018 03:07 AM

After I nearly crashed my linux by replacing the libraries in question with links to the 64bit ones (which he seems to look for) with no success at all, I followed a lead which suggested incompatibility between the radeon graphics driver and vulkan. Thus, I switched to AMDGPU driver.

Upside: Vulkan seems to be running now.

Downside: The game Quantum Break issues new error messages.

Code:

warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
WARNING: radv is not a conformant vulkan implementation, testing use only.
warn:  OpenVR: Failed to locate module
info:  AMD RADV TAHITI (LLVM 6.0.0):
info:    Driver: 18.1.4
info:    Vulkan: 1.1.70
info:    Memory Heap[0]:
info:      Size: 2816 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 256 MiB
info:      Flags: 0x1
info:      Memory Type[2]: Property Flags = 0x7
info:    Memory Heap[2]:
info:      Size: 3072 MiB
info:      Flags: 0x0
info:      Memory Type[1]: Property Flags = 0x6
info:      Memory Type[3]: Property Flags = 0xe
warn:  DXGI: VK_FORMAT_D24_UNORM_S8_UINT -> VK_FORMAT_D32_SFLOAT_S8_UINT
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
warn:  Vulkan extension VK_EXT_shader_viewport_index_layer not supported
err:  Required Vulkan extension VK_EXT_vertex_attribute_divisor not supported
err:  Required Vulkan extension VK_KHR_dedicated_allocation not supported
err:  Required Vulkan extension VK_KHR_get_memory_requirements2 not supported
err:  Required Vulkan extension VK_KHR_maintenance2 not supported
err:  DxvkAdapter: Failed to create device
err:  D3D11CoreCreateDevice: Failed to create DXGI device
wine: Unhandled page fault on read access to 0x00000000 at address 0x3046d42 (thread 008e), starting debugger...
0090:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6

To me, this looks like one of two things:

1) My graphics chip does not support certain operations. Pretty likely, as my Tahiti chipset is not officially supported by AMDGPU.

2) My system is missing something I am unable to understand from this error message.

Does someone have a hint for me which way to look?

Thoughtful_Sloth 08-06-2018 07:48 AM

Just solved the problem myself the hard way.
Accidentally, I crashed my openSUSE entirely. Thus I had to rescue my data, format my drive and reinstall completely. Now, everything works just fine. It seems to me, that my previous OS installation was flawed in some way - although I have no clue what I could have done wrong.

Nevertheless: Solved.


All times are GMT -5. The time now is 08:08 PM.