gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undefined reference to __gnustep_objcxx_personality_v0


From: David Chisnall
Subject: Re: undefined reference to __gnustep_objcxx_personality_v0
Date: Sat, 26 Dec 2015 18:13:44 +0100

Thanks,

I modified objc_msgSend quite recently, and as the ARM version is currently 
untested I am not surprised that it’s broken.  

Rereading the assembly, there was one obvious bug.  Can you rerun the tests and 
see if this fixes it?  If not, then there are likely some less-obvious bugs 
hiding.  

Your patch [2] is applied to the long-deprecated Makefile.  Is CMake 
problematic for you?  I thought that the Android NDK came with a CMake 
toolchain file that makes cross-building easy.

David

> On 26 Dec 2015, at 17:52, Dmitry Moskalchuk <address@hidden> wrote:
> 
> On 26/12/15 13:48, David Chisnall wrote:
>> I think that libobjc2 should now work as well - let me know if it doesn’t.
> 
> David,
> 
> I've checked out and built libobjc2 for Android. First, I've checked out 
> branch 1.8.1 [1], and applied some (mostly cosmetic) fixes [2] to make it 
> build-able for Android by CrystaX NDK. Mostly it was fixes of compiler 
> warnings, but also I've added back old Makefile, with some fixes, since 
> generating proper Makefile with cmake looks really tricky for Android - cmake 
> just don't understand that host and target systems are different and generate 
> Makefile for host system, even though I've provided proper CC, CFLAGS, 
> LDFLAGS, etc. So right now bringing back old good Makefile looks better for 
> me than fighting with cmake.
> 
> So, having libobjc2 built for Android, I've compiled and run simple test [3], 
> just to verify that Objective-C runtime works properly. It works fine on my 
> ARM Android devices.
> 
> Then, I've switched to 'master' branch of libobjc2 repository, and applied 
> patch [2] on top of it. It required small additions, which     makes no sense 
> to specify here, just because it was trivial, but after that, when libobjc2 
> was built from 'master' sources, that simple test started crashing on my ARM 
> Android devices. Call stack of crash [4] is bit unclear though. As you can 
> see there, it crashes somewhere inside objc_msgSend_fpret.
> 
> As far as I see, there are many commits between 1.8.1 and master. I'm going 
> to find one, causing this crash. However, I thought it might be interesting 
> to you to get feedback on this stage too.
> 
> 
> [1] https://github.com/gnustep/libobjc2/tree/1.8.1
> [2] 
> https://github.com/crystax/android-vendor-libobjc2/commit/a10757ac479704faac2b2fa32e9b0150b2a8aa8b
> [3] 
> https://github.com/crystax/android-platform-ndk/blob/master/tests/device/crystax-test-objc-runtime/jni/test.m
> [4] https://gist.github.com/dmcrystax/bb2c7e1c3c79e45c039d
> 
> P.S. Please note that this is clear Objective-C code, i.e. no yet 
> Objective-C++ things involved.
> 
> -- 
> Dmitry Moskalchuk
> 


-- Sent from my Apple II




reply via email to

[Prev in Thread] Current Thread [Next in Thread]