Bug 41617 - [4.4/4.5/4.6 regression] ObjC: Error: symbol `_OBJC_CLASS_AppController' is already defined
Summary: [4.4/4.5/4.6 regression] ObjC: Error: symbol `_OBJC_CLASS_AppController' is a...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: objc (show other bugs)
Version: 4.4.2
: P4 normal
Target Milestone: 4.4.6
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-07 09:51 UTC by Matthias Klose
Modified: 2010-11-23 09:29 UTC (History)
3 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work: 4.3.4
Known to fail: 4.4.1, 4.5.0
Last reconfirmed: 2010-11-22 19:36:47


Attachments
preprocessed source (133.88 KB, application/x-bzip)
2009-10-07 09:52 UTC, Matthias Klose
Details
assembler file (54.70 KB, application/x-bzip)
2009-10-07 09:53 UTC, Matthias Klose
Details
preprocessed source (133.68 KB, application/x-bzip)
2009-10-07 09:53 UTC, Matthias Klose
Details
assembler file (53.40 KB, application/x-bzip)
2009-10-07 09:54 UTC, Matthias Klose
Details
preprocessed source (133.92 KB, application/x-bzip)
2009-10-07 15:15 UTC, Matthias Klose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2009-10-07 09:51:31 UTC
Seen with a lot of GNUstep applications:

gcc AppController.m -c \
              -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/usr/local/include/GNUstep -I/usr/include/GNUstep \
               -o obj/AppController.m.o
In file included from Date.h:4,
                 from Event.h:3,
                 from AppointmentEditor.h:3,
                 from AppController.m:4:
/usr/include/ical.h:22:2: warning: #warning "#include <ical.h> is deprecated.  Please #include <libical/ical.h> instead."
/tmp/ccdTn0Sv.s: Assembler messages:
/tmp/ccdTn0Sv.s:11021: Error: symbol `_OBJC_CLASS_AppController' is already defined
make[2]: *** [obj/AppController.m.o] Error 1
Comment 1 Matthias Klose 2009-10-07 09:52:35 UTC
Created attachment 18735 [details]
preprocessed source
Comment 2 Matthias Klose 2009-10-07 09:53:08 UTC
Created attachment 18736 [details]
assembler file
Comment 3 Matthias Klose 2009-10-07 09:53:31 UTC
Created attachment 18737 [details]
preprocessed source
Comment 4 Matthias Klose 2009-10-07 09:54:00 UTC
Created attachment 18738 [details]
assembler file
Comment 5 Jakub Jelinek 2009-10-07 12:57:45 UTC
This doesn't even compile, you forgot NXConstStr.h stuff.
When it is added, it compiles just fine, at least on x86_64-linux and i686-linux, no assembler errors.
Comment 6 Matthias Klose 2009-10-07 15:15:42 UTC
Created attachment 18740 [details]
preprocessed source

regenerated with objc/NXConstStr.h included.
Comment 7 Iain Sandoe 2010-11-07 14:18:43 UTC
Is this still a problem?

I cannot reproduce this on i686-darwin9 on trunk or 4.5.2 with :

 ./gcc/xgcc -Bgcc ../tests/AppController_44.mi -c -fgnu-runtime -w
Comment 8 Nicola Pero 2010-11-22 17:39:07 UTC
Matthias,

it looks like this may be an "arm-linux-gnueabi"-specific problem ... it does work for me (as for everyone else) on i686-pc-linux-gnu, but you're clearly on arm-linux-gnueabi.

Can you produce a smaller testcase?  Does it happen with all Objective-C classes?

Thanks
Comment 9 Matthias Klose 2010-11-22 17:56:29 UTC
no, can't see this even with 4.4 now, on a system with binutils 2.21
Comment 10 Nicola Pero 2010-11-22 17:58:44 UTC
So, can I close the bug ?

Thanks
Comment 11 Matthias Klose 2010-11-23 09:29:59 UTC
works on armv5 too, current 4.4 branch and binutils 2.20.1