Public bug reported:
Binary package hint: gcc-4.3
System: up-to-date (k)ubuntu 8.10 32-bit.
$ apt-cache policy gcc
gcc:
Installed: 4:4.3.1-1ubuntu2
$ gcc --version
gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2
When compiling a source file with just the following two include
statements, gcc crashes:
#include <linux/socket.h>
#include <net/if.h>
When compiling, the following output is generated:
-------------------------
$ gcc bug.c -O3
In file included from /usr/include/linux/socket.h:23,
from candrv.c:1:
/usr/include/linux/uio.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘iov_length’
/usr/include/linux/uio.h:47: error: expected declaration specifiers or ‘...’
before ‘size_t’
In file included from /usr/include/sys/uio.h:29,
from /usr/include/sys/socket.h:28,
from /usr/include/net/if.h:27,
from candrv.c:2:
/usr/include/bits/uio.h:45: error: redefinition of ‘struct iovec’
In file included from /usr/include/sys/socket.h:36,
from /usr/include/net/if.h:27,
from candrv.c:2:
/usr/include/bits/socket.h:149: error: redefinition of ‘struct sockaddr’
/usr/include/bits/socket.h:162: error: redefinition of ‘struct
__kernel_sockaddr_storage’
/usr/include/bits/socket.h:172: error: expected identifier before numeric
constant
/usr/include/bits/socket.h:220: error: redefinition of ‘struct msghdr’
/usr/include/bits/socket.h:238: error: redefinition of ‘struct cmsghdr’
/usr/include/bits/socket.h:249: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccICeSlf.out file, please attach this to
your bugreport.
Traceback (most recent call last):
File "/usr/share/apport/gcc_ice_hook", line 34, in <module>
pr.write(open(apport.fileutils.make_report_path(pr), 'w'))
IOError: [Errno 13] Permission denied:
'/var/crash/_usr_lib_gcc_i486-linux-gnu_4.3.2_cc1.1006.crash'
-----------------
I agree that including those two header-files is not quite correct, but
gcc should not crash anyway.
** Affects: gcc-4.3 (Ubuntu)
Importance: Undecided
Status: New
--
gcc crashes compiling linux include files
https://bugs.launchpad.net/bugs/320366
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs