Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asmble compile error #28

Closed
DreamWuGit opened this issue Mar 6, 2019 · 4 comments · Fixed by #43
Closed

asmble compile error #28

DreamWuGit opened this issue Mar 6, 2019 · 4 comments · Fixed by #43

Comments

@DreamWuGit
Copy link

I download 0.4.0 release ,and extract to my computer .
when I run : MacBook-Pro:asmble wudream$ ./asmble/bin/asmble compile main.wasm hello
Exception in thread "main" kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Function 'limit' (JVM signature: limit(I)Ljava/nio/Buffer;) not resolved in class java.nio.ByteBuffer:
public open fun limit(arg0: kotlin.Int): (java.nio.ByteBuffer..java.nio.ByteBuffer?) defined in java.nio.ByteBuffer | kotlin.reflect.jvm.internal.JvmFunctionSignature$JavaMethod@f19c9d2
public final fun limit(): kotlin.Int defined in java.nio.ByteBuffer | kotlin.reflect.jvm.internal.JvmFunctionSignature$JavaMethod@7807ac2c
at kotlin.reflect.jvm.internal.KDeclarationContainerImpl.findFunctionDescriptor(KDeclarationContainerImpl.kt:159)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(KFunctionImpl.kt:54)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(KFunctionImpl.kt:34)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:92)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:31)
at kotlin.reflect.jvm.internal.KFunctionImpl.getDescriptor(KFunctionImpl.kt)
at kotlin.reflect.jvm.internal.KFunctionImpl$caller$2.invoke(KFunctionImpl.kt:60)
at kotlin.reflect.jvm.internal.KFunctionImpl$caller$2.invoke(KFunctionImpl.kt:34)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:92)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:31)
at kotlin.reflect.jvm.internal.KFunctionImpl.getCaller(KFunctionImpl.kt)
at kotlin.reflect.jvm.ReflectJvmMapping.getJavaMethod(ReflectJvmMapping.kt:62)
at asmble.compile.jvm.AsmExtKt.getDeclarer(AsmExt.kt:22)
at asmble.compile.jvm.AsmExtKt.invokeVirtual(AsmExt.kt:28)
at asmble.compile.jvm.ByteBufferMem.init(ByteBufferMem.kt:27)
at asmble.compile.jvm.AstToAsm.addMemClassConstructor(AstToAsm.kt:146)
at asmble.compile.jvm.AstToAsm.addConstructors(AstToAsm.kt:79)
at asmble.compile.jvm.AstToAsm.fromModule(AstToAsm.kt:26)
at asmble.cli.Compile.run(Compile.kt:71)
at asmble.cli.Compile.run(Compile.kt:10)
at asmble.cli.Command.runWithArgs(Command.kt:17)
at asmble.cli.MainKt.main(Main.kt:31)

I do quick glance at google search , it seems to be java.nio.ByteBuffer incompatibility with JDK9+ . jetty/jetty.project#3244
pls. have a look !

@DreamWuGit
Copy link
Author

supplement : I both installed java JDK8 and JDK10 , 10 is supposed to be default .

@lrettig
Copy link

lrettig commented May 12, 2019

I ran into this issue as well. Removing JDK9 and 10 and installing JDK8 solved it for me.

@ice1000
Copy link

ice1000 commented Sep 9, 2019

It's caused by an error here:

forceFnType<ByteBuffer.(Int) -> Buffer>(ByteBuffer::limit).invokeVirtual(),

@ice1000 ice1000 mentioned this issue Sep 9, 2019
@ice1000
Copy link

ice1000 commented Sep 9, 2019

Created a PR #31 to fix this issue. Why didn't you guys fix this? This little bug is easy to spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants