discuss-gnustep
[Top][All Lists]
Advanced

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

Re: QNX - GNUstep and Objective C


From: David Chisnall
Subject: Re: QNX - GNUstep and Objective C
Date: Mon, 4 Jan 2010 15:04:12 +0000

Hi,

This error will appear if the first instance variable in a class appears before the end of the last instance variable in the superclass. In this case, the first instance variable is a 'struct stat' and it is (apparently) overlapping with the isa pointer.

It's not clear from your post. Are you linking against both libobjc2 (which installs itself as libobjc.so.4) and against GCC libobjc (libobjc.so.3 or libobjc.so.2)? If so, then you can expect things to break quite badly, because both export the same symbols. Please use one or the other, not both. If this is not the problem then...

Both NSObject and GSAttrDictionary are part of -base, so you will have compiled them with the same compiler. The problem is therefore not an issue of mismatched compilers, but it may well be something related to the ABI handling in clang. The ivar offset calculation code is not yet particularly well tested beyond x86 *NIX platforms. It is possible that there is a bug.

I've just added a bit more debugging code to libobjc2, so it will tell you what the name and offsets of the offending ivars are. Please can you run the new version and see what the message is? Please can you also let me know what architecture you are using, so I can check that clang is generating the correct IR?

You can also comment out line 787 in libobjc2's init.c. This will revert to the behaviour of the older versions of libobjc and see if things actually break.

David

On 3 Jan 2010, at 19:33, bbceler wrote:


I finished works on porting LLVM and clang on QNX recently. I also compiled libobjc2 from GNUstep. clang compiles without problems programs in C. I make the tests of the compilation of programs in objc 2.0. That programs do not
use GNUstep one compiles and they work without problems.
I have however the problem with compiling programs using GNUstep. Programs
compiles but while starting the mistake appears:
./autogsdoc
Error: Instance variables in GSAttrDictionary overlap superclass
NSObjectThis probably means that you are subclassing a class from a library,
which has changed in a binary-incompatible way.
Abort (core dumped)
Because I compiled gnustep-base use gcc runtime I thought that should this gnustep-base compile also with the use of clang. I compiled the library
gnustep-base using clang and libobjc2.
The effect is the same unfortunately. I did not have problems with programs
in objc 1.0 and GNUstep.
Can the problem come into being because of the conflicts gcc libobjc with
the library libobjc2 from GNUstep ?


--
View this message in context: 
http://old.nabble.com/QNX---GNUstep-and-Objective-C-tp26047107p27004526.html
Sent from the GNUstep - General mailing list archive at Nabble.com.



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

-- Send from my Jacquard Loom





reply via email to

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