# Tool-Chains Native Sample Doesn't Build (Gradle 4.3.1)

**URL:** <https://discuss.gradle.org/t/tool-chains-native-sample-doesnt-build-gradle-4-3-1/25501>\
**Category:** Help/Discuss\
**Created:** [January 17, 2018, 3:24pm UTC](https://discuss.gradle.org/t/tool-chains-native-sample-doesnt-build-gradle-4-3-1/25501 "2018-01-17T15:24:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swpalmer](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/swpalmer/32/80_2.png) [@swpalmer](https://discuss.gradle.org/u/swpalmer)\
**Post date:** [January 17, 2018, 3:24pm UTC](https://discuss.gradle.org/t/tool-chains-native-sample-doesnt-build-gradle-4-3-1/25501/1 "2018-01-17T15:24:21Z")

</div>

$ cd /opt/gradle-4.3.1/samples/native-binaries/tool-chains  
$ /opt/gradle-4.3.1/bin/gradle

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

- What went wrong:  
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().

> Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().

- Try:  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

- Get more help at [https://help.gradle.org](https://help.gradle.org)

BUILD FAILED in 4s

---

<div class="post-metadata">

**Author:** ![sterling](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sterling/32/5395_2.png) [@sterling](https://discuss.gradle.org/u/sterling)\
**Post date:** [January 17, 2018, 7:02pm UTC](https://discuss.gradle.org/t/tool-chains-native-sample-doesnt-build-gradle-4-3-1/25501/2 "2018-01-17T19:02:16Z")

</div>

Hi @swpalmer,

This looks like it might be some kind of permissions issue (GRADLE\_USER\_HOME read-only or wrong user?) that is hidden in the noise.

Could you run the build again with `--scan` and see if that generates a build scan?

---

<div class="post-metadata">

**Author:** ![swpalmer](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/swpalmer/32/80_2.png) [@swpalmer](https://discuss.gradle.org/u/swpalmer)\
**Post date:** [January 17, 2018, 8:18pm UTC](https://discuss.gradle.org/t/tool-chains-native-sample-doesnt-build-gradle-4-3-1/25501/3 "2018-01-17T20:18:20Z")

</div>

I think that is the issue… I’m just clueing in now to the fact that the samples directory is not world writable. It was just the real error being hidden as you say.
