vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Error message with Xcode 14.3: `[proc] The command: clang -v exited with code: 1`
Type: Bug
I recieve the following error message when configuring a project on macOS with Xcode 14.3.
[main] Configuring project: Test [driver] Removing /Users/h/Projects/GitHub/Test/build/CMakeCache.txt [driver] Removing /Users/h/Projects/GitHub/Test/build/CMakeFiles [proc] Executing command: /opt/homebrew/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -S/Users/h/Projects/GitHub/Test -B/Users/h/Projects/GitHub/Test/build -G Ninja [cmake] Not searching for unused variables given on the command line. [cmake] -- The C compiler identification is AppleClang 14.0.3.14030022 [cmake] -- The CXX compiler identification is AppleClang 14.0.3.14030022 [cmake] -- Detecting C compiler ABI info [cmake] -- Detecting C compiler ABI info - done [cmake] -- Check for working C compiler: /usr/bin/clang - skipped [cmake] -- Detecting C compile features [cmake] -- Detecting C compile features - done [cmake] -- Detecting CXX compiler ABI info [cmake] -- Detecting CXX compiler ABI info - done [cmake] -- Check for working CXX compiler: /usr/bin/clang++ - skipped [cmake] -- Detecting CXX compile features [cmake] -- Detecting CXX compile features - done [cmake] -- Configuring done (0.3s) [cmake] -- Generating done (0.0s) [cmake] -- Build files have been written to: /Users/h/Projects/GitHub/Test/build [proc] The command: clang -v exited with code: 1 [proc] The command: clang++ -v exited with code: 1
Extension version: 1.13.45 VS Code version: Code 1.77.0 (Universal) (7f329fe6c66b0f86ae1574c2911b681ad5a45d63, 2023-03-29T09:57:11.797Z) OS version: Darwin arm64 22.4.0 Modes: Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (8 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.95GB free) |
| Process Argv | --crash-reporter-id a7eaff19-94ae-4653-b917-d9aaab19da5d |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
nodejswelcome1cf:30587006
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30672706
vsccsb:30677849
pythonb192:30669360
defaultazurewalk:30687958
pythonms35:30701012
Thanks for the report! I think this might be related to #3039. Can you try running clang -v and clang --version on the command line outside of VS Code and let me know what the output is?
This is the output:
% clang -v Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% clang --version Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% clang++ -v Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I believe the error started occurring after Xcode 14.3 but I cannot confirm that. It's a very basic cmake test project. I have more complicated projects that do not exhibit this behaviour. Maybe they just set the correct compiler via CMakePresets.
% clang -v Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin % echo $? 0
Thanks. Given that a version number is reported for both the -v and --version flags, this is no longer related to #3039. We'll try to reproduce the issue and get back to you if we have any additional questions.
This issue has been closed automatically because it needs more information and has not had recent activity.