DragonJoker / Ashes

Drop-in replacement for Vulkan shared library, for older hardware compatibility
https://dragonjoker.github.io/Ashes/
MIT License
359 stars 19 forks source link

Can't build from source #278

Open klementievd opened 1 year ago

klementievd commented 1 year ago
[ 50%] Linking CXX shared library libashesGlRenderer.so
CMake Error: cmake version 3.26.4
Usage: /usr/bin/cmake -E <command> [arguments...]
Available commands: 
  capabilities              - Report capabilities built into cmake in JSON format
  cat [--] <files>...       - concat the files and print them to the standard output
  chdir dir cmd [args...]   - run command in a given directory
  compare_files [--ignore-eol] file1 file2
                              - check if file1 is same as file2
  copy <file>... destination  - copy files to destination (either file or directory)
  copy_directory <dir>... destination   - copy content of <dir>... directories to 'destination' directory
  copy_directory_if_different <dir>... destination   - copy changed content of <dir>... directories to 'destination' directory
  copy_if_different <file>... destination  - copy files if it has changed
  echo [<string>...]        - displays arguments as text
  echo_append [<string>...] - displays arguments as text but no new line
  env [--unset=NAME ...] [NAME=VALUE ...] [--] <command> [<arg>...]
                            - run command in a modified environment
  environment               - display the current environment
  make_directory <dir>...   - create parent and <dir> directories
  md5sum <file>...          - create MD5 checksum of files
  sha1sum <file>...         - create SHA1 checksum of files
  sha224sum <file>...       - create SHA224 checksum of files
  sha256sum <file>...       - create SHA256 checksum of files
  sha384sum <file>...       - create SHA384 checksum of files
  sha512sum <file>...       - create SHA512 checksum of files
  remove [-f] <file>...     - remove the file(s), use -f to force it (deprecated: use rm instead)
  remove_directory <dir>... - remove directories and their contents (deprecated: use rm instead)
  rename oldname newname    - rename a file or directory (on one volume)
  rm [-rRf] [--] <file/dir>... - remove files or directories, use -f to force it, r or R to remove directories and their contents recursively
  sleep <number>...         - sleep for given number of seconds
  tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]
                            - create or extract a tar or zip archive
  time command [args...]    - run command and display elapsed time
  touch <file>...           - touch a <file>.
  touch_nocreate <file>...  - touch a <file> but do not create it.
  create_symlink old new    - create a symbolic link new -> old
  create_hardlink old new   - create a hard link new -> old
  true                      - do nothing with an exit code of 0
  false                     - do nothing with an exit code of 1

make[2]: *** [source/ashes/renderer/GlRenderer/CMakeFiles/ashesGlRenderer.dir/build.make:2861: source/ashes/renderer/GlRenderer/libashesGlRenderer.so.1.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:629: source/ashes/renderer/GlRenderer/CMakeFiles/ashesGlRenderer.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
klementievd commented 1 year ago

Why CMake generate command without any arguments?

cd /home/klementievd/Ashes/build/source/ashes/renderer/GlRenderer && /usr/bin/cmake -E copy_if_different      
DragonJoker commented 1 year ago

Which compiler (with version) are you using ?

And what was your cmake command line ?

klementievd commented 1 year ago

On that machine (Fedora 38) I used the latest version of the g++ compiler (gcc-c++-13.1.1-2.fc38). When building, I created a new build directory and from it run

cmake ../
make
klementievd commented 1 year ago

And Ok I built the source code on another machine, but now I have another problem, I can not run the game. I tried to run Dota 2 from Steam with the following launch parameters: VK_ICD_FILENAMES=/usr/lib/ashesGlRenderer_icd.json %command%. Maybe I got it wrong and I can't use Ashes for games?

VK_ICD_FILENAMES=/usr/lib/ashesGlRenderer_icd.json vkcube output:

vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

VK_ICD_FILENAMES=/usr/lib/ashesGlRenderer_icd.json vulkaninfo output:

ERROR: [Loader Message] Code 0 : /usr/lib/./libashesGlRenderer.so.1: undefined symbol: wl_egl_window_get_attached_size
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /usr/lib/./libashesGlRenderer.so.1. Ignoring this JSON
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.245/vulkaninfo/vulkaninfo.h:677:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
DragonJoker commented 1 year ago

On that machine (Fedora 38) I used the latest version of the g++ compiler (gcc-c++-13.1.1-2.fc38). When building, I created a new build directory and from it run

cmake ../
make

You also need to specify the build type with that option: -DCMAKE_BUILD_TYPE=Release

klementievd commented 1 year ago

Yeah, I already tried that. It worked, but now I get a Segmentation fault when I run vkcube. vulkaninfo works fine