Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: failed to run custom build command for `spirv_cross v0.12.0` #2520

Open
oncealong opened this issue Dec 20, 2018 · 7 comments

Comments

@oncealong
Copy link

commented Dec 20, 2018

Short info header:

  • GFX version: master
  • OS: macos 10.14
  • GPU: Radeon Pro 580 8192 MB

just git clone and cd gfx/examples, and run cargo run --bin quad --features metal.

backtrace:

➜  examples git:(master) cargo run --bin quad --features metal
   Compiling spirv_cross v0.12.0
error: failed to run custom build command for `spirv_cross v0.12.0`
process didn't exit successfully: `/Users/along/workplace/rust/gfx/target/debug/build/spirv_cross-bb9726a46787fef7/build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CXX_x86_64-apple-darwin = None
CXX_x86_64_apple_darwin = None
HOST_CXX = None
CXX = None
CXXFLAGS_x86_64-apple-darwin = None
CXXFLAGS_x86_64_apple_darwin = None
HOST_CXXFLAGS = None
CXXFLAGS = None
DEBUG = Some("true")
CXX_x86_64-apple-darwin = None
CXX_x86_64_apple_darwin = None
HOST_CXX = None
CXX = None
CXXFLAGS_x86_64-apple-darwin = None
CXXFLAGS_x86_64_apple_darwin = None
HOST_CXXFLAGS = None
CXXFLAGS = None
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-o" "/Users/along/workplace/rust/gfx/target/debug/build/spirv_cross-cf2c702c55917d00/out/src/wrapper.o" "-c" "src/wrapper.cpp"
cargo:warning=src/wrapper.cpp:1:9: warning: unknown pragma ignored [-Wunknown-pragmas]
cargo:warning=#pragma warning(disable : 4996 4101)
cargo:warning=        ^
cargo:warning=In file included from src/wrapper.cpp:2:
cargo:warning=In file included from src/vendor/SPIRV-Cross/spirv_cross_util.hpp:20:
cargo:warning=In file included from src/vendor/SPIRV-Cross/spirv_cross.hpp:21:
cargo:warning=In file included from src/vendor/SPIRV-Cross/spirv_cfg.hpp:20:
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:95:48: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=void join_helper(std::ostringstream &stream, T &&t)
cargo:warning=                                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:100:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
cargo:warning=template <typename T, typename... Ts>
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:101:48: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=void join_helper(std::ostringstream &stream, T &&t, Ts &&... ts)
cargo:warning=                                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:101:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=void join_helper(std::ostringstream &stream, T &&t, Ts &&... ts)
cargo:warning=                                                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:111:13: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        Bitset() = default;
cargo:warning=                   ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:223:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint64_t lower = 0;
cargo:warning=                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:156:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:156:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:165:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : other.higher)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:165:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : other.higher)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:177:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:177:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:206:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:206:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : higher)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:210:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : bits)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:210:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &v : bits)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:228:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
cargo:warning=template <typename... Ts>
cargo:warning=                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:229:21: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=std::string join(Ts &&... ts)
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:239:7: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=        for (auto &elem : list)
cargo:warning=             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:239:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=        for (auto &elem : list)
cargo:warning=                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:249:40: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=inline std::string convert_to_string(T &&t)
cargo:warning=                                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:296:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint16_t op = 0;
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:297:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint16_t count = 0;
cargo:warning=                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:298:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t offset = 0;
cargo:warning=                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:299:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t length = 0;
cargo:warning=                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:24: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:308:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t self = 0;
cargo:warning=                      ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:347:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRUndef)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:368:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRCombinedImageSampler)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:389:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRConstantOp)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:371:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRConstantOp : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:371:8: note: while declaring the implicit destructor for 'SPIRConstantOp'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:424:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        BaseType basetype = Unknown;
cargo:warning=                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:425:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t width = 0;
cargo:warning=                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:426:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t vecsize = 1;
cargo:warning=                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:427:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t columns = 1;
cargo:warning=                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:441:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t pointer_depth = 0;
cargo:warning=                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:442:15: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool pointer = false;
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:444:28: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        spv::StorageClass storage = spv::StorageClassGeneric;
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:463:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t type_alias = 0;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:467:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t parent_type = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:472:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRType)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:392:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRType : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:392:8: note: while declaring the implicit destructor for 'SPIRType'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:498:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRExtension)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:512:21: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIREntryPoint() = default;
cargo:warning=                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:514:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t self = 0;
cargo:warning=                      ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:522:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t x = 0, y = 0, z = 0;
cargo:warning=                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:522:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t x = 0, y = 0, z = 0;
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:522:28: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t x = 0, y = 0, z = 0;
cargo:warning=                                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:523:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t constant = 0; // Workgroup size can be expressed as a constant/spec-constant instead.
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:525:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t invocations = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:526:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t output_vertices = 0;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:548:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t base_expression = 0;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:551:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t expression_type = 0;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:555:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t loaded_from = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:561:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool immutable = false;
cargo:warning=                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:565:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool need_transpose = false;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:570:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRExpression)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:530:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRExpression : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:530:8: note: while declaring the implicit destructor for 'SPIRExpression'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:588:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRFunctionPrototype)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:573:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRFunctionPrototype : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:573:8: note: while declaring the implicit destructor for 'SPIRFunctionPrototype'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:657:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        Terminator terminator = Unknown;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:658:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        Merge merge = MergeNone;
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:659:13: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        Hints hint = HintNone;
cargo:warning=                   ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:660:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t next_block = 0;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:661:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t merge_block = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:662:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t continue_block = 0;
cargo:warning=                                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:664:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t return_value = 0; // If 0, return nothing (void).
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:665:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t condition = 0;
cargo:warning=                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:666:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t true_block = 0;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:667:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t false_block = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:668:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t default_block = 0;
cargo:warning=                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:684:42: error: a space is required between consecutive right angle brackets (use '> >')
cargo:warning=        std::vector<std::pair<uint32_t, uint32_t>> declare_temporary;
cargo:warning=                                                ^~
cargo:warning=                                                > >
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:688:42: error: a space is required between consecutive right angle brackets (use '> >')
cargo:warning=        std::vector<std::pair<uint32_t, uint32_t>> potential_declare_temporary;
cargo:warning=                                                ^~
cargo:warning=                                                > >
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:699:34: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool disable_block_optimization = false;
cargo:warning=                                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:702:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool complex_continue = false;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:705:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool need_ladder_break = false;
cargo:warning=                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:709:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t loop_dominator = 0;
cargo:warning=                                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:725:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRBlock)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:591:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRBlock : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:591:8: note: while declaring the implicit destructor for 'SPIRBlock'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:783:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t entry_block = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:801:34: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++11 [-Wc++11-compat]
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_out;
cargo:warning=                                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:801:37: error: use of undeclared identifier 'fixup_hooks_out'
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_out;
cargo:warning=                                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:801:52: error: expected a type
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_out;
cargo:warning=                                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:806:34: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++11 [-Wc++11-compat]
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_in;
cargo:warning=                                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:806:37: error: use of undeclared identifier 'fixup_hooks_in'
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_in;
cargo:warning=                                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:806:51: error: expected a type
cargo:warning=        std::vector<std::function<void()>> fixup_hooks_in;
cargo:warning=                                                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:808:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool active = false;
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:809:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool flush_undeclared = true;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:810:30: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool do_combined_parameters = true;
cargo:warning=                                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:812:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRFunction)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:728:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRFunction : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:728:8: note: while declaring the implicit destructor for 'SPIRFunction'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:795:23: error: expected expression
cargo:warning=                arguments.push_back({ parameter_type, id, 0u, 0u, alias_global_variable });
cargo:warning=                                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:792:30: warning: unused parameter 'parameter_type' [-Wunused-parameter]
cargo:warning=        void add_parameter(uint32_t parameter_type, uint32_t id, bool alias_global_variable = false)
cargo:warning=                                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:792:55: warning: unused parameter 'id' [-Wunused-parameter]
cargo:warning=        void add_parameter(uint32_t parameter_type, uint32_t id, bool alias_global_variable = false)
cargo:warning=                                                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:792:64: warning: unused parameter 'alias_global_variable' [-Wunused-parameter]
cargo:warning=        void add_parameter(uint32_t parameter_type, uint32_t id, bool alias_global_variable = false)
cargo:warning=                                                                      ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:843:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t loaded_from = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:844:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t matrix_stride = 0;
cargo:warning=                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:845:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool row_major_matrix = false;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:846:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool immutable = false;
cargo:warning=                       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:848:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRAccessChain)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:815:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRAccessChain : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:815:8: note: while declaring the implicit destructor for 'SPIRAccessChain'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:858:19: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRVariable() = default;
cargo:warning=                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:867:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t basetype = 0;
cargo:warning=                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:868:28: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        spv::StorageClass storage = spv::StorageClassGeneric;
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:869:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t decoration = 0;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:870:23: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t initializer = 0;
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:871:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t basevariable = 0;
cargo:warning=                              ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:874:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool compat_builtin = false;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:880:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool statically_assigned = false;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:881:29: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t static_expression = 0;
cargo:warning=                                   ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:885:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool forwardable = true;
cargo:warning=                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:887:28: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool deferred_declaration = false;
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:888:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool phi_variable = false;
cargo:warning=                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:889:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool remapped_variable = false;
cargo:warning=                               ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:890:31: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t remapped_components = 0;
cargo:warning=                                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:893:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t dominator = 0;
cargo:warning=                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:897:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool loop_variable = false;
cargo:warning=                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:899:28: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool loop_variable_enable = false;
cargo:warning=                                  ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:901:37: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRFunction::Parameter *parameter = nullptr;
cargo:warning=                                           ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:903:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRVariable)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:851:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRVariable : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:851:8: note: while declaring the implicit destructor for 'SPIRVariable'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:928:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t vecsize = 1;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:944:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=                uint32_t columns = 1;
cargo:warning=                                 ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1088:19: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRConstant() = default;
cargo:warning=                         ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1155:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool specialization = false;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1157:31: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool is_used_as_array_length = false;
cargo:warning=                                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1160:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool is_used_as_lut = false;
cargo:warning=                            ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1171:2: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
cargo:warning=        SPIRV_CROSS_DECLARE_CLONE(SPIRConstant)
cargo:warning=        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:312:36: note: expanded from macro 'SPIRV_CROSS_DECLARE_CLONE'
cargo:warning=        std::unique_ptr<IVariant> clone() override          \
cargo:warning=                                          ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:906:8: error: exception specification of overriding function is more lax than base version
cargo:warning=struct SPIRConstant : IVariant
cargo:warning=       ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:906:8: note: while declaring the implicit destructor for 'SPIRConstant'
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:305:10: note: overridden virtual function is here
cargo:warning=        virtual ~IVariant() = default;
cargo:warning=                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1077:7: error: expected expression
cargo:warning=                m = {};
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1079:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &c : m.c)
cargo:warning=                     ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1079:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
cargo:warning=                for (auto &c : m.c)
cargo:warning=                             ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1178:14: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
cargo:warning=        Variant() = default;
cargo:warning=                    ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1181:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
cargo:warning=        Variant(Variant &&other) SPIRV_CROSS_NOEXCEPT
cargo:warning=                        ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1181:26: error: expected ';' at end of declaration list
cargo:warning=        Variant(Variant &&other) SPIRV_CROSS_NOEXCEPT
cargo:warning=                                ^
cargo:warning=                                ;
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1280:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        uint32_t type = TypeNone;
cargo:warning=                      ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1281:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
cargo:warning=        bool allow_type_rewrite = false;
cargo:warning=                                ^
cargo:warning=src/vendor/SPIRV-Cross/spirv_common.hpp:1287:13: error: no member named 'get' in 'spirv_cross::Variant'
cargo:warning=        return var.get<T>();
cargo:warning=               ~~~ ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=120 warnings and 20 errors generated.
exit code: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-o" "/Users/along/workplace/rust/gfx/target/debug/build/spirv_cross-cf2c702c55917d00/out/src/wrapper.o" "-c" "src/wrapper.cpp" with args "c++" did not execute successfully (status code exit code: 1).

', /Users/along/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.27/src/lib.rs:2313:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
             at libstd/panicking.rs:476
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:390
   6: std::panicking::try::do_call
             at libstd/panicking.rs:345
   7: cc::fail
             at /Users/along/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.27/src/lib.rs:2313
   8: cc::Build::try_compile::{{closure}}
             at /Users/along/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.27/src/lib.rs:950
   9: build_script_build::main
             at ./build.rs:19
  10: std::rt::lang_start::{{closure}}
             at libstd/rt.rs:74
  11: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  12: macho_symbol_search
             at libpanic_unwind/lib.rs:102
  13: std::alloc::default_alloc_error_hook
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  14: std::rt::lang_start
             at libstd/rt.rs:74
  15: build_script_build::main
@kvark

This comment has been minimized.

Copy link
Member

commented Dec 20, 2018

Looks like an old version of C++ compiler that we need for spirv_cross. What is your clang/gcc version?

@oncealong

This comment has been minimized.

Copy link
Author

commented Dec 21, 2018

##clang
I install XCode 10 and XCode 9.

Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@Michael-Lfx

This comment has been minimized.

Copy link
Contributor

commented Dec 21, 2018

Hello @oncealong . We are hiring full-time gfx-hal based project developers. We have both Beijing and Shenzhen offices. Feel free to contact me. See my GitHub info.

@grovesNL

This comment has been minimized.

Copy link
Member

commented Dec 21, 2018

@oncealong Is that the output of clang --version or c++ --version? Could you try which c++ and c++ --version?

@oncealong

This comment has been minimized.

Copy link
Author

commented Dec 23, 2018

@oncealong Is that the output of clang --version or c++ --version? Could you try which c++ and c++ --version?

➜  ~ clang --version
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
➜  ~ c++ --version
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
➜  ~ which c++
/usr/bin/c++
➜  ~ ls -al /usr/bin/c++
lrwxr-xr-x  1 root  wheel  7 Oct 27 21:17 /usr/bin/c++ -> clang++
➜  ~

The followings is gcc output:

➜  ~ gcc --version
Configured with: --prefix=/Applications/Xcode_9.4.1.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
➜  ~ which gcc
/usr/bin/gcc
➜  ~ ls -al /usr/bin/gcc
-rwxr-xr-x  1 root  wheel  18288 Sep 21 12:16 /usr/bin/gcc
@chrisburnor

This comment has been minimized.

Copy link

commented May 30, 2019

I'm getting the same error with the newer versions of clang/osx:

OSX 10.14.5

% c++ --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% ls -la /usr/bin/c++
lrwxr-xr-x  1 root  wheel  7 Jan 12 12:56 /usr/bin/c++ -> clang++
% ls -la /usr/bin/clang++
-rwxr-xr-x  1 root  wheel  18304 May  4 00:04 /usr/bin/clang++

Is it possible that isn't the version of clang that the compiler is actually using internally?

@chrisburnor

This comment has been minimized.

Copy link

commented Jun 1, 2019

I think I found the root of the issue.

In https://github.com/alexcrichton/cc-rs/blob/master/src/lib.rs#L2113, cc, looks at the compiler name to determine the type and falls back to gnu if none match.

For myself and @oncealong , where c++ is symlinked to clang++ it looks like cc doesn't follow the symlink and, so, falls back to gnu.

Prepending CXX=$(which clang++) to the command fixes the issue:

% CXX=$(which clang++) cargo run --bin quad --features metal

Filed alexcrichton/cc-rs#408 in cc to track downstream bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.