-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
[Proposal] Support $CXX environment variable #104989
Comments
Hi @bodqhrohro,
I also have tried to run the build command similar to yours, but it ran normally. Sample buildhuynq@Huy-Ubuntu:~/Documents/Working/projects/reproduce_sample$ CXX=/usr/bin/clang++-10 flutter build linux
💪 Building with sound null safety 💪
Building Linux application...
huynq@Huy-Ubuntu:~/Documents/Working/projects/reproduce_sample$
The goal of this GitHub repo is not to give assistance on personal code/external project. Please share a completed and minimal reproducible code sample that we can directly copy paste and run to verify this issue. |
I have already described in OP why this is more of a quirk than a solution. The compiler may be installed at an arbitrary location, and Flutter should not assume that it always should be available at
Do you have a
It applies to the official Gallery example as well: Logs
|
Hi @bodqhrohro,
huynq@Huy-Ubuntu:~$ ls /usr/bin | grep clang
clang
clang++
clang++-10
clang-10
clang++-11
clang-11
clang-cpp-10
clang-cpp-11
|
That's the reason: you have a |
Yes, it is:
|
This commit enables flutter uses to specify CC and CXX environment variables during the build process for Linux. Also, it warns the user if the provided C or C++ compilers are not the system's clang and clang++ compilers. If these variables are not declared, the program uses the system default compilers. Closes flutter#104989
This is mostly a duplicate of #61418. The issue author was suggested to install a metapackage, and was happy this far, but this does not really solve the original question. Of course it's possible to install the metapackage or just temporarily make
/usr/bin/clang++
a symlink to the desired location, but the environment variable should be respected too.It works well for pure CMake projects in general, so seems like the configuration generated by Flutter intervenes into this somehow.
Steps to Reproduce
/usr/bin/clang++
.Logs
Logs
The text was updated successfully, but these errors were encountered: