Red Hat Bugzilla – Bug 488217
Include sdcc 2.9.0 release in Fedora 11
Last modified: 2009-11-24 20:17:50 EST
sdcc 2.9.0 is planned to be released 2009-03-22, see http://sdcc.wiki.sourceforge.net/SDCC+2.9.0+Release.
I think this is a good opportunity to include the new version into Fedora 11, since the sdcc version in Fedora 10 is 2.6.0, which is already 3 years old...
Don't hesitate to contact me if you have any question, suggestion or if you need help.
Thanks for notifying me of the upcoming release. Fedora 9 and 10 both have sdcc version 2.8.0, which was the most recent release the last time I checked. I plan on including 2.9.0 as soon as it is released.
Sorry to state wrong information about the sdcc version in Fedora 9 and 10 :(
I'm looking forward for new sdcc release included in Fedora 11.
Hm, it seems that SDCC 2.9.0 uses a function name that conflicts with stdio (getline). I don't have the time right now to patch around this, so this will delay inclusion of SDCC 2.9.0 quite a bit.
sorry to hear this. I took a look to the Linux getline man page at http://linux.die.net/man/3/getline and I understood that getline is a glibc extension and is defined only if _GNU_SOURCE (or maybe __USE_GNU, which I can see from glibc 2.9 sources) is defined. Are you sure that this two symbols are not defined while compiling sdcc?
Which glibc version exactly will be used in Fedora 11?
Does it make a sense that I prepare the patch for sdcc 2.9.0 sources, renaming getline to something else?
http://cvs.fedoraproject.org/viewvc/rpms/glibc/F-11/glibc.spec?view=markup <-- Looks like glibc 2.9.90 is currently in CVS for Fedora 11.
Ah, maybe we should just undefine _GNU_SOURCE before #including stdio, then, unless something else needs a _GNU_SOURCE symbol from stdio.
You could make a patch like that or we could try undefine-ing _GNU_SOURCE before #including stdio.h.
I'm downloading Fedora 11 pre-release. I'll prepare the patch based on sdcc 2.9.1 from sdcc svn.
Created attachment 342227 [details]
sdcc 2.9.0 patch for Fedora 11
This is the patch, based on sdcc 2.9.0 release sources at http://sourceforge.net/project/downloading.php?group_id=599&filename=sdcc-src-2.9.0.tar.bz2&a=48263598, which fixes gcc 4.4.0 compilation and conflicts with Fedora 11 glibc-2.9.90-19 getline.
Unfortunately there is an other problem: sdcc 2.9.0 pic16 target depends on gputils-0.3.7, while the gputils version included in Fedora 11 pre-release is 0.3.6. This causes errors while building pic16 libraries for some pic models, which are not supported in gputils 0.3.6.
Is it possible to upgrade gputils in Fedora 11 to version 0.3.7?
I compiled the sources on Fedora 11 pre-release without problems.
I also did some investigation about getline inclusion in glibc 2.9.90-19:
- getline is declared in stdlib.h if __USE_XOPEN2K8 is defined
- __USE_XOPEN2K8 is defined in features.h by default
- see also https://bugzilla.redhat.com/show_bug.cgi?id=493941
The version of gputils in devel is also 0.13.6 , so I've filed a bug against that package  asking it to be updated to the most recent release, 0.13.7.
Ok, with the new gputils and the patch we should be golden.
Ok, I had to patch the configure scripts to not use the "-gstabs+" option (which breaks debuginfo extraction).
And F-11: http://koji.fedoraproject.org/koji/taskinfo?taskID=1349268
https://admin.fedoraproject.org/updates/sdcc-2.9.0-1.fc11 <-- there's the update for F-11
> Ok, I had to patch the configure scripts to not use the "-gstabs+" option
> (which breaks debuginfo extraction).
Can you tell me more about that: which operation fails (strip?), what is the error message, where I can find your patched configure script - maybe we should include it to the sdcc tree.
I this as gcc 4.4.0 bug?
I noticed that -gstabs+ option is used only for ucsim, so probably we can remove it.
http://cvs.fedoraproject.org/viewvc/rpms/sdcc/devel/sdcc-2.9.0-configure.diff?revision=1.1&view=markup <-- there's the patch.
The step that fails is the debuginfo extraction step -- I don't have time to get you an error message right now, sorry.
It's not a gcc bug, it's a problem with -gstabs+ debugging info and rpm and it's been around a while (sdcc 2.8.0 in fedora was also patched to remove this flag long before we used gcc 4.4.0).
Also, the main configure script uses -gstabs+.
From the patch I can see that you excluded also -ggdb, -g and -pipe options. Have you done it for the same reason?
For the -ggdb and -g this could be OK, since it probably doesn't make sense to have debug version without symbols, but what about -pipe? It has nothing to do with the debug info...
Sorry to burden you so much, it is not necessary to give me the answer right now if you don't have time.
Thanks for your efforts to get sdcc in Fedora 11!
Well, I'm disabling the modifications of CFLAGS -- Fedora sets its own CFLAGS that include debug info, so SDCC shouldn't do that for us.
The error is pretty much the same one as described here:
You aren't burdening me, I appreciate the prodding to get me to do my job :).
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
This has been in F-11 and working for a while now. Closing.