org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null

I am getting the following error:

PS X:\workspace\native-ni> .\gradlew build
> Task :RootProject:linkDemoExecutable FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':linkDemoExecutable'.
> Error while evaluating property 'compilerVersion' of task ':linkDemoExecutable'.
   > Cannot invoke "org.gradle.nativeplatform.toolchain.internal.gcc.metadata.GccMetadata.getVendor()" because the return value of "org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null

From my build.gradle

model {
    toolChains {
        gcc(Gcc) {
            target("main") {
                path 'C:/CRIOCompiler23Q4/oecore-x86_64-core2-64-toolchain/sysroots/x86_64-w64-mingw32/usr/bin/x86_64-nilrt-linux'
                
                cCompiler.executable 'x86_64-nilrt-linux-gcc.exe'
                cppCompiler.executable 'x86_64-nilrt-linux-g++.exe'
                assembler.executable 'x86_64-nilrt-linux-as.exe'
                linker.executable 'x86_64-nilrt-linux-ld.exe'
                staticLibArchiver.executable 'x86_64-nilrt-linux-ar.exe'

                cppCompiler.withArguments { args -> {
                        args.remove(args.indexOf('-nostdinc'))
                        args << "--sysroot=C:/CRIOCompiler23Q4/oecore-x86_64-core2-64-toolchain/sysroots/core2-64-nilrt-linux"
                        args << "-DLINUX"
                        args << "-DPRIVATE"
                        args << "-Daps1Main"
                        args << "-pthread"
                        args << "-g"
                        args << "-std=gnu++17"
						args << "-I${project.rootDir}\\DemoLib\\src\\main\\public"
                    }
                }
            }
        }
    }
    platforms {
        main {
            architecture "x86_64"
        }
    }
    components {
        main(NativeExecutableSpec) {
            targetPlatform "main"
            sources {
                cpp {
                    source {
                        srcDir "src/main/cpp"                    
                        include "**/*.cpp"
                    }
                    exportedHeaders {
                        srcDir "src/main/headers"
                    }
                }
            }
        }
    }
}

It dose compile the obj file without issue. It only happens with linking and when I use ‘NativeExecutableSpec’. If I use ‘NativeLibraireSpec’ it behaves without issue.

Anyone have an idea on how to fix this? Can I set that component somehow? Have I left something out from the native build section that the cpp plugin needs?

This has brought my project to a screaming halt.

I went in and did a rewrite of all the build.gradle files to use only the new cpp-application plugin and I am getting the same error:

* What went wrong:
Execution failed for task ':demo_app:linkDebug'.
> Error while evaluating property 'compilerVersion' of task ':demo_app:linkDebug'.
   > Cannot invoke "org.gradle.nativeplatform.toolchain.internal.gcc.metadata.GccMetadata.getVendor()" because the return value of "org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null

build.gradle

plugins {
	id 'cpp-application'
}

application {
    targetMachines = [
        machines.windows.x86_64,
    ]

    model {
        toolChains {
            gcc(Gcc) {
                path 'C:/CRIOCompiler23Q4/oecore-x86_64-core2-64-toolchain/sysroots/x86_64-w64-mingw32/usr/bin/x86_64-nilrt-linux'
                eachPlatform {
                    cCompiler.executable 'x86_64-nilrt-linux-gcc.exe'
                    cppCompiler.executable 'x86_64-nilrt-linux-g++.exe'
                    assembler.executable 'x86_64-nilrt-linux-as.exe'
                    linker.executable 'x86_64-nilrt-linux-ld.exe'
                    staticLibArchiver.executable 'x86_64-nilrt-linux-ar.exe'

                    cppCompiler.withArguments {
                        args -> {
                            args.remove(args.indexOf('-nostdinc'))
                        }
                    }                    
                }
            }
        }
    }

    tasks.withType(CppCompile).configureEach {
        compilerArgs.addAll([
            "--sysroot=C:/CRIOCompiler23Q4/oecore-x86_64-core2-64-toolchain/sysroots/core2-64-nilrt-linux",
            "-DLINUX",
            "-DPRIVATE",
            "-Daps1Main",
            "-pthread",
            "-std=gnu++17"
        ])
    }

    dependencies {
		implementation project(':...SocketLib')
		implementation project(':...')
        implementation project(':...')
	}
}

Here is some output from the --debug flag.

2024-07-26T09:52:20.620-0600 [DEBUG] [org.gradle.execution.plan.DefaultFinalizedExecutionPlan] Node :........:........:compileEmbeddedStaticLibraryEmbeddedCpp finished executing
2024-07-26T09:52:20.623-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds: released lock on state of build :
2024-07-26T09:52:20.625-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds: released lock on task execution for build :
2024-07-26T09:52:20.627-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: acquired lock on worker lease
2024-07-26T09:52:20.629-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: released lock on worker lease
2024-07-26T09:52:20.633-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: acquired lock on worker lease
2024-07-26T09:52:20.635-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: released lock on worker lease
2024-07-26T09:52:20.638-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: acquired lock on worker lease
2024-07-26T09:52:20.641-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: released lock on worker lease
2024-07-26T09:52:20.643-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: acquired lock on worker lease
2024-07-26T09:52:20.646-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: released lock on worker lease
2024-07-26T09:52:20.648-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: acquired lock on worker lease
2024-07-26T09:52:20.650-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: released lock on worker lease
2024-07-26T09:52:20.652-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Run tasks'
2024-07-26T09:52:20.654-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Run tasks' completed
2024-07-26T09:52:20.656-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] included builds: released lock on worker lease
2024-07-26T09:52:20.659-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: acquired lock on worker lease
2024-07-26T09:52:20.661-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 4: released lock on worker lease
2024-07-26T09:52:20.663-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: acquired lock on worker lease
2024-07-26T09:52:20.665-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: acquired lock on worker lease
2024-07-26T09:52:20.667-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 2: released lock on worker lease
2024-07-26T09:52:20.669-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: acquired lock on worker lease
2024-07-26T09:52:20.671-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker: released lock on worker lease
2024-07-26T09:52:20.669-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Run main tasks'
2024-07-26T09:52:20.676-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Run main tasks' completed
2024-07-26T09:52:20.674-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: acquired lock on worker lease
2024-07-26T09:52:20.680-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 5: released lock on worker lease
2024-07-26T09:52:20.682-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: acquired lock on worker lease
2024-07-26T09:52:20.684-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 3: released lock on worker lease
2024-07-26T09:52:20.721-0600 [LIFECYCLE] [org.gradle.internal.buildevents.TaskExecutionStatisticsReporter] 66 actionable tasks: 66 executed
2024-07-26T09:52:20.724-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Build finished for file system watching' started
2024-07-26T09:52:21.006-0600 [INFO] [org.gradle.internal.watch.registry.impl.WatchableHierarchies] Some of the file system contents retained in the virtual file system are on file systems that Gradle doesn't support watching. The relevant state was discarded to ensure changes to these locations are properly detected. You can override this by explicitly enabling file system watching.
2024-07-26T09:52:21.009-0600 [INFO] [org.gradle.internal.watch.registry.impl.HierarchicalFileWatcherUpdater] Watched directory hierarchies: []
2024-07-26T09:52:21.011-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Build finished for file system watching'
2024-07-26T09:52:21.014-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Build finished for file system watching' completed
2024-07-26T09:52:21.029-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-supplier (X:\.gradle\caches\8.2.1\md-supplier)
2024-07-26T09:52:21.031-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-supplier (X:\.gradle\caches\8.2.1\md-supplier).
2024-07-26T09:52:21.037-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (X:\workspace\native-ni\.gradle\8.2.1\fileContent)
2024-07-26T09:52:21.039-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (X:\workspace\native-ni\.gradle\8.2.1\fileContent).
2024-07-26T09:52:21.045-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for execution history cache (X:\workspace\native-ni\.gradle\8.2.1\executionHistory)
2024-07-26T09:52:21.047-0600 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache executionHistory.bin (X:\workspace\native-ni\.gradle\8.2.1\executionHistory\executionHistory.bin)
2024-07-26T09:52:21.050-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on execution history cache (X:\workspace\native-ni\.gradle\8.2.1\executionHistory).
2024-07-26T09:52:21.056-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (X:\workspace\native-ni\.gradle\buildOutputCleanup)
2024-07-26T09:52:21.057-0600 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFiles.bin (X:\workspace\native-ni\.gradle\buildOutputCleanup\outputFiles.bin)
2024-07-26T09:52:21.062-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (X:\workspace\native-ni\.gradle\buildOutputCleanup).
2024-07-26T09:52:21.067-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for native compile cache (X:\workspace\native-ni\.gradle\8.2.1\nativeCompile)
2024-07-26T09:52:21.069-0600 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache nativeCompile.bin (X:\workspace\native-ni\.gradle\8.2.1\nativeCompile\nativeCompile.bin)
2024-07-26T09:52:21.072-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on native compile cache (X:\workspace\native-ni\.gradle\8.2.1\nativeCompile).
2024-07-26T09:52:21.078-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-rule (X:\.gradle\caches\8.2.1\md-rule)
2024-07-26T09:52:21.080-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-rule (X:\.gradle\caches\8.2.1\md-rule).
2024-07-26T09:52:21.114-0600 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
2024-07-26T09:52:21.143-0600 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
2024-07-26T09:52:21.272-0600 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 10 resolution results binary files in 0.186 secs
2024-07-26T09:52:21.275-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Run build'
2024-07-26T09:52:21.277-0600 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Run build' completed
2024-07-26T09:52:21.279-0600 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on worker lease
2024-07-26T09:52:21.295-0600 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
2024-07-26T09:52:21.297-0600 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
2024-07-26T09:52:21.299-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for checksums cache (X:\workspace\native-ni\.gradle\8.2.1\checksums)
2024-07-26T09:52:21.301-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on checksums cache (X:\workspace\native-ni\.gradle\8.2.1\checksums).
2024-07-26T09:52:21.306-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (X:\workspace\native-ni\.gradle\8.2.1\fileHashes)
2024-07-26T09:52:21.308-0600 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (X:\workspace\native-ni\.gradle\8.2.1\fileHashes\fileHashes.bin)
2024-07-26T09:52:21.310-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (X:\workspace\native-ni\.gradle\8.2.1\fileHashes).
2024-07-26T09:52:21.317-0600 [DEBUG] [org.gradle.cache.internal.DefaultPersistentDirectoryStore] VCS Checkout Cache (X:\workspace\native-ni\.gradle\vcs-1) has last been fully cleaned up 23 hours ago
2024-07-26T09:52:21.319-0600 [DEBUG] [org.gradle.cache.internal.DefaultCacheCoordinator] Cache VCS Checkout Cache (X:\workspace\native-ni\.gradle\vcs-1) was closed 0 times.
2024-07-26T09:52:21.322-0600 [DEBUG] [org.gradle.cache.internal.DefaultCacheCoordinator] Cache VCS metadata (X:\workspace\native-ni\.gradle\8.2.1\vcsMetadata) was closed 0 times.
2024-07-26T09:52:21.325-0600 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for dependencies-accessors (X:\workspace\native-ni\.gradle\8.2.1\dependencies-accessors)
2024-07-26T09:52:21.327-0600 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on dependencies-accessors (X:\workspace\native-ni\.gradle\8.2.1\dependencies-accessors).
2024-07-26T09:52:21.333-0600 [DEBUG] [org.gradle.cache.internal.DefaultPersistentDirectoryStore] dependencies-accessors (X:\workspace\native-ni\.gradle\8.2.1\dependencies-accessors) has last been fully cleaned up 1 hours ago
2024-07-26T09:52:21.339-0600 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
2024-07-26T09:52:21.454-0600 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@4e919e03
2024-07-26T09:52:21.454-0600 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 18: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
2024-07-26T09:52:21.455-0600 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Success[value=org.gradle.launcher.exec.BuildActionResult@2072acb2] from daemon DaemonInfo{pid=14092, address=[046510a5-1005-41cc-a5e5-b3cd1774189f port:63346, addresses:[/127.0.0.1]], state=Idle, lastBusy=1722008786362, context=DefaultDaemonContext[uid=4dfc3e1b-acf4-4d82-800b-9be06c78011b,javaHome=C:\Program Files\Java\jdk-17.0.5,daemonRegistryDir=X:\.gradle\daemon,pid=14092,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
2024-07-26T09:52:21.455-0600 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
2024-07-26T09:52:21.455-0600 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
2024-07-26T09:52:21.457-0600 [LIFECYCLE] [org.gradle.launcher.cli.DebugLoggerWarningAction] 
#############################################################################
   WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

   Debug level logging will leak security sensitive information!

   For more details, please refer to https://docs.gradle.org/8.2.1/userguide/logging.html#sec:debug_security in the Gradle documentation.
#############################################################################

Error output from the --debug flag.

2024-07-26T09:52:20.688-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
2024-07-26T09:52:20.691-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2024-07-26T09:52:20.693-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2024-07-26T09:52:20.695-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2024-07-26T09:52:20.697-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':........:........:........:linkMainExecutable'.
2024-07-26T09:52:20.699-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Error while evaluating property 'compilerVersion' of task ':........:........:........:linkMainExecutable'.
2024-07-26T09:52:20.701-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]    > Cannot invoke "org.gradle.nativeplatform.toolchain.internal.gcc.metadata.GccMetadata.getVendor()" because the 
return value of "org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null
2024-07-26T09:52:20.704-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2024-07-26T09:52:20.705-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2024-07-26T09:52:20.708-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --stacktrace option to get the stack trace.
2024-07-26T09:52:20.710-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Run with --scan to get full insights.
2024-07-26T09:52:20.713-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Get more help at https://help.gradle.org.
2024-07-26T09:52:20.717-0600 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
2024-07-26T09:52:20.719-0600 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 4m 43s

Output from the --stacktrace flag.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':......:......:......:linkMainExecutable'.
> Error while evaluating property 'compilerVersion' of task ':......:......:......:linkMainExecutable'.
   > Cannot invoke "org.gradle.nativeplatform.toolchain.internal.gcc.metadata.GccMetadata.getVendor()" because the return value of "org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':............:......:linkMainExecutable'.
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: org.gradle.api.internal.tasks.properties.PropertyEvaluationException: Error while evaluating property 'compilerVersion' of task ':LaunchSupportSystem:c-app:APS1_CRIO:linkMainExecutable'.
        at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:32)
        at org.gradle.api.internal.tasks.execution.TaskExecution.lambda$visitRegularInputs$1(TaskExecution.java:321)
        at org.gradle.internal.execution.impl.DefaultInputFingerprinter$InputCollectingVisitor.visitInputProperty(DefaultInputFingerprinter.java:103)
        at org.gradle.api.internal.tasks.execution.TaskExecution.visitRegularInputs(TaskExecution.java:319)
        at org.gradle.internal.execution.impl.DefaultInputFingerprinter.fingerprintInputProperties(DefaultInputFingerprinter.java:63)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.captureExecutionStateWithOutputs(CaptureStateBeforeExecutionStep.java:123)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.lambda$captureExecutionState$1(CaptureStateBeforeExecutionStep.java:82)
        at org.gradle.internal.execution.steps.BuildOperationStep$1.call(BuildOperationStep.java:37)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.internal.execution.steps.BuildOperationStep.operation(BuildOperationStep.java:34)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.captureExecutionState(CaptureStateBeforeExecutionStep.java:76)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.lambda$execute$0(CaptureStateBeforeExecutionStep.java:70)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:70)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
        at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:293)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.lang.NullPointerException: Cannot invoke "org.gradle.nativeplatform.toolchain.internal.gcc.metadata.GccMetadata.getVendor()" because the return value of "org.gradle.platform.base.internal.toolchain.SearchResult.getComponent()" is null
        at org.gradle.nativeplatform.toolchain.internal.gcc.GccPlatformToolProvider.versionAwareCompiler(GccPlatformToolProvider.java:119)
        at org.gradle.nativeplatform.toolchain.internal.gcc.GccPlatformToolProvider.createLinker(GccPlatformToolProvider.java:183)
        at org.gradle.nativeplatform.toolchain.internal.AbstractPlatformToolProvider.newCompiler(AbstractPlatformToolProvider.java:149)
        at org.gradle.nativeplatform.tasks.AbstractLinkTask.createCompiler(AbstractLinkTask.java:261)
        at org.gradle.nativeplatform.tasks.AbstractLinkTask.getCompilerVersion(AbstractLinkTask.java:210)
        at org.gradle.nativeplatform.tasks.LinkExecutable_Decorated.getCompilerVersion(Unknown Source)
        at jdk.internal.reflect.GeneratedMethodAccessor240.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.annotations.impl.DefaultPropertyAnnotationMetadata.getPropertyValue(DefaultPropertyAnnotationMetadata.java:97)
        at org.gradle.internal.properties.annotations.DefaultTypeMetadataStore$DefaultPropertyMetadata.getPropertyValue(DefaultTypeMetadataStore.java:266)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker$InstanceTypeMetadataWalker.getChild(AbstractTypeMetadataWalker.java:215)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker$InstanceTypeMetadataWalker.lambda$walkNestedChild$2(AbstractTypeMetadataWalker.java:172)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker$InstanceTypeMetadataWalker.walkNestedChild(AbstractTypeMetadataWalker.java:184)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker$InstanceTypeMetadataWalker.walkNestedChild(AbstractTypeMetadataWalker.java:171)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker$InstanceTypeMetadataWalker.walkNestedChild(AbstractTypeMetadataWalker.java:118)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker.lambda$walkChildren$4(AbstractTypeMetadataWalker.java:85)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker.walkChildren(AbstractTypeMetadataWalker.java:83)
        at org.gradle.internal.properties.annotations.AbstractTypeMetadataWalker.walk(AbstractTypeMetadataWalker.java:53)
        at org.gradle.internal.properties.bean.DefaultPropertyWalker.visitProperties(DefaultPropertyWalker.java:64)
        at org.gradle.execution.plan.ResolveMutationsNode.doResolveMutations(ResolveMutationsNode.java:106)
        at org.gradle.execution.plan.ResolveMutationsNode$1.run(ResolveMutationsNode.java:87)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.execution.plan.ResolveMutationsNode.execute(ResolveMutationsNode.java:83)
        at org.gradle.execution.plan.WorkNodeExecutor.execute(WorkNodeExecutor.java:27)
        ... 8 more

I cannot find a work around for this. Can anyone from Gradle give me a hand?

Gradle folks are not looking here too often afaik.
This is mainly a community forum where users like me help other users.
Maybe if you would build a proper MCVE, someone would have an idea. :man_shrugging: