Hi, Hi, I am using AVR-GCC 4.6.0 to build avr-libc-1.7.1. Following conversation http://savannah.nongnu.org/bugs/?32988 I have applied both Eric's and Joerg's patch: http://svn.sv.gnu.org/viewvc/?view=rev&ro... http://svn.sv.gnu.org/viewvc/?view=rev&ro... I still get build error. avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common -I../../../include -I../../../include -g -Wall -W -Wstrict-prototypes -mmcu=avr2 -D__COMPILING_AVR_LIBC__ -mcall-prologues -Os -Os -fno-jump-tables -DSCANF_LEVEL=SCANF_STD -c -o vfscanf_std.o ../../../libc/stdio/vfscanf.c ../../../libc/stdio/vfscanf.c: In function 'vfscanf': ../../../libc/stdio/vfscanf.c:783:27: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))' make[5]: *** [vfscanf_std.o] Error 1 make[5]: Leaving directory `/home/anitha/patch-upgrade/avr-libc-1.7.1/avr/lib/avr2' make[4]: *** [all-recursive] Error 1 Is this known or am I missing something? Anitha
As Boyapati, Anitha wrote: > ../../../libc/stdio/vfscanf.c:783:27: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'The variable __c is the internal variable used inside the PSTR macro. This variable must be declared "const", which has recently been committed to the tree: r2239 | arcanum | 2011-05-09 19:11:12 +0200 (Mon, 09 May 2011) | 6 lines 2011-05-09 Eric B. Weddington Fix for bug #32988. * include/avr/pgmspace.h: Add const keyword to PSTR definition. * NEWS: Add to fixed bug list. Are you perchance accidentally using an outdated version of the <avr/pgmspace.h> header file (e.g. an installed old version rather than the in-tree new one)?
>-----Original Message-----
>From: Joerg Wunsch [mailto:]
>Sent: Wednesday, June 22, 2011 8:08 PM
>To:
>Cc: Boyapati, Anitha
>Subject: Re: [avr-libc-dev] Build Error?
>
>As Boyapati, Anitha wrote:
>
>> ../../../libc/stdio/vfscanf.c:783:27: error: variable '__c' must be const
>in order to be put into read-only section by means of
>'__attribute__((progmem))'
>
>The variable __c is the internal variable used inside the PSTR macro.
>This variable must be declared "const", which has recently been
>committed to the tree:
>
>r2239 | arcanum | 2011-05-09 19:11:12 +0200 (Mon, 09 May 2011) | 6 lines
>
>2011-05-09 Eric B. Weddington
>
> Fix for bug #32988.
> * include/avr/pgmspace.h: Add const keyword to PSTR definition.
> * NEWS: Add to fixed bug list.
>
>Are you perchance accidentally using an outdated version of the
><avr/pgmspace.h> header file (e.g. an installed old version rather
>than the in-tree new one)?
>Hmm, I am using 1.7.1 release version. Let me see what the differences are..
Anitha