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

CXX Variable not set #2246

Closed
parequena opened this issue Nov 16, 2021 · 17 comments · Fixed by #2309
Closed

CXX Variable not set #2246

parequena opened this issue Nov 16, 2021 · 17 comments · Fixed by #2309
Labels
Feature: kits more info needed More info is needed from the community for us to properly triage and investigate.

Comments

@parequena
Copy link

Brief Issue Summary

Visual Studio Code Version: 1.62.2
OS Version: Linux x64 5.13.19-2-MANJARO
Extension Version: 1.9.1 (Latest?)

CXX variable is not set when I try to scan active kits.

Screenshot from 2021-11-15 14-41-33

As you can see, I set my kit to a compiler that is not a defaulted system one (my default gcc/g++ compiler is gcc-11)

Then, if I generate my project, cmake give me this output:

[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/bin/x86_64-pc-linux-gnu-gcc-10.3.0 -H/home/pablo/personal/cppStuff/fileBin -B/home/pablo/personal/cppStuff/fileBin/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 10.3.0
[cmake] -- The CXX compiler identification is GNU 11.1.0

As you can see, the variable CMAKE_C_COMPILER is set, but not the CMAKE_CXX_COMPILER one.

If I try on a Debian OS, both variables are set when I scan for Active kits
thumb-Clipboard - November 15, 2021 1_50 PM

So to solve this "problem" I modified the file ${HOME}/.local/share/CMakeTools/cmake-tools-kits.json and added manually all CXX variables.

For example:
Generated by automated searching kits:

{
    "name": "Clang 12.0.1 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/bin/clang-12"
    }
  }

CXX Variable is not set, so I added a new entry:

{
    "name": "Clang 12",
    "compilers": {
      "C": "/bin/clang",
      "CXX": "/bin/clang++"
    }
  }

This happens with al compilers, and versions.
CXX variable should not be added too automatically?

@bobbrow
Copy link
Member

bobbrow commented Nov 16, 2021

It should, but something must be going wrong in the discovery phase. Could you set the cmake.loggingLevel setting to "debug", rescan for Kits, and then share the log from the Output window?

@bobbrow bobbrow added Feature: kits more info needed More info is needed from the community for us to properly triage and investigate. labels Nov 16, 2021
@parequena
Copy link
Author

[extension] [5677] cmake.selectKit started
[kitsController] Start selection of kits. Found 12 kits.
[kitsController] Opening kit selection QuickPick
[kitsController] Rescanning for kits
[kit] Scanning for Kits on system
[kit] Scanning directory /opt/google-cloud-sdk/bin for compilers
[kit] Scanning directory /usr/local/bin for compilers
[kit] Scanning directory /usr/bin for compilers
[kit] Skipping scan of not existing path /home/pablo/.local/bin
[kit] Found 0 kits in directory /home/pablo/.local/bin
[kit] Scanning directory /bin for compilers
[kit] Scanning directory /usr/local/sbin for compilers
[kit] Scanning directory /usr/lib/jvm/default/bin for compilers
[kit] Scanning directory /usr/bin/site_perl for compilers
[kit] Scanning directory /usr/bin/vendor_perl for compilers
[kit] Scanning directory /usr/bin/core_perl for compilers
[kit] Scanning directory /var/lib/snapd/snap/bin for compilers
[kit] Skipping scan of not existing path undefined\LLVM\bin
[kit] Found 0 kits in directory undefined\LLVM\bin
[kit] Found 0 kits in directory /usr/local/bin
[kit] Found 0 kits in directory /opt/google-cloud-sdk/bin
[kit] Found 0 kits in directory /usr/local/sbin
[kit] Found 0 kits in directory /usr/lib/jvm/default/bin
[kit] Found 0 kits in directory /usr/bin/site_perl
[kit] Found 0 kits in directory /usr/bin/vendor_perl
[kit] Found 0 kits in directory /var/lib/snapd/snap/bin
[kit] Found 0 kits in directory /usr/bin/core_perl
[kit] Testing Clang binary: /usr/bin/clang
[proc] Executing command: /usr/bin/clang -v
[kit] Testing Clang binary: /usr/bin/clang-12
[proc] Executing command: /usr/bin/clang-12 -v
[kit] Testing GCC binary: /usr/bin/gcc
[proc] Executing command: /usr/bin/gcc -v
[kit] Testing GCC binary: /usr/bin/gcc-10
[proc] Executing command: /usr/bin/gcc-10 -v
[kit] Testing GCC binary: /usr/bin/gcc-9
[proc] Executing command: /usr/bin/gcc-9 -v
[kit] Testing GCC binary: /usr/bin/i686-w64-mingw32-gcc
[proc] Executing command: /usr/bin/i686-w64-mingw32-gcc -v
[kit] Testing GCC binary: /usr/bin/i686-w64-mingw32-gcc-11.2.0
[proc] Executing command: /usr/bin/i686-w64-mingw32-gcc-11.2.0 -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc-10
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc-10 -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc-10.3.0
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc-10.3.0 -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc-11.1.0
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc-11.1.0 -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc-9
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc-9 -v
[kit] Testing GCC binary: /usr/bin/x86_64-pc-linux-gnu-gcc-9.4.0
[proc] Executing command: /usr/bin/x86_64-pc-linux-gnu-gcc-9.4.0 -v
[kit] Testing GCC binary: /usr/bin/x86_64-w64-mingw32-gcc
[proc] Executing command: /usr/bin/x86_64-w64-mingw32-gcc -v
[kit] Testing GCC binary: /usr/bin/x86_64-w64-mingw32-gcc-11.2.0
[proc] Executing command: /usr/bin/x86_64-w64-mingw32-gcc-11.2.0 -v
[kit] Testing Clang binary: /bin/clang
[proc] Executing command: /bin/clang -v
[kit] Testing Clang binary: /bin/clang-12
[proc] Executing command: /bin/clang-12 -v
[kit] Testing GCC binary: /bin/gcc
[proc] Executing command: /bin/gcc -v
[kit] Testing GCC binary: /bin/gcc-10
[proc] Executing command: /bin/gcc-10 -v
[kit] Testing GCC binary: /bin/gcc-9
[proc] Executing command: /bin/gcc-9 -v
[kit] Testing GCC binary: /bin/i686-w64-mingw32-gcc
[proc] Executing command: /bin/i686-w64-mingw32-gcc -v
[kit] Testing GCC binary: /bin/i686-w64-mingw32-gcc-11.2.0
[proc] Executing command: /bin/i686-w64-mingw32-gcc-11.2.0 -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc-10
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc-10 -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc-10.3.0
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc-10.3.0 -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc-11.1.0
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc-11.1.0 -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc-9
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc-9 -v
[kit] Testing GCC binary: /bin/x86_64-pc-linux-gnu-gcc-9.4.0
[proc] Executing command: /bin/x86_64-pc-linux-gnu-gcc-9.4.0 -v
[kit] Testing GCC binary: /bin/x86_64-w64-mingw32-gcc
[proc] Executing command: /bin/x86_64-w64-mingw32-gcc -v
[kit] Testing GCC binary: /bin/x86_64-w64-mingw32-gcc-11.2.0
[proc] Executing command: /bin/x86_64-w64-mingw32-gcc-11.2.0 -v
[kit] Detected GCC compiler: /bin/x86_64-w64-mingw32-gcc-11.2.0
[kit] Detected GCC compiler: /bin/x86_64-w64-mingw32-gcc
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc-9.4.0
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc-9
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc-11.1.0
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc-10.3.0
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc-10
[kit] Detected GCC compiler: /bin/x86_64-pc-linux-gnu-gcc
[kit] Detected GCC compiler: /bin/i686-w64-mingw32-gcc-11.2.0
[kit] Detected GCC compiler: /bin/i686-w64-mingw32-gcc
[kit] Detected GCC compiler: /bin/gcc-9
[kit] Detected GCC compiler: /bin/gcc-10
[kit] Detected GCC compiler: /bin/gcc
[kit] Detected Clang compiler: /bin/clang-12
[kit] Detected Clang compiler: /bin/clang-12
[kit] Detected Clang compiler: /bin/clang
[kit] Detected Clang compiler: /bin/clang
[kit] Detected GCC compiler: /usr/bin/x86_64-w64-mingw32-gcc-11.2.0
[kit] Detected GCC compiler: /usr/bin/x86_64-w64-mingw32-gcc
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc-9.4.0
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc-9
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc-11.1.0
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc-10.3.0
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc-10
[kit] Detected GCC compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
[kit] Detected GCC compiler: /usr/bin/i686-w64-mingw32-gcc-11.2.0
[kit] Detected GCC compiler: /usr/bin/i686-w64-mingw32-gcc
[kit] Detected GCC compiler: /usr/bin/gcc-9
[kit] Detected GCC compiler: /usr/bin/gcc-10
[kit] Detected GCC compiler: /usr/bin/gcc
[kit] Detected Clang compiler: /usr/bin/clang-12
[kit] Detected Clang compiler: /usr/bin/clang-12
[kit] Detected Clang compiler: /usr/bin/clang
[kit] Detected Clang compiler: /usr/bin/clang
[kit] Found 15 kits in directory /bin
[kit] Found 15 kits in directory /usr/bin
[kit] Found Kit: Clang 12.0.1 x86_64-pc-linux-gnu
[kit] Found Kit: Clang 12.0.1 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.2.0 i686-w64-mingw32
[kit] Found Kit: GCC 11.2.0 i686-w64-mingw32
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.2.0 x86_64-w64-mingw32
[kit] Found Kit: GCC 11.2.0 x86_64-w64-mingw32
[kit] Found Kit: Clang 12.0.1 x86_64-pc-linux-gnu
[kit] Found Kit: Clang 12.0.1 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.2.0 i686-w64-mingw32
[kit] Found Kit: GCC 11.2.0 i686-w64-mingw32
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 10.3.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.1.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 9.4.0 x86_64-pc-linux-gnu
[kit] Found Kit: GCC 11.2.0 x86_64-w64-mingw32
[kit] Found Kit: GCC 11.2.0 x86_64-w64-mingw32
[kitsController] Saving kits to /home/pablo/.local/share/CMakeTools/cmake-tools-kits.json
[kitsController] Saving new kits to /home/pablo/.local/share/CMakeTools/cmake-tools-kits.json
[kit] Reading kits file /home/pablo/.local/share/CMakeTools/cmake-tools-kits.json
[extension] [5677] cmake.selectKit finished (returned false)
[kit] Successfully loaded 10 kits from /home/pablo/.local/share/CMakeTools/cmake-tools-kits.json

@bobbrow
Copy link
Member

bobbrow commented Nov 18, 2021

Thank you. The way kit scanning identifies the CXX compiler is that it substitutes g++ for gcc and clang++ for clang in whatever compiler executables it finds. Unfortunately, it turns out that the extension doesn't log these attempts (I should fix that) so I can't tell if those files exist on your system or not. Could you confirm that a clang++-12 exists to match your clang-12 and similar for the gcc variants?

@parequena
Copy link
Author

I don't know if this proves that those compilers exists, but I can try:

[pablo@Harazel ~]$ whereis clang
clang: /usr/bin/clang /usr/lib/clang /usr/include/clang /usr/share/clang /usr/share/man/man1/clang.1.gz
[pablo@Harazel ~]$ whereis clang++
clang++: /usr/bin/clang++
[pablo@Harazel ~]$ whereis clang++-12
clang++-12:
[pablo@Harazel ~]$ whereis gcc-9
gcc-9: /usr/bin/gcc-9
[pablo@Harazel ~]$ whereis g++-9
g++-9: /usr/bin/g++-9
[pablo@Harazel ~]$ whereis gcc-10
gcc-10: /usr/bin/gcc-10
[pablo@Harazel ~]$ whereis g++-10
g++-10: /usr/bin/g++-10
[pablo@Harazel ~]$ 

Also I can do this:

[pablo@Harazel ~]$ ls /bin | grep 'gcc\|g++\|clang' 
clang
clang++
clang-12
clang-apply-replacements
clang-change-namespace
clang-check
clang-cl
clang-cpp
clangd
clang-doc
clang-extdef-mapping
clang-format
clang-include-fixer
clang-move
clang-offload-bundler
clang-offload-wrapper
clang-query
clang-refactor
clang-rename
clang-reorder-fields
clang-scan-deps
clang-tidy
g++
g++-10
g++-9
gcc
gcc-10
gcc-9
gcc-ar
gcc-ar-10
gcc-ar-9
gcc-nm
gcc-nm-10
gcc-nm-9
gcc-ranlib
gcc-ranlib-10
gcc-ranlib-9
git-clang-format
i686-w64-mingw32-g++
i686-w64-mingw32-gcc
i686-w64-mingw32-gcc-11.2.0
i686-w64-mingw32-gcc-ar
i686-w64-mingw32-gcc-nm
i686-w64-mingw32-gcc-ranlib
x86_64-pc-linux-gnu-g++
x86_64-pc-linux-gnu-g++-10
x86_64-pc-linux-gnu-g++-9
x86_64-pc-linux-gnu-gcc
x86_64-pc-linux-gnu-gcc-10
x86_64-pc-linux-gnu-gcc-10.3.0
x86_64-pc-linux-gnu-gcc-11.1.0
x86_64-pc-linux-gnu-gcc-9
x86_64-pc-linux-gnu-gcc-9.4.0
x86_64-pc-linux-gnu-gcc-ar
x86_64-pc-linux-gnu-gcc-ar-10
x86_64-pc-linux-gnu-gcc-ar-9
x86_64-pc-linux-gnu-gcc-nm
x86_64-pc-linux-gnu-gcc-nm-10
x86_64-pc-linux-gnu-gcc-nm-9
x86_64-pc-linux-gnu-gcc-ranlib
x86_64-pc-linux-gnu-gcc-ranlib-10
x86_64-pc-linux-gnu-gcc-ranlib-9
x86_64-w64-mingw32-g++
x86_64-w64-mingw32-gcc
x86_64-w64-mingw32-gcc-11.2.0
x86_64-w64-mingw32-gcc-ar
x86_64-w64-mingw32-gcc-nm
x86_64-w64-mingw32-gcc-ranlib

If this info is not usefull for you, I can provide new one :D

@bobbrow
Copy link
Member

bobbrow commented Nov 19, 2021

This explains the missing CXX for clang-12 in the Kit you shared since clang++-12 does not appear in that list.

{
    "name": "Clang 12.0.1 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/bin/clang-12"
    }
  }

For g++, the cmake command line you shared was using -DCMAKE_C_COMPILER:FILEPATH=/bin/x86_64-pc-linux-gnu-gcc-10.3.0 which also does not have a matching g++ entry in your list.

@waterlens
Copy link

waterlens commented Nov 21, 2021

I encountered the same problem. I think it is caused by the clang package of Manjaro (or Arch Linux, but I'm not sure). It only creates clang, clang++, clang-13-like names.

Update: it seems that the latest compiler package on Arch Linux never uses names like g++-{version} or clang++-{version}. The scanning logic might need to be changed.

@parequena
Copy link
Author

This explains the missing CXX for clang-12 in the Kit you shared since clang++-12 does not appear in that list.

{
    "name": "Clang 12.0.1 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/bin/clang-12"
    }
  }

For g++, the cmake command line you shared was using -DCMAKE_C_COMPILER:FILEPATH=/bin/x86_64-pc-linux-gnu-gcc-10.3.0 which also does not have a matching g++ entry in your list.

Yes, but I dind't choose to use that specific gcc, so that compiler was choose too by the search engine.

@bobbrow
Copy link
Member

bobbrow commented Nov 22, 2021

Yes, but I dind't choose to use that specific gcc, so that compiler was choose too by the search engine.

I don't understand. Your screenshot shows it selected in the status bar. We populate the list of choices, but we let you (the developer) pick. If you don't like the one you previously selected, you can click on that text and pick a different one. If you want CMake to pick your compiler automatically instead of us, pick the option called [Unspecified].

image

@parequena
Copy link
Author

If I choose [Unspecified] as all available compilers don't have the CXX variable set, It wont compile with g++...

@bobbrow
Copy link
Member

bobbrow commented Nov 23, 2021

Update: it seems that the latest compiler package on Arch Linux never uses names like g++-{version} or clang++-{version}. The scanning logic might need to be changed.

It sounds like @waterlens comment points out the actual issue then? If you configure outside of VS Code just using the CLI (and you don't set the CMAKE_C[XX]_COMPILER), do you have the same problem? If your distro creates only clang clang++ gcc and g++, isn't there also a Kit created that uses these? Or are those outdated compilers and you want to use clang-13 which compiles for both languages and is the latest version?

@parequena
Copy link
Author

The acutal issue is that when I want to use any g++/gcc compiler that is not my default system one, the active kit just sets the CMAKE_C_COMPILER and not the CMAKE_CXX_COMPILER so if a want to compile with GCC-10, as only the C_COMPILER is set, it's gonna compile with gcc-10 and g++-11 because it's my defaulted compiler.
Screenshot from 2021-11-26 13-32-18

@waterlens
Copy link

Update: it seems that the latest compiler package on Arch Linux never uses names like g++-{version} or clang++-{version}. The scanning logic might need to be changed.

It sounds like @waterlens comment points out the actual issue then? If you configure outside of VS Code just using the CLI (and you don't set the CMAKE_C[XX]_COMPILER), do you have the same problem? If your distro creates only clang clang++ gcc and g++, isn't there also a Kit created that uses these? Or are those outdated compilers and you want to use clang-13 which compiles for both languages and is the latest version?

The latest gcc package on Arch Linux use the following names:

usr/bin/c++
...
usr/bin/cc
usr/bin/cpp
usr/bin/g++
usr/bin/gcc
...
usr/bin/x86_64-pc-linux-gnu-c++
usr/bin/x86_64-pc-linux-gnu-g++
usr/bin/x86_64-pc-linux-gnu-gcc
usr/bin/x86_64-pc-linux-gnu-gcc-11.1.0
...

The latest clang package:

...
usr/bin/clang
usr/bin/clang++
usr/bin/clang-13
...

@bobbrow
I guess, the cmake-tools try to find clang++-13 or x86_64-pc-linux-gnu-g++-11.1.0, because it has found clang-13 or x86_64-pc-linux-gnu-gcc-11.1.0. But that doesn't exist on Arch Linux, Manjaro and etc. Then it will fall back to c++. And that's the link to the latest GNU 11.1.0. It shows the situation in the screenshot by @parequena.

@bobbrow
Copy link
Member

bobbrow commented Nov 29, 2021

So it sounds like our scanning logic isn't going to pair the C/CXX compilers the way you want by default. In this case, you can create your own Kits file and configure it the way you want.

Documentation: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/kits.md#project-kits

@waterlens
Copy link

So it sounds like our scanning logic isn't going to pair the C/CXX compilers the way you want by default. In this case, you can create your own Kits file and configure it the way you want.

Documentation: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/kits.md#project-kits

It sounds not good. Arch Linux frequently updates the compiler and I have to modify the configure each time :(

@parequena
Copy link
Author

So it sounds like our scanning logic isn't going to pair the C/CXX compilers the way you want by default. In this case, you can create your own Kits file and configure it the way you want.

Documentation: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/kits.md#project-kits

But it does on other Linux distros?
https://user-images.githubusercontent.com/22152384/141971565-d4e2c41a-f0b2-4195-a424-62267e5c22a2.png
As you can see on my Debian OS screenshot, right?

@bobbrow
Copy link
Member

bobbrow commented Dec 2, 2021

Yes, it does because you have both the C and CXX named compilers on Debian. I see two options for Arch:

  1. create your own Kits
  2. create symlinks to the CXX compiler you want to match the C by using a matching CXX compiler name. (e.g. /usr/bin/clang++-13)

@fourdim
Copy link
Contributor

fourdim commented Dec 31, 2021

I mean, you can't simply replace gcc with g++ or clang with clang++ here.

const gxx_fname = fname.replace(/gcc/, 'g++');

const clangxx_fname = fname.replace(/^clang/, 'clang++');

As it detects
for me:

[
  {
    "name": "Clang 13.0.0 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/usr/bin/clang-13"
    }
  },
  {
    "name": "GCC 11.1.0 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/usr/bin/x86_64-pc-linux-gnu-gcc-11.1.0"
    }
  }
]

The code simply detects /usr/bin/clang++-13, it will results in nothing as it detects the clang-13 but not clang first.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature: kits more info needed More info is needed from the community for us to properly triage and investigate.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants