discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Building fun again


From: Thomas Davie
Subject: Re: Building fun again
Date: Fri, 6 Jan 2012 17:00:37 +0000

Thanks for your attention guys – the idiotic thing I'd done was forgotten an svn up, which was preventing the build system from detecting that libobjc2 wanted to link libdispatch, and failing everything.

Thanks

Tom Davie
if (*ra4 != 0xffc78948) { return false; }

On 6 Jan 2012, at 15:40, Ivan Vučica wrote:

Hi,

I have not tried using libdispatch. However, do you need to manually force GNUstep to link with it? I'm especially concerned about the need to specify linking with libobjc.

Perhaps this can help?
I doubt it'll reveal anything you don't already know, but this works for me on cleanly installed Ubuntu 10.04. It's based on Etoile's INSTALL file. It's fairly lengthy, since clang is compiled as well.

This script is to be run in the home folder and it installs clang into your home folder's llvm/Release+Asserts/bin (to avoid conflicting with system-wide clang you may have). Post-compile, I also added ~/llvm/Release+Asserts/bin into PATH, and I sourced GNUstep.sh to make compiling easier.

On Fri, Jan 6, 2012 at 16:33, Thomas Davie <tom.davie@gmail.com> wrote:
Heya,

I've got a bit further with this, by specifying LIBS="-ldispatch -lobjc" and LDFLAGS="-L/usr/GNUstep/Local/Library/Libraries", configure now succeeds!  Unfortunately, make is not so successful.  Linking additions fails, it appears clang isn't getting any linker flags passed in when it links:

make messages=yes reports that this command is being invoked:
clang -nostdlib -r        -shared-libgcc -fexceptions -o ./obj/subproject.o obj/Additions.obj/GSObjCRuntime.m.o obj/Additions.obj/GCObject.m.o obj/Additions.obj/GCArray.m.o obj/Additions.obj/GCDictionary.m.o ob
j/Additions.obj/GSLock.m.o obj/Additions.obj/GSMime.m.o obj/Additions.obj/GSXML.m.o obj/Additions.obj/GSFunctions.m.o obj/Additions.obj/GSInsensitiveDictionary.m.o obj/Additions.obj/NSArray+GNUstepBase.m.o obj/
Additions.obj/NSAttributedString+GNUstepBase.m.o obj/Additions.obj/NSBundle+GNUstepBase.m.o obj/Additions.obj/NSCalendarDate+GNUstepBase.m.o obj/Additions.obj/NSData+GNUstepBase.m.o obj/Additions.obj/NSDebug+GN
UstepBase.m.o obj/Additions.obj/NSError+GNUstepBase.m.o obj/Additions.obj/NSFileHandle+GNUstepBase.m.o obj/Additions.obj/NSLock+GNUstepBase.m.o obj/Additions.obj/NSMutableString+GNUstepBase.m.o obj/Additions.ob
j/NSNumber+GNUstepBase.m.o obj/Additions.obj/NSObject+GNUstepBase.m.o obj/Additions.obj/NSPropertyList+GNUstepBase.m.o obj/Additions.obj/NSProcessInfo+GNUstepBase.m.o obj/Additions.obj/NSStream+GNUstepBase.m.o 
obj/Additions.obj/NSString+GNUstepBase.m.o obj/Additions.obj/NSTask+GNUstepBase.m.o obj/Additions.obj/NSThread+GNUstepBase.m.o obj/Additions.obj/NSURL+GNUstepBase.m.o obj/Additions.obj/Unicode.m.o ;

This then promptly produces missing symbols for basically everything, because it's not getting told to link in libobjc, or even the standard C libraries.

Anyone got any ideas how to get this a bit further?

Thanks

Tom Davie


On 6 Jan 2012, at 13:50, Thomas Davie wrote:

Hey all,

I just updated my ubuntu box to allow me to use libdispatch, unfortunately, that killed my GNUstep install in the process, so I'm in the process of rebuilding.

I have a new clang from svn, built and tested to be working on C files.
I have built gnustep-make successfully with CC=gcc set.
I have built gnustep-base successfully with CC=gcc set.
I have built libobjc2 successfully with CC=clang set.
I have reconfigured and built gnustep-make successfully with CC=clang set.
gnustep-base will not reconfigure though, complaining that clang will not produce working binaries from objc files, some experimentation says it clearly will:

./configure --enable-libffi --with-library-flags="-L/usr/GNUstep/Local/Library/Libraries -ldispatch -lobjc" --with-default-config=/usr/GNUstep/Local/Configuration/GNUstep.conf
.....
checking whether objc really works... no
I don't seem to be able to use your Objective-C compiler to produce
working binaries!  Please check your Objective-C compiler installation.
If you are using gcc-3.x make sure that your compiler's libgcc_s and libobjc
can be found by the dynamic linker - usually that requires you to play
with LD_LIBRARY_PATH or /etc/ld.so.conf.
Please refer to your compiler installation instructions for more help.
configure: error: The Objective-C compiler does not work or is not installed properly.
tatd2@GLaDOS:~/gnustep-base$ cd ..
tatd2@GLaDOS:~$ clang -L/usr/GNUstep/Local/Library/Libraries -lobjc -ldispatch  test.m
tatd2@GLaDOS:~$ ./a.out 
Hello World
tatd2@GLaDOS:~$ cat test.m
#include <stdlib.h>
#include <stdio.h>

@interface A

+ (void)a;

@end

@implementation A

+ (void)a
{
    printf("Hello World\n");
}

@end

int main (int argc, char **argv)
{
  [A a];
}

Is there anything I can do to debug why this check seems to be failing?
if (*ra4 != 0xffc78948) { return false; }

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


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




--
Ivan Vučica - ivan@vucica.net


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


reply via email to

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