discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Linking problems with gcc 4.6.1 and GNUstep trunk


From: Sebastian Reitenbach
Subject: Re: Linking problems with gcc 4.6.1 and GNUstep trunk
Date: Tue, 21 Feb 2012 00:38:51 +0100
User-agent: SOGoMail 1.3.12

Hi,

On Monday, February 20, 2012 23:00 CET, Philippe Roussel <p.o.roussel@free.fr> 
wrote:

> Hi,
>
> Using gcc 4.6.1, the GNU runtime and GNUstep trunk I get this when
> building for example gap/system-apps/Addresses/Goodies/adserver :
>
> > This is gnustep-make 2.6.2. Type 'make print-gnustep-make-help' for help.
> > Making all for tool adserver...
> >  Linking tool adserver ...
> > ./obj/adserver.obj/adserver.m.o:(.data.rel+0x10): undefined reference to 
> > `__objc_class_name_ADPublicAddressBook'
> > ./obj/adserver.obj/adserver.m.o:(.data.rel+0x30): undefined reference to 
> > `__objc_class_name_ADLocalAddressBook'
> > collect2: ld a retourné 1 code d'état d'exécution
> > make[3]: *** [obj/adserver] Erreur 1
> > make[2]: *** [internal-tool-all_] Erreur 2
> > make[1]: *** [adserver.all.tool.variables] Erreur 2
> > make: *** [internal-all] Erreur 2
>
> GNUmakefile
>
> > include $(GNUSTEP_MAKEFILES)/common.make
> >
> > TOOL_NAME=adserver
> >
> > adserver_OBJC_FILES=adserver.m
> > adserver_OBJCFLAGS=-I../Frameworks -Wall
> > adserver_LDFLAGS=\
> >     -L../Frameworks/Addresses/Addresses.framework/Versions/A     \
> >     -lAddresses
> > -include GNUmakefile.preamble
> > -include GNUmakefile.local
> > include $(GNUSTEP_MAKEFILES)/tool.make
> > -include GNUmakefile.postamble
>
> Linking command
>
> > gcc  -rdynamic -L../Frameworks/Addresses/Addresses.framework/Versions/A 
> > -lAddresses     -pthread -shared-libgcc -fexceptions -fgnu-runtime -o 
> > obj/adserver \
> >             ./obj/adserver.obj/adserver.m.o \
> >                  -L/home/philou/GNUstep/Library/Libraries 
> > -L/opt/GNUstep-trunk/Local/Library/Libraries 
> > -L/opt/GNUstep-trunk/System/Library/Libraries     -lgnustep-base   
> > -lpthread -lobjc   -lm
>
> If I modify the makefile like this
>
> > --- GNUmakefile     1 May 2007 23:08:38 -0000       1.1
> > +++ GNUmakefile     20 Feb 2012 21:57:05 -0000
> > @@ -5,8 +5,8 @@
> >  adserver_OBJC_FILES=adserver.m
> >  adserver_OBJCFLAGS=-I../Frameworks -Wall
> >  adserver_LDFLAGS=\
> > -   -L../Frameworks/Addresses/Addresses.framework/Versions/A     \
> > -   -lAddresses
> > +   -L../Frameworks/Addresses/Addresses.framework/Versions/A
> > +ADDITIONAL_TOOL_LIBS+=-lAddresses
> >  -include GNUmakefile.preamble
> >  -include GNUmakefile.local
> >  include $(GNUSTEP_MAKEFILES)/tool.make
>
> it all works and the linking command is
>
> > gcc  -rdynamic -L../Frameworks/Addresses/Addresses.framework/Versions/A     
> > -pthread -shared-libgcc -fexceptions -fgnu-runtime -o obj/adserver \
> >             ./obj/adserver.obj/adserver.m.o \
> >                  -L/home/philou/GNUstep/Library/Libraries 
> > -L/opt/GNUstep-trunk/Local/Library/Libraries 
> > -L/opt/GNUstep-trunk/System/Library/Libraries   -lAddresses   
> > -lgnustep-base   -lpthread -lobjc   -lm
>
> Is this a problem in gnustep-make, gcc, the makefile ?

With gcc-4.2.1, I first ran into a problem, that it did not found the header, 
so I guess, you already have a version of Addresses installed in the system 
already. After fixing that, gcc then complained, that it is unable to find 
-lAddresses. So also here I think, it picked up the libAddresses.so which is 
installed in your system. Something between this version, and the version of 
the code your are compiling seems to be different.

However, I think I fixed all GNUmakefiles for all Goodies.
Those Goodies are "old" and definitely need a review. So if you find problems 
with those, or even better have patches, let us know.
Best would be via GAP bugtracker or on one of the GAP mailing lists.

cheers,
Sebastian



>
> Philippe
>
> _______________________________________________
> 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]