You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I was attempting to build the samples on my 2019 MacBook Pro Core i9 with a Radeon Pro 5500 4GB and there are sprintf() deprecation warnings treated as errors. I'm using Vulkan 1.3.236 and the following version of Clang:
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
but I am wondering if it was tested or has missing instructions for building on Mac. I can work through disabling -Werror or -Wdeprecated-declarations in the cmake scripts but this feels like I'm missing something? Here is my output when attempting to build:
[ 1%] Building CXX object third_party/glslang/glslang/OSDependent/Unix/CMakeFiles/OSDependent.dir/ossource.cpp.o
[ 1%] Building CXX object third_party/glslang/OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.o
[ 1%] Building C object third_party/CMakeFiles/volk.dir/volk/volk.c.o
[ 2%] Building CXX object third_party/CMakeFiles/imgui.dir/imgui/imgui.cpp.o
[ 2%] Building CXX object third_party/CMakeFiles/imgui.dir/imgui/imgui_demo.cpp.o
[ 2%] Building CXX object third_party/CMakeFiles/imgui.dir/imgui/imgui_draw.cpp.o
[ 2%] Building CXX object third_party/CMakeFiles/imgui.dir/imgui/imgui_widgets.cpp.o
[ 3%] Building C object samples/extensions/open_gl_interop/CMakeFiles/glad.dir/third_party/glad/src/glad.c.o
[ 3%] Building CXX object third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cross.cpp.o
[ 3%] Building CXX object third_party/glslang/glslang/CMakeFiles/GenericCodeGen.dir/GenericCodeGen/Link.cpp.o
[ 3%] Building CXX object third_party/hwcpipe/CMakeFiles/hwcpipe.dir/hwcpipe.cpp.o
[ 4%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/context.c.o
[ 4%] Building CXX object third_party/glslang/glslang/CMakeFiles/GenericCodeGen.dir/GenericCodeGen/CodeGen.cpp.o
[ 4%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_image_load_store.cpp.o
[ 4%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/checkheader.c.o
[ 5%] Building CXX object third_party/CMakeFiles/glslang-default-resource-limits.dir/glslang/StandAlone/ResourceLimits.cpp.o
[ 5%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/createdfd.c.o
[ 5%] Linking CXX static library lib/Release/x86_64/libOSDependent.a
[ 5%] Built target OSDependent
[ 5%] Building CXX object third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_parser.cpp.o
[ 5%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/colourspaces.c.o
[ 6%] Linking C static library lib/Release/x86_64/libvolk.a
[ 7%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/interpretdfd.c.o
[ 7%] Built target volk
[ 8%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/init.c.o
[ 8%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/printdfd.c.o
[ 8%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/queries.c.o
[ 8%] Linking CXX static library lib/Release/x86_64/libOGLCompiler.a
[ 8%] Built target OGLCompiler
[ 8%] Linking C static library lib/Release/x86_64/libglad.a
[ 8%] Building CXX object third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cross_parsed_ir.cpp.o
[ 8%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/dfdutils/vk2dfd.c.o
[ 8%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_pick_best_endpoint_format.cpp.o
[ 8%] Linking CXX static library lib/Release/x86_64/libGenericCodeGen.a
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross.hpp:21:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:271:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross.hpp:21:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:283:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
[ 8%] Built target glad
[ 8%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/input.c.o
[ 8%] Built target GenericCodeGen
/Users/butchdean/Documents/Vulkan-Samples/third_party/astc/Source/astc_image_load_store.cpp:1262:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(htga_load_filename, "%s.htga", input_filename);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
/Users/butchdean/Documents/Vulkan-Samples/third_party/astc/Source/astc_image_load_store.cpp:1263:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(exr_to_htga_command, "exr_to_htga -q %s %s", input_filename, htga_load_filename);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
/Users/butchdean/Documents/Vulkan-Samples/third_party/astc/Source/astc_image_load_store.cpp:1395:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(htga_output_filename, "%s.htga", output_filename);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
/Users/butchdean/Documents/Vulkan-Samples/third_party/astc/Source/astc_image_load_store.cpp:1397:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(htga_output_command, "exr_to_htga -e %s %s", htga_output_filename, output_filename);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
[ 8%] Building CXX object third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cfg.cpp.o
[ 9%] Building CXX object third_party/CMakeFiles/ktx.dir/ktx/lib/etcdec.cxx.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_parser.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_parser.hpp:20:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:271:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_parser.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_parser.hpp:20:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:283:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
[ 9%] Linking CXX static library lib/Release/x86_64/libglslang-default-resource-limits.a
[ 9%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_color_quantize.cpp.o
4 warnings generated.
[ 9%] Built target glslang-default-resource-limits
[ 9%] Building CXX object third_party/CMakeFiles/ktx.dir/ktx/lib/etcunpack.cxx.o
[ 9%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/monitor.c.o
[ 9%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/filestream.c.o
[ 9%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/cmake_pch.hxx.pch
2 errors generated.
make[3]: *** [third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_parser.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 10%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_weight_align.cpp.o
[ 10%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/vulkan.c.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:271:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cross_parsed_ir.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:283:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
[ 10%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_integer_sequence.cpp.o
[ 10%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/hashlist.c.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:271:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.cpp:17:
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_cfg.hpp:20:
/Users/butchdean/Documents/Vulkan-Samples/third_party/spirv-cross/spirv_common.hpp:283:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
2 errors generated.
make[3]: *** [third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cross.cpp.o] Error 1
[ 11%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/window.c.o
2 errors generated.
make[3]: *** [third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cross_parsed_ir.cpp.o] Error 1
[ 11%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_ideal_endpoints_and_weights.cpp.o
[ 12%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/info.c.o
[ 12%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_find_best_partitioning.cpp.o
[ 12%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/cocoa_init.m.o
2 errors generated.
make[3]: *** [third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/spirv_cfg.cpp.o] Error 1
make[2]: *** [third_party/spirv-cross/CMakeFiles/spirv-cross-core.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/memstream.c.o
[ 12%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_compress_symbolic.cpp.o
[ 12%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/strings.c.o
[ 13%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_decompress_symbolic.cpp.o
[ 13%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/cocoa_joystick.m.o
[ 13%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/swap.c.o
[ 14%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/texture.c.o
[ 14%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/cocoa_monitor.m.o
[ 14%] Building CXX object third_party/CMakeFiles/ktx.dir/ktx/lib/basis_transcode.cpp.o
[ 14%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/cocoa_window.m.o
[ 14%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_symbolic_physical.cpp.o
[ 14%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_toplevel.cpp.o
[ 14%] Building CXX object third_party/CMakeFiles/ktx.dir/ktx/lib/basisu/transcoder/basisu_transcoder.cpp.o
[ 15%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/cocoa_time.c.o
[ 15%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/glslang_tab.cpp.o
[ 15%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/basisu/zstd/zstd.c.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/basisu/transcoder/basisu_transcoder.cpp:18:
/Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/basisu/transcoder/basisu_containers_impl.h:52:13: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(buf, "vector: realloc() failed allocating %u bytes", (uint32_t)desired_size);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/basisu/transcoder/basisu_transcoder.cpp:18:
/Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/basisu/transcoder/basisu_containers_impl.h:79:13: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(buf, "vector: malloc() failed allocating %u bytes", (uint32_t)desired_size);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(msg)))
^
[ 15%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/posix_thread.c.o
[ 15%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/attribute.cpp.o
[ 15%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_stb_tga.cpp.o
[ 16%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/Constant.cpp.o
/Users/butchdean/Documents/Vulkan-Samples/third_party/astc/Source/astc_toplevel.cpp:2289:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(strrchr(new_input_filename, '.'), "%d%s", image_index, strrchr(input_filename, '.'));
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
[ 16%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/texture1.c.o
[ 16%] Linking CXX static library lib/Release/x86_64/libimgui.a
/Users/butchdean/Documents/Vulkan-Samples/third_party/glfw/src/cocoa_window.m:365:62: warning: 'kUTTypeURL' is deprecated: first deprecated in macOS 12.0 - Use UTTypeURL instead. [-Wdeprecated-declarations]
[self registerForDraggedTypes:@[(__bridge NSString*) kUTTypeURL]];
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/UTCoreTypes.h:210:26: note: 'kUTTypeURL' has been explicitly marked deprecated here
extern const CFStringRef kUTTypeURL API_DEPRECATED("Use UTTypeURL instead.", ios(3.0, 15.0), macos(10.4, 12.0), tvos(9.0, 15.0), watchos(1.0, 8.0));
^
/Users/butchdean/Documents/Vulkan-Samples/third_party/glfw/src/cocoa_monitor.m:61:38: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
if (IOServiceGetMatchingServices(kIOMasterPortDefault,
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
^
/Users/butchdean/Documents/Vulkan-Samples/third_party/glfw/src/cocoa_monitor.m:234:38: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
if (IOServiceGetMatchingServices(kIOMasterPortDefault,
^~~~~~~~~~~~~~~~~~~~
kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
^
[ 16%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/nsgl_context.m.o
[ 16%] Built target imgui
[ 17%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/texture2.c.o
[ 18%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/iomapper.cpp.o
[ 18%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/softfloat.cpp.o
2 warnings generated.
[ 18%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/vkformat_check.c.o
1 warning generated.
[ 18%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/InfoSink.cpp.o
[ 18%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/egl_context.c.o
[ 18%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/mathlib.cpp.o
[ 19%] Building C object third_party/glfw/src/CMakeFiles/glfw.dir/osmesa_context.c.o
1 warning generated.
[ 19%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/Initialize.cpp.o
[ 19%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_quantization.cpp.o
[ 20%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/IntermTraverse.cpp.o
[ 20%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/vkformat_str.c.o
[ 20%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/Intermediate.cpp.o
[ 20%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/vk_funcs.c.o
[ 20%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_block_sizes2.cpp.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/vk_funcs.c:46:
/Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/vk_funcs.h:29:9: warning: 'VK_NO_PROTOTYPES' macro redefined [-Wmacro-redefined]
#define VK_NO_PROTOTYPES
^
:6:9: note: previous definition is here
#define VK_NO_PROTOTYPES 1
^
[ 20%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/ParseContextBase.cpp.o
[ 21%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_percentile_tables.cpp.o
1 warning generated.
[ 21%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/ParseHelper.cpp.o
[ 21%] Linking CXX static library lib/Release/x86_64/libhwcpipe.a
[ 22%] Building C object third_party/CMakeFiles/ktx.dir/ktx/lib/vkloader.c.o
[ 22%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_averages_and_directions.cpp.o
In file included from /Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/vkloader.c:29:
/Users/butchdean/Documents/Vulkan-Samples/third_party/ktx/lib/vk_funcs.h:29:9: warning: 'VK_NO_PROTOTYPES' macro redefined [-Wmacro-redefined]
#define VK_NO_PROTOTYPES
^
:6:9: note: previous definition is here
#define VK_NO_PROTOTYPES 1
^
[ 22%] Built target hwcpipe
[ 22%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/PoolAlloc.cpp.o
[ 23%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/RemoveTree.cpp.o
1 warning generated.
[ 23%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_partition_tables.cpp.o
[ 23%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_color_unquantize.cpp.o
[ 23%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/Scan.cpp.o
[ 24%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_encoding_choice_error.cpp.o
[ 24%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_kmeans_partitioning.cpp.o
[ 24%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_weight_quant_xfer_tables.cpp.o
[ 24%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/ShaderLang.cpp.o
[ 24%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/SpirvIntrinsics.cpp.o
[ 24%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_compute_variance.cpp.o
[ 25%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/SymbolTable.cpp.o
[ 25%] Building CXX object third_party/CMakeFiles/astc.dir/astc/Source/astc_ktx_dds.cpp.o
[ 25%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/Versions.cpp.o
[ 25%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/intermOut.cpp.o
[ 25%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/limits.cpp.o
[ 25%] Linking C static library lib/Release/x86_64/libglfw3.a
[ 25%] Built target glfw
[ 26%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/linkValidate.cpp.o
[ 26%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/parseConst.cpp.o
[ 26%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/reflection.cpp.o
[ 26%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/preprocessor/Pp.cpp.o
[ 27%] Linking CXX static library lib/Release/x86_64/libastc.a
[ 28%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/preprocessor/PpAtom.cpp.o
[ 28%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/preprocessor/PpContext.cpp.o
[ 28%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/preprocessor/PpScanner.cpp.o
[ 28%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/preprocessor/PpTokens.cpp.o
[ 28%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/propagateNoContraction.cpp.o
[ 28%] Built target astc
[ 29%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslAttributes.cpp.o
[ 29%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslParseHelper.cpp.o
[ 29%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslScanContext.cpp.o
[ 29%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslOpMap.cpp.o
[ 30%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslTokenStream.cpp.o
[ 30%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslGrammar.cpp.o
[ 30%] Building CXX object third_party/glslang/glslang/CMakeFiles/MachineIndependent.dir/HLSL/hlslParseables.cpp.o
2 warnings generated.
[ 30%] Linking CXX static library lib/Release/x86_64/libMachineIndependent.a
[ 30%] Built target MachineIndependent
[ 30%] Linking CXX static library lib/Release/x86_64/libktx.a
[ 30%] Built target ktx
make[1]: *** [app/CMakeFiles/vulkan_samples.dir/rule] Error 2
make: *** [vulkan_samples] Error 2
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So I was attempting to build the samples on my 2019 MacBook Pro Core i9 with a Radeon Pro 5500 4GB and there are sprintf() deprecation warnings treated as errors. I'm using Vulkan 1.3.236 and the following version of Clang:
but I am wondering if it was tested or has missing instructions for building on Mac. I can work through disabling -Werror or -Wdeprecated-declarations in the cmake scripts but this feels like I'm missing something? Here is my output when attempting to build:
Thanks for any input.
Beta Was this translation helpful? Give feedback.
All reactions