You are not logged in.
I'm getting 'expected declaration' and 'undeclared (first use in this function' errors spewed across my screen when compiling ANY C programs or scripts e.g., cwrapper, mingetty. I'd be more specific but the errors vary across compilations.
Example compiling mingetty:
In file included from mingetty.c:28:
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory
In file included from /usr/include/stdio.h:75,
from mingetty.c:28:
/usr/include/libio.h:53:21: error: stdarg.h: No such file or directory
In file included from /usr/include/stdio.h:75,
from mingetty.c:28:
I already have the base-devel group and gcc package installed. What's more, all C scripts compiled fine up until a few hours ago.
I'm in the process of a fresh Arch install so can't remember the exact steps leading up to the problem, but I do remember running a 'pacman -Syu'.
Any idea what the problem is?
Last edited by slyson (2009-09-22 13:15:57)
Offline
In file included from finit-arc.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 finit-arc.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 finit-arc.c:1:
You're probably missing stddef.h and stdarg.h (in /usr/lib/gcc/something/4.4.1/include/). All the other errors are a result of this.
Try reinstalling gcc, since it owns them. But before doing that, please confirm that they do not, in fact, exist.
Last edited by Peasantoid (2009-09-21 23:23:53)
Offline
Do you have klibc installed?
Offline
I've tried re-installing gcc and klibc and I already have the files that are claimed missing:
pacman -Ql gcc G stddef.h\|stdarg.h
gcc /usr/lib/gcc/i686-pc-linux-gnu/4.4.1/include/cross-stdarg.h
gcc /usr/lib/gcc/i686-pc-linux-gnu/4.4.1/include/stdarg.h
gcc /usr/lib/gcc/i686-pc-linux-gnu/4.4.1/include/stddef.h
.... and actually I've edited the original post to avoid confusion because the error I pasted originally was another users problem from another thread. Now I've changed it to the errors from compiling mingetty - although the errors are still the same.
Last edited by slyson (2009-09-22 14:53:36)
Offline
Yes, but does -Ql only list existing files? Or does it just tell you what's supposed to be in the package? Try -Qk instead. (pacman -Qk gcc)
Offline
pacman -Qk gcc
gcc: 1504 total, 0 missing file(s)
...and said files do exist on the disk.
Last edited by slyson (2009-09-21 23:52:14)
Offline
cwrapper was causing the problem. I commented out these lines (that the cwrapper post install script recommends) in my .zshrc:
export PATH='/usr/lib/cw:$PATH"
export NOCOLOR_PIPE=1
I suspect it is something to do with the path line so I'll get back with a solution soon.
Last edited by slyson (2009-09-22 13:19:49)
Offline