KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.71k stars 409 forks source link

xcode 10 build error #221

Closed quinton-ashley closed 6 years ago

quinton-ashley commented 6 years ago

"extension_enum.inc" file not found

// The known SPIR-V extensions.
enum Extension {
#include "extension_enum.inc"
};
billhollings commented 6 years ago

@quinton-ashley

Can you provide further information, please?

Are you using MoltenVK from this repository...or are you using it as part of LunarG's Vulkan SDK?

Have you run the ./fetchDependencies script...and did it run to completion successfully?

What is it that you are trying to do when you encounter that error? Can you provide steps to reproduce the error?

quinton-ashley commented 6 years ago

I had to install gcc (it was not installed for some reason) and then reinstall cmake. Now ./fetchDependencies seems like it might have failed at the end and building with xcode 10 gives a clang linker error returns -1.

I am trying to install from this repo, with these build tool versions: cmake 3.12.1 python 3.7.0 ninja 1.8.2

$ ./fetchDependencies

Retrieving MoltenVK dependencies into External.

cereal repo: https://github.com/USCiLab/cereal.git
cereal revision: 51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4
Fetching origin
HEAD is now at 51cbda5 Merge branch 'develop' for release 1.2.2
/Users/qashto/Downloads/MoltenVK/External
Vulkan-Headers repo: https://github.com/KhronosGroup/Vulkan-Headers.git
Vulkan-Headers revision: c4e056d365472174471a243dfefbfe66a03564af
Fetching origin
HEAD is now at c4e056d headers: Update to version 1.1.82 of the Vulkan hdr
/Users/qashto/Downloads/MoltenVK/External
SPIRV-Cross repo: https://github.com/KhronosGroup/SPIRV-Cross.git
SPIRV-Cross revision: 162eee632599cd077972ee1d88b341eedbcfdf27
Fetching origin
HEAD is now at 162eee6 Merge pull request #648 from billhollings/master
/Users/qashto/Downloads/MoltenVK/External
glslang repo: https://github.com/KhronosGroup/glslang.git
glslang revision: e99a26810f65314183163c07664a40e05647c15f
Fetching origin
HEAD is now at e99a2681 Merge pull request #1457 from KhronosGroup/parse-floats
/Users/qashto/Downloads/MoltenVK/External
Change directory to .
Get spirv-tools

In External/spirv-tools: ['git', 'remote']
known-good
origin

9ecbcf5fc87db00d3d6275522c735b5667007647
In External/spirv-tools: ['git', 'checkout', u'9ecbcf5fc87db00d3d6275522c735b5667007647']
HEAD is now at 9ecbcf5f Make sure the constant folder get the correct type.

Get spirv-tools/external/spirv-headers

In External/spirv-tools/external/spirv-headers: ['git', 'remote']
known-good
origin

ff684ffc6a35d2a58f0f63108877d0064ea33feb
In External/spirv-tools/external/spirv-headers: ['git', 'checkout', u'ff684ffc6a35d2a58f0f63108877d0064ea33feb']
HEAD is now at ff684ff Add enumerants for SPV_KHR_8bit_storage.

/Users/qashto/Downloads/MoltenVK/External
Building glslang
-- The C compiler identification is AppleClang 10.0.0.10001043
-- The CXX compiler identification is AppleClang 10.0.0.10001043
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Google Mock was not found - tests based on that will not build
-- optimizer enabled
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   SPIRV-Tools-shared

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/qashto/Downloads/MoltenVK/External/glslang/build
[290/290] Linking CXX executable StandAlone/glslangValidator
make: *** No rule to make target `install'.  Stop.
/Users/qashto/Downloads/MoltenVK/External
Vulkan-Tools repo: https://github.com/KhronosGroup/Vulkan-Tools.git
Vulkan-Tools revision: 5caab21c8d228a94a2f897cbe9447de48736eed7
Fetching origin
HEAD is now at 5caab21c vulkaninfo: Fix output whitespace irregularities
/Users/qashto/Downloads/MoltenVK/External
VulkanSamples repo: https://github.com/LunarG/VulkanSamples.git
VulkanSamples revision: be8253962e5a60d35c8568be8499405f0b0dac76
Fetching origin
HEAD is now at be8253962 Remove Vulkan-LoaderAndValidationLayers submodule
/Users/qashto/Downloads/MoltenVK/External
quinton-ashley commented 6 years ago

I get the same error as #224

billhollings commented 6 years ago

@quinton-ashley

I am not able to replicate the original error you mention above. And if you are encountering the same error described in issue #224...then you are able to get past the state above.

Consequently...I am closing this issue as a duplicate of issue #224. If you feel this issue is still valid...please reopen it and provide further information about replicating it.

Pescolly commented 5 years ago

Go to project settings and set Build System to Legacy.

ethereal-esthesia commented 5 years ago

I had the same error, "fatal error: 'extension_enum.inc' file not found" when "fetchDependencies" gets to the SPIR-V step. To fix it, I had to install cmake and run again.