gnustep-dev
[Top][All Lists]
Advanced

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

Re: Install location for libobjc2


From: Tom Davie
Subject: Re: Install location for libobjc2
Date: Fri, 2 Nov 2012 16:53:51 +0000

On 2 Nov 2012, at 16:37, Sebastian Reitenbach <address@hidden> wrote:

> Hi,
> 
> On Friday, November 2, 2012 17:11 CET, Tom Davie <address@hidden> wrote: 
> 
>> 
>> On 2 Nov 2012, at 15:04, Richard Frith-Macdonald <address@hidden> wrote:
>> 
>>> 
>>> On 2 Nov 2012, at 14:54, Tom Davie wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I'm slightly confused just right now.  It's been a while since I installed 
>>>> libobjc2, and I'm having trouble installing the svn trunk version.
>>>> 
>>>> It appears that libojbc2 is being installed into /usr/local/lib, rather 
>>>> than /usr/GNUstep/Local/Library/Libraries as I'd expect.  This is causing 
>>>> configuring GNUstep-base to die saying my obj-c compiler does not work (as 
>>>> it can't find the runtime).
>>>> 
>>>> The only way I can see this happening is if Makefile is being used rather 
>>>> than GNUmakefile.  In what circumstances will this happen?  How would I go 
>>>> about restoring correct behaviour?
>>> 
>>> Using code from svn then all you shuld need to do is:
>>> 
>>> 1. install gnustep-make ... so you have a gnustep environment to install 
>>> libobjc2 into.
>>> 2. build/install libobjc2 using gnu-make ... which should use the 
>>> GNUmakefile (perhaps you are an a system which uses another 'make' and call 
>>> gnu-make 'gmake')
>>> 
>>> The GNUmakefile should install things into the right place.
>> 
>> Hiya Richard,
>> 
>> Trying to convince libobjc2 to live in the GNUstep hierarchy is not working 
>> well.  make on my system is GNU make 3.81 and gnustep-make is installed, 
>> unfortunately though, the library is still being stuck in /usr/local/lib.
>> 
>> Meanwhile David Chisnall tells me off-list that /usr/local/lib is in fact 
>> the correct location for libobjc2 to live.  Unfortunately, gnustep-base's 
>> configure script does not seem to be able to pick up libojbc2 installed 
>> here.  It fails with this in the config log:
>> configure:13192: clang -o conftest -g -O2  
>> -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers 
>> -I/usr/GNUstep/Local/Library/Headers  -fgnu-runtime -x objective-c  
>> -L/usr/GNUstep/System/Library/Libraries 
>> -L/usr/GNUstep/Local/Library/Libraries 
>> -L/usr/GNUstep/Local/Library/Libraries conftest.c -lrt -ldl  -lpthread 
>> -rdynamic -pthread -shared-libgcc -fexceptions -fobjc-nonfragile-abi 
>> -fgnu-runtime -L/home/tatd2/GNUstep/Library/Libraries 
>> -L/usr/GNUstep/Local/Library/Libraries 
>> -L/usr/GNUstep/System/Library/Libraries -lobjc -lm     >&5
>> clang: warning: argument unused during compilation: '-shared-libgcc'
>> In file included from conftest.c:99:
>> In file included from ././config/config.objc.m:2:
>> ././config/objc-common.g:53:8: warning: direct access to objective-c's isa 
>> is deprecated in favor of object_setClass() and object_getClass() 
>> [-Wdeprecated-objc-isa-usage]
>> obj->isa = self;
>>      ^
>> ././config/objc-common.g:46:5: note: ivar is declared here
>> id isa;
>>   ^
>> 1 warning generated.
>> /tmp/conftest-Pwj6Qb.o: In function `main':
>> /home/tatd2/gnustep-base/././config/config.objc.m:21: undefined reference to 
>> `objc_msg_lookup_sender'
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>> 
>> Any Help with this would be much appreciated
> 
> here is how I do it on OpenBSD:
> 
> 1. install libobjc2 using the Makefile, not the GNUmakefile, which will end 
> up in /usr/local
> 2. install gnustep-make, there I use LDFLAGS='-L/usr/local/lib' 
> CPPFLAGS='-I/usr/local/include/' in the environment when running configure
> 3. install gnustep-base and others. at that time, gnustep-make should have 
> picked up the CPPFLAGS and LDFLAGS from its installation time
>    and should use them.
> 
> hth,
> Sebastian

Hi Sebastian,

Thanks a lot!  That's got me extremely close to having a working system again.  
I'm now left with only one issue.  It appears _Block_copy and _Block_release 
aren't defined anywhere in this run time!

When building gnustep-base I now get:
Making all for ctool gdomap...
 Compiling file gdomap.c ...
 Linking ctool gdomap ...
clang: warning: argument unused during compilation: '-shared-libgcc'
/usr/local/lib/libdispatch.so: undefined reference to `_Block_copy'
/usr/local/lib/libdispatch.so: undefined reference to `_Block_release'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [obj/gdomap] Error 1
make[3]: *** [internal-ctool-all_] Error 2
make[2]: *** [gdomap.all.ctool.variables] Error 2
make[1]: *** [internal-all] Error 2
make: *** [internal-all] Error 2

I tried adding an OBJCFLAGS='-fblocks' to the environment too, but to no avail.

Where should I expect these two symbols to be defined now?  I'd expected them 
to be part of the run time, and indeed, building version 1.5.1 of the runtime 
seems to define them, while the current trunk does not.

Thanks

Tom Davie


reply via email to

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