Skip to content
This repository was archived by the owner on Jun 27, 2022. It is now read-only.
This repository was archived by the owner on Jun 27, 2022. It is now read-only.

BuildNativeImage fails on /usr/bin/cc, error=17, File exists #33

@artemptushkin

Description

@artemptushkin

I'd like to request help with analysis. It might be the reason in my setup or on Graalvm but I can't investigate by my one.
I'd appreciate any clues.

  • MacOS Cataline v. 10.15.6 (19G2021)
  • graalvm 20.3.0
  • com.github.ayltai.spring-graalvm-native-plugin:1.4.0
  • org.springframework.experimental:spring-graalvm-native:0.8.2

plugin setup:

nativeImage {
	mainClassName = 'io.github.artemptushkin.spintbootnative.SpintBootNativeHello'

	reportExceptionStackTraces = true
	removeUnusedAutoConfig     = true
	removeYamlSupport          = true
	maxHeapSize                = '4G'
	javaVersion 		    = '8'
	disableToolchainChecking   = true
}

Steps:

./gradlew buildNativeImage

Result:

Error: Unable to compile C-ABI query code /var/folders/_s/7c1s7rts7xsbv1_r8pcdd6wm0000gn/T/SVM-8178873000820406083/LibFFIHeaderDirectives.c. Make sure native software development toolchain is installed on your system.
com.oracle.svm.core.util.UserError$UserException: Unable to compile C-ABI query code /var/folders/_s/7c1s7rts7xsbv1_r8pcdd6wm0000gn/T/SVM-8178873000820406083/LibFFIHeaderDirectives.c. Make sure native software development toolchain is installed on your system.
	at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
	at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.compileAndParseError(CCompilerInvoker.java:452)
Error: Unable to compile C-ABI query code /var/folders/_s/7c1s7rts7xsbv1_r8pcdd6wm0000gn/T/SVM-8178873000820406083/LibFFIHeaderDirectives.c. Make sure native software development toolchain is installed on your system.

	at com.oracle.svm.hosted.c.CAnnotationProcessor.compileQueryCode(CAnnotationProcessor.java:164)
	at com.oracle.svm.hosted.c.CAnnotationProcessor.process(CAnnotationProcessor.java:112)
	at com.oracle.svm.hosted.c.NativeLibraries.finish(NativeLibraries.java:540)
	at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1574)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1056)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:874)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:556)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:471)
	at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
Caused by: java.io.IOException: Cannot run program "/usr/bin/cc" (in directory "/var/folders/_s/7c1s7rts7xsbv1_r8pcdd6wm0000gn/T/SVM-8178873000820406083"): error=17, File exists
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.compileAndParseError(CCompilerInvoker.java:426)
Caused by: java.io.IOException: Cannot run program "/usr/bin/cc" (in directory "/var/folders/_s/7c1s7rts7xsbv1_r8pcdd6wm0000gn/T/SVM-8178873000820406083"): error=17, File exists

	... 13 more
Caused by: java.io.IOException: error=17, File exists
Caused by: java.io.IOException: error=17, File exists

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions