discuss-gnustep
[Top][All Lists]
Advanced

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

Problem building base with libobjc2


From: Truls Becken
Subject: Problem building base with libobjc2
Date: Sat, 3 Jul 2010 19:35:41 +0200

Hi,

I get errors when building gnustep trunk r30916, using libobjc2 from
the same revision. This does not happen with the gcc runtime because
the problematic code is then skipped by an #ifndef.

Making all for library libgnustep-base...
 Compiling file GSLocale.m ...
 Compiling file preface.m ...
 Compiling file cifframe.m ...
 Compiling file CXXException.m ...
...snip...
 Compiling file NSString.m ...
 Compiling file NSTask.m ...
 Compiling file NSThread.m ...
NSThread.m:288:20: error: static declaration of ‘objc_thread_add’
follows non-static declaration
/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/objc/thr.h:91:6: note:
previous declaration of ‘objc_thread_add’ was here
make[4]: *** [obj/libgnustep-base.obj/NSThread.m.o] Error 1
make[3]: *** [internal-library-all_] Error 2
make[2]: *** [libgnustep-base.all.library.variables] Error 2
make[1]: *** [internal-all] Error 2
make: *** [internal-all] Error 2

Removing the static keyword in NSThread.m makes the library compile,
but it is not linkable so the build now stops on the first tool:

Making all in Tools ...
Making all for tool autogsdoc...
 Compiling file autogsdoc.m ...
 Compiling file AGSParser.m ...
 Compiling file AGSOutput.m ...
 Compiling file AGSIndex.m ...
 Compiling file AGSHtml.m ...
 Linking tool autogsdoc ...
../Source/./obj/libgnustep-base.so: undefined reference to
`__objc_is_multi_threaded'
../Source/./obj/libgnustep-base.so: undefined reference to `objc_mutex_unlock'
../Source/./obj/libgnustep-base.so: undefined reference to `objc_mutex_lock'
collect2: ld returned 1 exit status
make[4]: *** [obj/autogsdoc] Error 1
make[3]: *** [internal-tool-all_] Error 2
make[2]: *** [autogsdoc.all.tool.variables] Error 2
make[1]: *** [internal-all] Error 2
make: *** [internal-all] Error 2

The missing symbols are used by the implementation of objc_thread_add
from NSThread.m above, which is not compiled when configure finds that
libobjc already provides the function.

-Truls



reply via email to

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