Kotlin script fails to run on Windows - org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException - windows

when running:
kotlinc -script Day1.kts
Day1.kts:
println("hello")
I get:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil (file:/C:/Users/ASUS/kotlin-native-windows-1.4.21/konan/lib/kotlin-native.jar) to method java.util.ResourceBundle
.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
error: compilation failed: Front-end Internal error: Failed to analyze declaration Day1
File being compiled: (1,1) in C:/Users/ASUS/IdeaProjects/adventOfCode2020/Day1.kts
The root cause org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException was thrown at: org.jetbrains.kotlin.resolve.lazy.BasicAbsentDescriptorHandler.diagnoseDescriptorNot
Found(AbsentDescriptorHandler.kt:18)
* Source files: Day1.kts
* Compiler version info: Konan: 1.4.21 / Kotlin: 1.4.21
* Output kind: PROGRAM
exception: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Day1
File being compiled: (1,1) in C:/Users/ASUS/IdeaProjects/adventOfCode2020/Day1.kts
The root cause org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException was thrown at: org.jetbrains.kotlin.resolve.lazy.BasicAbsentDescriptorHandler.diagnoseDescriptorNot
Found(AbsentDescriptorHandler.kt:18)
at org.jetbrains.kotlin.resolve.ExceptionWrappingKtVisitorVoid.visitDeclaration(ExceptionWrappingKtVisitorVoid.kt:43)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitDeclaration(KtVisitorVoid.java:453)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitDeclaration(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtVisitor.visitScript(KtVisitor.java:78)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitScript(KtVisitorVoid.java:73)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitScript(KtVisitorVoid.java:519)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitScript(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtScript.accept(KtScript.java:69)
at org.jetbrains.kotlin.psi.KtElementImplStub.accept(KtElementImplStub.java:60)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer$analyzeDeclarations$1.registerDeclarations(LazyTopDownAnalyzer.kt:78)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer$analyzeDeclarations$1.visitKtFile(LazyTopDownAnalyzer.kt:96)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitKtFile(KtVisitorVoid.java:513)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitKtFile(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtFile.accept(KtFile.kt:243)
at org.jetbrains.kotlin.psi.KtFile.accept(KtFile.kt:230)
at org.jetbrains.kotlin.resolve.ExceptionWrappingKtVisitorVoid.visitElement(ExceptionWrappingKtVisitorVoid.kt:27)
at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:35)
at org.jetbrains.kotlin.psi.KtVisitor.visitKtFile(KtVisitor.java:73)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitKtFile(KtVisitorVoid.java:69)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitKtFile(KtVisitorVoid.java:513)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitKtFile(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtFile.accept(KtFile.kt:243)
at org.jetbrains.kotlin.psi.KtFile.accept(KtFile.kt:230)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:201)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:60)
at org.jetbrains.kotlin.backend.konan.TopDownAnalyzerFacadeForKonan.analyzeFilesWithGivenTrace(TopDownAnalyzerFacadeForKonan.kt:94)
at org.jetbrains.kotlin.backend.konan.TopDownAnalyzerFacadeForKonan.analyzeFiles(TopDownAnalyzerFacadeForKonan.kt:67)
at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$frontendPhase$1$1.invoke(ToplevelPhases.kt:86)
at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$frontendPhase$1$1.invoke(ToplevelPhases.kt)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$frontendPhase$1.invoke(ToplevelPhases.kt:85)
at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$frontendPhase$1.invoke(ToplevelPhases.kt)
at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:97)
at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:95)
at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:23)
at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:41)
at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:29)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:78)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:35)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:225)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:264)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:261)
at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:27)
at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:21)
at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:263)
at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:457)
at org.jetbrains.kotlin.cli.utilities.MainKt$main$1.invoke(main.kt:41)
at org.jetbrains.kotlin.cli.utilities.MainKt$main$1.invoke(main.kt)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:17)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:41)
Caused by: org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException: Descriptor wasn't found for declaration SCRIPT
at org.jetbrains.kotlin.resolve.lazy.BasicAbsentDescriptorHandler.diagnoseDescriptorNotFound(AbsentDescriptorHandler.kt:18)
at org.jetbrains.kotlin.resolve.lazy.BasicAbsentDescriptorHandler.diagnoseDescriptorNotFound(AbsentDescriptorHandler.kt:17)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.findClassDescriptor(LazyDeclarationResolver.kt:88)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.getScriptDescriptor(LazyDeclarationResolver.kt:65)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer$analyzeDeclarations$1.visitScript(LazyTopDownAnalyzer.kt:89)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitScript(KtVisitorVoid.java:519)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitScript(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtScript.accept(KtScript.java:69)
at org.jetbrains.kotlin.psi.KtElementImplStub.accept(KtElementImplStub.java:60)
at org.jetbrains.kotlin.resolve.ExceptionWrappingKtVisitorVoid.visitDeclaration(ExceptionWrappingKtVisitorVoid.kt:32)
... 58 more
I'm using Windows 10, Kotlin Native Windows 1.4.21.
It works fine in Mac.
Thank you.

As we figured at the https://youtrack.jetbrains.com/issue/KT-44049, the problem was in the incorrect archive being downloaded.
This document mentions downloading kotlin-compiler-1.4.21.zip, while you have probably downloaded kotlin-native-prebuilt-windows-1.4.21.zip

Related

CDO Climate XQuartz error on loading:Input Method Open Failed

I started using CDO for my university project. CDO in the terminal worked fine for a couple of days but later started to get a few errors (in ).
Can anyone please help with this? below is the output details:
Ncview comes with ABSOLUTELY NO WARRANTY; for details type ncview -w'. This is free software licensed under the Gnu General Public License version 3; type ncview -c' for redistribution details.
Note: no Ncview app-defaults file found, using internal defaults
Warning: Unable to load any usable fontset
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
Warning: Input Method Open Failed
calculating min and maxes for t2m...
X connection to /private/tmp/com.apple.launchd.jsgMt9UAJ4/org.xquartz:0 broken (explicit kill or server shutdown).(explicit kill or server shutdown).

NoMethodError: undefined method `plain_specs' for #<Bundler::RubygemsIntegration

I am new to actually very new. I am trying to run sinatra with jruby below is the tutorail I am try to follow,
http://www.ioncannon.net/programming/1325/getting-started-with-jruby-webapps-using-rack-and-sinatra/
I have installed everything accordingly but I am getting an exception below.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
NoMethodError: undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x55b62629 #replaced_methods={}>
setup at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84
check at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124
<main> at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131
require at org/jruby/RubyKernel.java:984
(root) at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
require at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:135
<main> at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4
each at org/jruby/RubyArray.java:1792
run at /home/jahanzeb/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50
<main> at /home/jahanzeb/.rvm/gems/jruby-9.2.6.0/bin/jruby_executable_hooks:10
I have gone through the related question but no results.
Please help

Build object-introspection failed: yocto build

I had errors when I built Yocto for the embedded device. I searched it on the Internet but nothing working. Please help me!
Caught exception: <type 'exceptions.IOError'> IOError(122, 'Disk quota exceeded')
| > /data/phonghoang/build_yocto/tmp/sysroots/x86_64-linux/usr/lib/python2.7/shutil.py(84)copyfile()
| -> copyfileobj(fsrc, fdst)
ERROR:
ERROR: gobject-introspection-native-1.46.0-r0 do_compile: oe_runmake failed
ERROR: gobject-introspection-native-1.46.0-r0 do_compile: Function failed: do_compile (log file is located at /data/phonghoang/build_yocto/tmp/work/x86_64-linux/gobject-introspection-native/1.46.0-r0/temp/log.do_compile.8291)
ERROR: Logfile of failure stored in: /data/phonghoang/build_yocto/tmp/work/x86_64-linux/gobject-introspection-native/1.46.0-r0/temp/log.do_compile.8291
Well,
Caught exception: <type 'exceptions.IOError'> IOError(122, 'Disk quota exceeded')
seems to indicate that you're running out of disk. How much space do you have left on the partition where you're building?
Try to free up some space.

rJava fails on test of installation

Within R I believe I have Java configured correctly.
install.packages("rJava")
checks for a compiler and compiles several things
I do get the following
warning: [options] bootstrap class path not set in conjunction with -source 1.4
Note: examples/rtest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
and then I reach.....
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/u/US_HOME3/David/usr/lib64/R/library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
I'm left believing "Within R I believe I have Java configured correctly" must be false, but I'm not sure what to look at to remedy the situation.

Webcam Performance System Test - WNCameraRequirements - Error: parseEtl Failed with error REGDB_E_CLASSNOTREG (0x80040154)

I am running whck performance tests on our camera, the test that currently fails is:
Webcam Performance System Test - WNCameraRequirements
the test iterates thourgh the camera media types and records a etl file as expected, its stops and closes the camera but then the test fails due to the parsing of the etl file, the logs:
Start Operation: parseEtl average 250 endGuid
{B8197C10-845F-40ca-82AB-9341E98CFC2B} endId 215 max 275 name Time to
switch Preview MediaTypes scenario DiffEventSeries skip 1 startGuid
{B8197C10-845F-40ca-82AB-9341E98CFC2B} startId 243
Parsing Etl: previewIterateMediaTypes_7-20_10-22-58.etl
Warning: CoCreateInstance(CLSID_EtwFilter, NULL, CLSCTX_ALL, IID_IEtwFilter,
(void**)spEtwFilter.ReleaseAndGetAddressOf()) failed with
REGDB_E_CLASSNOTREG (0x80040154)
Warning:
* File: testsrc\multimediatest\common\helpers\capture\videocaptureperf\videocaptureperf.cpp
Ln: 260
Warning: DiffEventSeries( etlFileName, pszStartEventGuid,
startId, pszEndEventGuid, endId, &min, &max, &ave, skip,
m_spLog.Get()) failed with REGDB_E_CLASSNOTREG (0x80040154)
Warning:
* File: testsrc\multimediatest\common\helpers\capture\captureengine\captureengineautomation.cpp
Ln: 2109
Error: parseEtl Failed with error REGDB_E_CLASSNOTREG
(0x80040154)
I tried searcing for a missing dll for ETW but I found nothing related. seems like theres a bug in the whck test while trying to parse the generated etl file... is this Error seems familier to anyone??
thanks!
I used the wrong whql tests platform version (needed x64), and I needed to regsvr32 etwpatterns.dll. that being said, this test is filtered out by microsoft (whql filters) so we eventually ignored it.

Resources