Re: Issues with JNI on Mono (IKVM Trunk)
Tommy Ettinger <[email protected]>
| Newsgroups | gmane.comp.java.ikvm.devel |
|---|---|
| Message-ID | <CAAWSfZOv4YgMMryBqBG3xF+YzSbVkJeuA+FQLwCVOyv82UJ58w@mail.gmail.com> |
Ah, figured out how to load the config on Mono. I think. Unfortunately it gives a very different error: http://pastebin.com/GAsQyfA5 The App.config is here https://github.com/tommyettinger/CommandersUnite/blob/master/CU/CU/App.config On Wed, Jul 16, 2014 at 1:30 PM, Tommy Ettinger <[email protected]> wrote: > My last message was too long for the list, so here it is with pastebin > links. > With those lines added to App.config, It gives the following output on > Windows 7 in Visual Studio's output window (and nothing new on Mono): > Visual Studio output: http://pastebin.com/6Jpi5FxV > Mono output: http://pastebin.com/BEMyAerk > Thanks for your speedy reply on this, IKVM worked brilliantly until I > tried to get it to run on Mono. IKVM is a pretty incredible piece of > software. > > > On Wed, Jul 16, 2014 at 6:01 AM, Jeroen Frijters <[email protected]> > wrote: > >> Hi Tommy, >> >> >> >> Can you try enabling JNI tracing by adding the following to your >> app.config: >> >> >> >> <system.diagnostics> >> >> <switches> >> >> <add name="jni" value="4" /> >> >> </switches> >> >> </system.diagnostics> >> >> >> >> Regards, >> >> Jeroen >> >> >> >> *From:* Tommy Ettinger [mailto:[email protected]] >> *Sent:* Wednesday, July 16, 2014 14:00 >> *To:* [email protected] >> *Subject:* [Ikvm-developers] Issues with JNI on Mono (IKVM Trunk) >> >> >> >> I've been struggling for the last two days to port my C# IKVM application >> that uses the Java library libgdx to Linux. The application works just >> fine on Windows/.NET, but something is wrong with the linking for JNI code >> AFAICT. Using libgdx you have a choice of backends for how to display >> graphics, one of which is LWJGL and one of which is JGLFW. LWJGL failed on >> both 32- and 64-bit Linux (after I figured out how to get it to load its >> dependencies from the right folder) with an UnsatisfiedLinkError in org.lwjgl.DefaultSysImplementation.getPointerSize()I >> , which (in the LWJGL source) is a native method with no body in the .java >> file. >> >> JGLFW failed on 64-bit Linux (haven't built it on 32-bit) with a >> different error, still in a native method: >> >> java.lang.UnsatisfiedLinkError: com/badlogic/jglfw/Glfw.glfwInitJni()Z >> >> at cli.IKVM.Runtime.JNI$Frame.GetFuncPtr(Unknown Source) >> >> I have had issues setting LD_LIBRARY_PATH on this machine (a VM running >> Fedora 20, 64-bit; the VM is run by VirtualBox on Windows 7 64-bit), and I >> believe java.library.path is unset, but the libraries are all in the >> current folder (same as the exe). My application is open source and the >> latest code is at https://github.com/tommyettinger/CommandersUnite/ and >> the only IKVM-specific code is in >> https://github.com/tommyettinger/CommandersUnite/blob/master/CU/CU/GameGDX.cs#L478 >> . I built gdx-jglfw.dll using the command: >> >> "%IKVM_HOME%/ikvmc.exe" -target:library -out:gdx-jglfw.dll >> -sharedclassloader gdx.jar gdx-natives.jar gdx-backend-jglfw.jar >> gdx-backend-jglfw-natives.jar >> >> where %IKVM_HOME% evaluated to the bin directory of the current >> trunk/head/master (latest) of the IKVM CVS on SourceForge (it actually may >> have been the latest nightly from the IKVM weblog, it is a version 8 or >> higher nightly). That command was run on the libgdx 1.2.0 binary release. >> I then extracted the dll and so files from the natives jars, copied them >> into the project, and set them to copy into the release directory. >> >> So my question is, is there a bug in my code, or in IKVM, here that can >> be fixed? Does JNI work at all under Mono/Linux? >> >> >> >> -- >> >> Thomas (Tommy) Ettinger >> > > > > -- > > Thomas (Tommy) Ettinger > -- Thomas (Tommy) Ettinger ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Ikvm-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ikvm-developers