Build errors with Cinder Vulkan using MoltenVK


This topic contains 3 replies, has 2 voices, and was last updated by  Bill Hollings 4 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1307

    marie
    Participant

    I cloned the brenwill Cinder repo:

    git clone --recursive https://github.com/brenwill/Cinder.git

    and built Cinder:

        cd xcode
        ./fullbuild.sh

    During installation, I got this error:

    
        ld: file not found: /Users/mtomasello/Cinder/xcode/build/cinder.build/Debug/cinder_vulkan.build/Objects-normal/x86_64/CodeGen.o
        Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld failed with exit code 1

    After this error, I get the messages that a series of build commands failed, all in this vein:

        The following build commands failed:
        	CompileC build/cinder.build/Debug/cinder_vulkan.build/Objects-normal/x86_64/CodeGen.o /Khronos/SPIRV/glslang/glslang-bw/glslang/GenericCodeGen/CodeGen.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
        	CompileC build/cinder.build/Debug/cinder_vulkan.build/Objects-normal/x86_64/Initialize.o /Khronos/SPIRV/glslang/glslang-bw/glslang/MachineIndependent/Initialize.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
        	CompileC build/cinder.build/Debug/cinder_vulkan.build/Objects-normal/x86_64/intermOut.o /Khronos/SPIRV/glslang/glslang-bw/glslang/MachineIndependent/intermOut.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
        ....

    When I try to run the only xcode sample, FishTornado, I get the error:

    No such file or directory: '../../../../lib/libcinder.a'

    when running on release configuration and a similar message for '../../../../lib/libcinder_d.a' when trying to run in degub configuration because of course I don’t have these files.

    I then tried running

    xcodebuild -project cinder.xcodeproj -target cinder -configuration Debug

    and got the error

        ld: file not found: /Users/mtomasello/Cinder/xcode/build/cinder.build/Debug/cinder.build/Objects-normal/x86_64/Surface-BBAED1CD7DF1B45C.o
        Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld failed with exit code 1
        Libtool /Users/mtomasello/Cinder/lib/libcinder_d.a normal x86_64
        cd /Users/mtomasello/Cinder/xcode
        export MACOSX_DEPLOYMENT_TARGET=10.8
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/mtomasello/Cinder/lib -filelist /Users/mtomasello/Cinder/xcode/build/cinder.build/Debug/cinder.build/Objects-normal/x86_64/cinder_d.LinkFileList -framework AppKit -framework Cocoa -framework OpenGL -framework QTKit -framework CoreVideo -framework CoreGraphics -framework ApplicationServices -framework ScreenSaver -framework AudioToolbox -framework AudioUnit -framework CoreAudio -o /Users/mtomasello/Cinder/lib/libcinder_d.a
        error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Users/mtomasello/Cinder/xcode/build/cinder.build/Debug/cinder.build/Objects-normal/libcinder_d.a-x86_64-master.o (No such file or directory)
        BUILD FAILED
        The following build commands failed:
        	CompileC build/cinder.build/Debug/cinder.build/Objects-normal/x86_64/Surface-BBAED1CD7DF1B45C.o /Users/mtomasello/Cinder/src/cinder/vk/Surface.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
        	MasterObjectLink build/cinder.build/Debug/cinder.build/Objects-normal/libcinder_d.a-x86_64-master.o
        	Libtool /Users/mtomasello/Cinder/lib/libcinder_d.a normal x86_64

    What am I missing?

    #1310

    Bill Hollings
    Keymaster

    @marie

    Sorry for the delay in responding.

    Thanks for letting us know about this.

    There was a configuration error in the submodule configuration for the brenwill/Cinder repository…which has been fixed now.

    Please follow the instructions again…including the recursive clone of the brenwill/Cinder repository. It should work now.

    Thanks…

    …Bill

    #1314

    marie
    Participant

    Done! Thanks. Now I get the error

    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_MTLFunctionConstantValues", referenced from:
          objc-class-ref in MoltenVK(MoltenVK-x86_64-master.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    #1315

    Bill Hollings
    Keymaster

    @marie

    Hmmm…are you building on Sierra or El Capitan?

    MTLFunctionConstantValues was introduced in macOS 10.12 (Sierra).

    MoltenVK will run on macOS 10.11…but it is built…and expects to be linked…in macOS 10.12.

    …Bill

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.