# Build Failure from Source

**URL:** <https://discuss.kotlinlang.org/t/build-failure-from-source/3157>\
**Category:** Support\
**Created:** [June 7, 2017, 12:11am UTC](https://discuss.kotlinlang.org/t/build-failure-from-source/3157 "2017-06-07T00:11:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham2892](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/shubham2892/32/3120_2.png) [@shubham2892](https://discuss.kotlinlang.org/u/shubham2892)\
**Post date:** [June 7, 2017, 12:11am UTC](https://discuss.kotlinlang.org/t/build-failure-from-source/3157/1 "2017-06-07T00:11:57Z")

</div>

Hi, I am trying to build kotlin compiler from the source code. I have ant installed and these variables set:  
JAVA\_HOME=“path to JDK 1.8”  
JDK\_16=“path to JDK 1.6”  
JDK\_17=“path to JDK 1.7”  
JDK\_18=“path to JDK 1.8”

On running “ant -f build.xml”, I get these error at “gradle-runtime” build step:

[gradle] [KOTLIN] Received unexpected message from compiler daemon: category=0, severity=2, message=‘kotlinc-jvm @snapshot@ (JRE 1.8.0\_102-b14)’, attachment=null

[gradle] [KOTLIN] Received unexpected message from compiler daemon: category=0, severity=1, message=‘Advanced option value is passed in an obsolete form. Please use the ‘=’ character to specify the value: -Xdump-declarations-to=…’, attachment=null

[gradle] [KOTLIN] Received unexpected message from compiler daemon: category=0, severity=0, message=‘No class roots are found in the JDK path: /Library/Java/JavaVirtualMachines/1.6.0.jdk’, attachment=null

[gradle]  
[gradle] FAILURE: Build failed with an exception.  
[gradle]  
[gradle] \* What went wrong:  
[gradle] Execution failed for task ‘:kotlin-stdlib:compileBuiltinsKotlin’.  
[gradle] \> Compilation error. See log for more details  
[gradle]

More specifically it is failing at this command in stdlib/build.gradle:

compileBuiltinsKotlin {  
kotlinOptions {  
freeCompilerArgs = [  
“-version”,  
“-Xallow-kotlin-package”,  
“-Xdump-declarations-to”, “${buildDir}/runtime-declarations.json”,  
“-cp”, “${rootDir}/…/dist/builtins”,  
“-module-name”, “kotlin-runtime”  
]  
}  
}

Please let me know if any more info is needed. I have been trying to get it working for past three days, any help will be really appreciated. Thank you.

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [June 7, 2017, 12:21am UTC](https://discuss.kotlinlang.org/t/build-failure-from-source/3157/2 "2017-06-07T00:21:51Z")

</div>

> [@shubham2892](#):
>
> /Library/Java/JavaVirtualMachines/1.6.0.jdk

If you’re on Mac, probably you should set JDK paths as `/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home`

---

<div class="post-metadata">

**Author:** ![shubham2892](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/shubham2892/32/3120_2.png) [@shubham2892](https://discuss.kotlinlang.org/u/shubham2892)\
**Post date:** [June 7, 2017, 4:38am UTC](https://discuss.kotlinlang.org/t/build-failure-from-source/3157/3 "2017-06-07T04:38:15Z")

</div>

Thanks a lot. 😅
