Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#11971 - gcc can't compile "hello, world!" in a directory with a subdirectory called "gcc"
Attached to Project:
Arch Linux
Opened by Michael Vanier (mvanier) - Monday, 03 November 2008, 08:43 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 06 November 2008, 20:17 GMT
Opened by Michael Vanier (mvanier) - Monday, 03 November 2008, 08:43 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 06 November 2008, 20:17 GMT
|
DetailsDescription:
I found a bug which makes the Arch ABS package for drscheme fail to compile; however, this bug has nothing to do with drscheme itself. Drscheme happens to have a subdirectory called "gcc", and apparently, this makes the Arch version of gcc very unhappy. Here is a very simple example. Take this file, called "hello.c": #include <stdio.h> int main(void) { printf("hello, world!\n"); return 0; } Then make a subdirectory in the same directory where "hello.c" lives, and call it "gcc": % mkdir gcc Then try to compile "hello.c": % gcc hello.c You get this output: > gcc hello.c In file included from hello.c:1: /usr/include/stdio.h:34:21: error: stddef.h: No such file or directory In file included from /usr/include/stdio.h:75, from hello.c:1: /usr/include/libio.h:53:21: error: stdarg.h: No such file or directory In file included from /usr/include/stdio.h:75, from hello.c:1: /usr/include/libio.h:332: error: expected specifier-qualifier-list before ‘size_t’ /usr/include/libio.h:364: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:373: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:489: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/libio.h:491: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/libio.h:493: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_sgetn’ In file included from hello.c:1: /usr/include/stdio.h:312: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:319: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:347: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/stdio.h:352: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/stdio.h:355: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/stdio.h:361: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:363: error: format string argument not a string type /usr/include/stdio.h:365: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:366: error: expected declaration specifiers or ‘...’ before ‘__gnuc_va_list’ /usr/include/stdio.h:367: error: format string argument not a string type /usr/include/stdio.h:678: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread’ /usr/include/stdio.h:684: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite’ /usr/include/stdio.h:706: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread_unlocked’ /usr/include/stdio.h:708: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite_unlocked’ What's worse is that the compile goes smoothly if you give an explicit path for gcc: % /usr/bin/gcc hello.c % a.out hello, world! However, the gcc in the path is definitely /usr/bin/gcc: % which gcc /usr/bin/gcc This is driving me crazy, so I hope you can figure out what's going on. Additional info: * package version(s) gcc 4.3.2 * config and/or log files etc. Steps to reproduce: See above. |
This task depends upon
Closed by Andreas Radke (AndyRTR)
Thursday, 06 November 2008, 20:17 GMT
Reason for closing: Not a bug
Thursday, 06 November 2008, 20:17 GMT
Reason for closing: Not a bug
http://www.linux.org/docs/ldp/howto/Path-5.html