Re: [Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Mon, 13 Aug 2012 10:49:26 -0400

On Aug 12, 2012, at 11:45 PM, nobody wrote:

> hello,
>
> i am trying to build R on alpine/gentoo with uclibc and it fails with the following
> error msg:
>
> connections.c: In function 'Rconn_fgetc':
> connections.c:3184:11: error: expected identifier before '(' token
> connections.c:3186:15: error: expected identifier before '(' token
> make[3]: *** [connections.o] Error 1
>
> here is the whole build log :http://bpaste.net/show/39955/
> any idea?
>

I suspect that your runtime/libc is defining fgetc as a macro which breaks any code that uses it as an identifier. Ideally, your runtime should be fixed to use a proper function, but you could probably work around it with something like

static char * fix_fgets(char *s, int n, FILE *stream) { return fgets(s, n, stream); } #undef fgets
static char * fgets(char *s, int n, FILE *stream) { return fix_fgets(s, n, stream); }

Cheers,
Simon

> i've *walked* back the versions down to 2.14.1 and i still get exact same
> error msg.
> there are some patches applied but none of them touches connections.c, i
> think. in any case i can provide the patches if need be.
>
> thanks
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 13 Aug 2012 - 14:52:15 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 14 Aug 2012 - 12:00:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive