-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Possible bug in CCCompilerInvoke causes "Unable to detect supported LINUX native software development toolchain" #3168
Comments
@cloudpaul you are not using a real
Note that if you build with |
Note that when I force native-image to use a real
|
Ah, thank you! |
Describe the issue
Attempting to build https://github.com/graalvm/graalvm-demos/tree/master/native-image-workshop results in error "Unable to detect supported LINUX native software development toolchain."
Steps to reproduce the issue
Please include both build steps as well as run steps
Investigation
Adding --debug-attach to the <buildArgs> Maven element allows me to attach a debugger, and stepping into com.oracle.svm.hosted.c.codegen.CCCompilerInvoke reveals the following:
at line 367 we join the output from, in my case, gcc -v
result = createCompilerInfo(compilerPath, new Scanner(String.join(System.lineSeparator(), lines)));
this should result in "clang version " matching at line 224:
if (scanner.findInLine("clang version ") != null) {
however it does not match and the method returns null resulting in the thrown exception.
This appears to be because String.join(System.lineSeparator(), lines) breaks the pattern matching.
This can be demonstated by changing the value passed to StringReader in the constructor of Scanner so that it does not contain line separators i.e. it is a single line. If we do this then the pattern matching works.
Describe GraalVM and your environment:
Kernel : Linux 4.19.0-6-amd64 (x86_64)
Version : Feature/instrumentation api #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11)
C Library : GNU C Library / (Debian GLIBC 2.28-10) 2.28
Distribution : Debian GNU/Linux 10 (buster)
More details
Consider adding the
--native-image-info
and--verbose
flags when building your native image and paste output below.Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
Raw output from gcc -v
The text was updated successfully, but these errors were encountered: