KhronosGroup / glTF-IBL-Sampler

Sampler to create the glTF sample environments
Apache License 2.0
130 stars 18 forks source link

glTF IBL Sampler can not be used on MacOS X #12

Open UX3D-nopper opened 4 years ago

UX3D-nopper commented 4 years ago

I made a minor fix. Please use latest Vulkan SDK and the master branch.

see https://github.com/KhronosGroup/glTF-Sample-Viewer/issues/257

perludum commented 3 years ago

Trying to build on macOS with latest Vulkan SDK, zstd and KTX-Software installed, but still getting this error:

[ 35%] Building C object CMakeFiles/ktx_read.dir/lib/vk_funcs.c.o [ 36%] Building C object CMakeFiles/ktx_read.dir/lib/vkloader.c.o [ 37%] Linking CXX shared library libktx_read.dylib ld: warning: ignoring file /Users/robert/temp/glTF-IBL-Sampler/thirdparty/KTX-Software/other_lib/mac/Release/libzstd.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) Undefined symbols for architecture x86_64: "_ZSTD_createDCtx", referenced from: _ktxTexture2_IterateLoadLevelFaces in texture2.c.o _ktxTexture2_inflateZstdInt in texture2.c.o "_ZSTD_decompressDCtx", referenced from: _ktxTexture2_IterateLoadLevelFaces in texture2.c.o _ktxTexture2_inflateZstdInt in texture2.c.o "_ZSTD_freeDCtx", referenced from: _ktxTexture2_IterateLoadLevelFaces in texture2.c.o _ktxTexture2_inflateZstdInt in texture2.c.o "_ZSTD_getErrorCode", referenced from: _ktxTexture2_IterateLoadLevelFaces in texture2.c.o _ktxTexture2_inflateZstdInt in texture2.c.o "_ZSTD_isError", referenced from: _ktxTexture2_IterateLoadLevelFaces in texture2.c.o _ktxTexture2_inflateZstdInt in texture2.c.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[5]: [libktx_read.4.0.0.dylib] Error 1 make[4]: [CMakeFiles/ktx_read.dir/all] Error 2 make[3]: [all] Error 2 make[2]: [Ktx/src/Ktx-stamp/Ktx-build] Error 2 make[1]: [CMakeFiles/Ktx.dir/all] Error 2 make: [all] Error 2

Any ideas?

perludum commented 3 years ago

Finally found a way to build it on macOS. Had to replace the libzstd.a from KTX-Software (in glTF-IBL-Sampler/thirdparty/KTX-Software/other_lib/mac/Release/) with one from zstd installed with homebrew.