vblanco20-1 / vulkan-guide

Introductory guide to vulkan.
https://vkguide.dev/
MIT License
954 stars 220 forks source link

Doesn't build on Fedora 40. No make errors just plain stops #111

Closed NikChouhan closed 6 months ago

NikChouhan commented 6 months ago

cmake build runs without errors but the make command gives the following error.

[  1%] Built target vkbootstrap
[ 28%] Built target sdl_headers_copy
[ 92%] Built target SDL2
[ 96%] Built target imgui
[ 96%] Built target fmt
[ 96%] Building CXX object src/CMakeFiles/engine.dir/main.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/vk_engine.h:6,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/main.cpp:1:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 96%] Building CXX object src/CMakeFiles/engine.dir/vk_initializers.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/vk_initializers.h:6,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/vk_initializers.cpp:1:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 96%] Building CXX object src/CMakeFiles/engine.dir/vk_descriptors.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/vk_descriptors.h:3,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/vk_descriptors.cpp:1:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 96%] Building CXX object src/CMakeFiles/engine.dir/vk_pipelines.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/vk_pipelines.h:2,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/vk_pipelines.cpp:1:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 96%] Building CXX object src/CMakeFiles/engine.dir/vk_engine.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/vk_engine.h:6,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/vk_engine.cpp:2:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 98%] Building CXX object src/CMakeFiles/engine.dir/camera.cpp.o
In file included from /home/nikhil/dev/VulkanApps/vkguide/src/camera.h:2,
                 from /home/nikhil/dev/VulkanApps/vkguide/src/camera.cpp:1:
/home/nikhil/dev/VulkanApps/vkguide/src/vk_types.h:24:73: warning: backslash-newline at end of file
   24 | #define VK_CHECK(x)                                                     \
[ 98%] Linking CXX executable /home/nikhil/dev/VulkanApps/vkguide/bin/engine
CMake Error: cmake version 3.28.2
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]: *** [src/CMakeFiles/engine.dir/build.make:248: /home/nikhil/dev/VulkanApps/vkguide/bin/engine] Error 1
make[2]: *** Deleting file '/home/nikhil/dev/VulkanApps/vkguide/bin/engine'
make[1]: *** [CMakeFiles/Makefile2:422: src/CMakeFiles/engine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Also the fastgltf library didn't build cuz of some unknown errors (might be due to gcc 14, as I have seen a few issues in that repo regarding the same. I intend to use diff lib for loading gltf models when need arises but for now I have removed it from cmakelists. It produced no error regarding it but just wanted to inform for the clarity)

NikChouhan commented 6 months ago

Marked as completed as I was able to fix it by removing the custom command at the end of CmakeLists.txt file in the src directory, as it wasn't required in non dll based systems like Linux based distros