Hi, i'm working on the "squeak on android" Project (but i'm absolutely new to squeak-vm-hacking): http://code.google.com/p/squeak-android-vm/ currently i try to get the socket-stuff working - with limited success :-( The squeak vm is a shared library compiled with the android-ndk and wrapped by an android-java app, making jni-calls. Though the SocketPlugin does compile with the ndk, any call to the Plugin produces a primitiveFailed-Exception. Even when i replace the code of a primitive with dummy-code that returns static values and does not execute any plattform-specific code. Do i need to redirect the primitive-calls somehow through the java-app and make calls to the shared-library, or should the primitives just work on android? would be greateful for any tips/ hints/ discussions ... regards, Stefan -- Dipl.-Wirtsch.-Inf. Stefan Krecher Neulander Str. 17, 27374 Visselhövede Tel +49(0)4262 958848 mobil +49(0)172 3608616 http://krecher.com |
On 17 March 2010 12:02, Stefan Krecher <[hidden email]> wrote: > > Hi, > i'm working on the "squeak on android" Project (but i'm absolutely new > to squeak-vm-hacking): > http://code.google.com/p/squeak-android-vm/ > currently i try to get the socket-stuff working - with limited success :-( > The squeak vm is a shared library compiled with the android-ndk and > wrapped by an android-java app, making jni-calls. > Though the SocketPlugin does compile with the ndk, any call to the > Plugin produces a primitiveFailed-Exception. Even when i replace the > code of a primitive with dummy-code that returns static values and > does not execute any plattform-specific code. Sounds like you simply do not included it into build, or it using a dummy stubs, disabling all networking code altogether For example, a win32 platform code having stubs (see refs to NO_NETWORK in sources). > Do i need to redirect the primitive-calls somehow through the java-app > and make calls to the shared-library, or should the primitives just > work on android? > would be greateful for any tips/ hints/ discussions ... > regards, > Stefan > -- > Dipl.-Wirtsch.-Inf. Stefan Krecher > Neulander Str. 17, 27374 Visselhövede > Tel +49(0)4262 958848 > mobil +49(0)172 3608616 > http://krecher.com > -- Best regards, Igor Stasenko AKA sig. |
Hi, 2010/3/17 Igor Stasenko <[hidden email]>: >> Though the SocketPlugin does compile with the ndk, any call to the >> Plugin produces a primitiveFailed-Exception. Even when i replace the >> code of a primitive with dummy-code that returns static values and >> does not execute any plattform-specific code. > > Sounds like you simply do not included it into build, or > it using a dummy stubs, disabling all networking code altogether > For example, a win32 platform code having stubs (see refs to > NO_NETWORK in sources). found nothing regarding "NO_NETWORK" in the sources. btw: when i do "nm libsqueakvm.so | grep primitive" in a cygwin console, all the Socket-/ and Resolver-Primitives show up |
got it: after some research i found out, that i had to add the SocketPlugin_exports to the sqNamedPrims.h 2010/3/17 Stefan Krecher <[hidden email]>: > Hi, > > > 2010/3/17 Igor Stasenko <[hidden email]>: >>> Though the SocketPlugin does compile with the ndk, any call to the >>> Plugin produces a primitiveFailed-Exception. Even when i replace the >>> code of a primitive with dummy-code that returns static values and >>> does not execute any plattform-specific code. >> >> Sounds like you simply do not included it into build, or >> it using a dummy stubs, disabling all networking code altogether >> For example, a win32 platform code having stubs (see refs to >> NO_NETWORK in sources). > > found nothing regarding "NO_NETWORK" in the sources. > btw: when i do "nm libsqueakvm.so | grep primitive" in a cygwin > console, all the Socket-/ and Resolver-Primitives show up > -- Dipl.-Wirtsch.-Inf. Stefan Krecher Neulander Str. 17, 27374 Visselhövede Tel +49(0)4262 958848 mobil +49(0)172 3608616 http://krecher.com |
On 3/17/2010 7:48 AM, Stefan Krecher wrote: > got it: after some research i found out, that i had to add the > SocketPlugin_exports to the sqNamedPrims.h Correct. There's a bit of magic in the process right now. Most plugins haven't been generated for Android since they're not supported. You either need to hack sqNamedPrims.h or you need to compile SocketPlugin as an external plugin and implement the necessary lookup code in the main VM :-) For now, I'd say just hacking sqNamedPrims.h is the right thing. Good luck and let us know how it goes. Having sockets work would be positively *awesome* because it gives us VNC and other remote control options! Cheers, - Andreas > 2010/3/17 Stefan Krecher<[hidden email]>: >> Hi, >> >> >> 2010/3/17 Igor Stasenko<[hidden email]>: >>>> Though the SocketPlugin does compile with the ndk, any call to the >>>> Plugin produces a primitiveFailed-Exception. Even when i replace the >>>> code of a primitive with dummy-code that returns static values and >>>> does not execute any plattform-specific code. >>> >>> Sounds like you simply do not included it into build, or >>> it using a dummy stubs, disabling all networking code altogether >>> For example, a win32 platform code having stubs (see refs to >>> NO_NETWORK in sources). >> >> found nothing regarding "NO_NETWORK" in the sources. >> btw: when i do "nm libsqueakvm.so | grep primitive" in a cygwin >> console, all the Socket-/ and Resolver-Primitives show up >> > > > |
2010/3/17 Andreas Raab <[hidden email]>: > Good luck and let us know how it goes. Having sockets work would be > positively *awesome* because it gives us VNC and other remote control > options! the sockets work, but the vnc-server seems to be broken. i filed in RFB.33.cs and started the server, but when i connect with a vnc-client (tried RealVNC and TightVNC) an Exception comes up complaining about a missing method "isBigEndian" in the SystemDictionary. After adding the method and returning "false", the vnc-client seems to loose the connection right after establishing it (not sure if he really establishes the connection - the client says only "connection closed"). I tried this with the android-image and with a clean squeak 3.10.2 - same effect. Ideas, anyone? regards, Stefan |
Free forum by Nabble | Edit this page |