discuss-gnustep
[Top][All Lists]
Advanced

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

linking/runtime problems with non-system compiler


From: Riccardo Mottola
Subject: linking/runtime problems with non-system compiler
Date: Wed, 10 Jun 2015 10:38:17 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

Hi,

I am compiling GNUstep on OpenBSD using a more modern GCC version than the system one. If other systems do not change library versions though this problem is more general.

I have compiled with CC=egcc , nothing more.

At when I run a program, I get:

$ plparse
plparse:/System/Library/Libraries/libgnustep-base.so.1.24: /usr/lib/libobjc.so.6.0 : WARNING: symbol(__objc_class_name_Protocol) size mismatch, relink your program plparse:/System/Library/Libraries/libgnustep-base.so.1.24: /usr/lib/libobjc.so.6.0 : WARNING: symbol(__objc_class_name_Object) size mismatch, relink your program plparse:/System/Library/Libraries/libgnustep-base.so.1.24: undefined symbol '__objc_msg_forward2'
Segmentation fault (core dumped)



I think the main problem is that gcc 4.9 should have bumped the revision of the libobjc library, since it is no longer compatible.
$ ldd /System/Tools/plparse
/System/Tools/plparse:
Start End Type Open Ref GrpRef Name
000019de13a00000 000019de13e04000 exe 1 0 0 /System/Tools/plparse 000019e0929c4000 000019e0933bd000 rlib 0 1 0 /System/Library/Libraries/libgnustep-base.so.1.24 000019e0a3673000 000019e0a3a95000 rlib 0 2 0 /usr/lib/libobjc.so.6.0
<...>

At runtime ldd resolves to /usr/lib which is the system compiler which is older (4.2, IIRC) while the correct libobjc.so.6.0 is in /usr/local/lib

Can this be solved/worked around? The path to libobjc should be embedded, perhaps -R as a linker flag or some other trick?

Riccardo



reply via email to

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