Summary: | dev-lang/R: /usr/lib/R/etc/Makeconf should have -std=gnu99 in CFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Aarre Laakso <aarre> |
Component: | New packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | 2006.0 | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://www.laakshmi.com/aarre/wiki/index.php/Incident_2006-10-21.01 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Aarre Laakso
2006-10-22 08:28:48 UTC
Hi Aarre, Thanks for pointing this out! I looked into this and it indeed looks like we should append -std=gnu99 to CFLAGS. I've just changed this in the ebuild for R-2.4.0. Thanks, Markus Can we do -std=c99 instead, or does it actually use the gnu-specific extensions? (In reply to comment #2) > Can we do -std=c99 instead, or does it actually use the gnu-specific > extensions? > Their docs state that ".. the C compiler should be IEC 600596, POSIX 1003.1 and C99-compliant..". As far as I know, std=c99 will not cover POSIX compliance but std=gnu99 will. I might be wrong though. Thanks, Markus A little searching suggests you are right, but I couldn't actually find it anywhere in official documentation. I see that this is marked "RESOLVED FIXED" (thank you!) but FYI (or in case it should come up again), the R Installation and Administration manual (downloaded 10/28/06 3:40am EDT): http://cran.r-project.org/doc/manuals/R-admin.html which is "official documentation", states specifically and clearly that -std=gnu99 as opposed to -std=c99 is required because of POSIX compliance: "You need a means of compiling C and FORTRAN 77 (see Using FORTRAN). Some add-on packages also need a C++ compiler. Your C compiler should be IEC 600596, POSIX 1003.1 and C99-compliant if at all possible. R tries to choose suitable flags for the C compilers it knows about, but you may have to set CFLAGS suitably. For recent versions of gcc with glibc this means including -std=gnu99 in CFLAGS (-std=c99 excludes POSIX functionality)." Oh, and keep in mind that this CFLAGS setting (in /usr/lib/R/etc/Makeconf) is used *only* for compiling R add-on packages. It does not affect your environment CFLAGS, so will not cause changes with compiling anything other than R add-on packages. |