- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just updated my Linux machine from Ubuntu 10.10 where icc 12.0.3 20110309 worked fine to 11.04. I am getting this error:
Does anyone have an idea as to how to fix this?
[bash]/usr/include/linux/errno.h(4): catastrophic error: cannot open source file "asm/errno.h" #include^ [/bash]
Does anyone have an idea as to how to fix this?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The short answer is: install the package gcc-multilib on Ubuntu 11.04. This will set up symbolic links that will restore /usr/include/linux/* to the same workable state it was in for 10.10.
Intel reps point out that (1) Ubuntu 11.04 is not a supported distro for the Intel compilers, and (2) the release notes do say that "If developing on an Intel 64 architecture system, some Linux distributions may require ... gcc-multilib" (among other packages).
References:
http://software.intel.com/en-us/articles/intel-c-composer-xe-2011-release-notes/
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/774215
Intel reps point out that (1) Ubuntu 11.04 is not a supported distro for the Intel compilers, and (2) the release notes do say that "If developing on an Intel 64 architecture system, some Linux distributions may require ... gcc-multilib" (among other packages).
References:
http://software.intel.com/en-us/articles/intel-c-composer-xe-2011-release-notes/
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/774215
Link Copied
22 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The kernel sources may help. Please install them and then try compiling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sadly, it does not... Unless I missed something on how Ubuntu packages things and I need one of the obscure headers?
$ aptitude search linux-headers
v linux-headers -
v linux-headers-2.6 -
i linux-headers-2.6.38-8 - Header files related to Linux kernel version 2.6.38
i A linux-headers-2.6.38-8-generic - Linux kernel headers for version 2.6.38 on x86/x86_64
i linux-headers-2.6.38-8-server - Linux kernel headers for version 2.6.38 on x86_64
i linux-headers-2.6.38-8-virtual - Linux kernel headers for version 2.6.38 on x86/x86_64
i linux-headers-generic - Generic Linux kernel headers
v linux-headers-lbm -
v linux-headers-lbm-2.6 -
p linux-headers-lbm-2.6.38-8-generic - Header files related to linux-backports-modules version 2.6.38
p linux-headers-lbm-2.6.38-8-server - Header files related to linux-backports-modules version 2.6.38
p linux-headers-server - Linux kernel headers on Server Equipment.
p linux-headers-virtual - Linux kernel headers for virtual machines
$ aptitude search linux-headers
v linux-headers -
v linux-headers-2.6 -
i linux-headers-2.6.38-8 - Header files related to Linux kernel version 2.6.38
i A linux-headers-2.6.38-8-generic - Linux kernel headers for version 2.6.38 on x86/x86_64
i linux-headers-2.6.38-8-server - Linux kernel headers for version 2.6.38 on x86_64
i linux-headers-2.6.38-8-virtual - Linux kernel headers for version 2.6.38 on x86/x86_64
i linux-headers-generic - Generic Linux kernel headers
v linux-headers-lbm -
v linux-headers-lbm-2.6 -
p linux-headers-lbm-2.6.38-8-generic - Header files related to linux-backports-modules version 2.6.38
p linux-headers-lbm-2.6.38-8-server - Header files related to linux-backports-modules version 2.6.38
p linux-headers-server - Linux kernel headers on Server Equipment.
p linux-headers-virtual - Linux kernel headers for virtual machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi YannGolanski,
why due this ?
#include "asm/errno.h"
i have following include in my source and can compile with the icc 12.03 under openSUSE 12.1 64 Bit witout any errormessage
my include #include
no other and it can compile without problems
regards
Franz
why due this ?
#include "asm/errno.h"
i have following include in my source and can compile with the icc 12.03 under openSUSE 12.1 64 Bit witout any errormessage
my include #include
no other and it can compile without problems
regards
Franz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Retry search with the number of your kernel that you see in folder /lib/modules
you have (kbuild) and other sources package associated your kernel, the word headers is not complete reference.
(aptitude)
also maybe, install kernel source package, better I think.
Regards
Retry search with the number of your kernel that you see in folder /lib/modules
you have (kbuild) and other sources package associated your kernel, the word headers is not complete reference.
(aptitude)
also maybe, install kernel source package, better I think.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a simple test case to show the bug and a solution!!! Still, there is either something very wrong with the asm set of headers in Ubuntu 11.04 or in the way ICC expect to find them.
EDIT: The kernel source oackage does not help at all. I get the same error.
A more elegant solution/explanation is still needed.
EDIT: The kernel source oackage does not help at all. I get the same error.
A more elegant solution/explanation is still needed.
[bash]$ cat bug.cc #includeint main (int argc, char ** argv) { return 0; } $ icc bug.cc /usr/include/linux/errno.h(4): catastrophic error: cannot open source file "asm/errno.h" #include ^ compilation aborted for bug.cc (code 4) $ icc --version icc (ICC) 12.0.3 20110309 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. $ cat /usr/include/linux/errno.h #ifndef _LINUX_ERRNO_H #define _LINUX_ERRNO_H #include #endif $ icc -I/usr/include/x86_64-linux-gnu/asm bug.cc $ ./a.out $ echo $? 0[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> A more elegant solution/explanation is still needed.
That will have to come from the Linux distro vendor -- Ubuntu or its parent, Debian.
An alternative solution that does not involve changing system header files such as errno.h: create the subdirectory /usr/include/asm, then do (in a login with appropriate write privileges)
touch /usr/include/asm/errno.h
That will create an empty file. Since you are able to compile without including the file, things should work fine when an empty file is included.
That will have to come from the Linux distro vendor -- Ubuntu or its parent, Debian.
An alternative solution that does not involve changing system header files such as errno.h: create the subdirectory /usr/include/asm, then do (in a login with appropriate write privileges)
touch /usr/include/asm/errno.h
That will create an empty file. Since you are able to compile without including the file, things should work fine when an empty file is included.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
In DEBIAN squeeze 6 (64)
(/usr/asm/errno.h ) contain only 1 line:
#include
just
verify that you have repertory /usr/include/asm-generic with errno.h and others files headers,
more prudent that an blank file
Regards
In DEBIAN squeeze 6 (64)
(/usr/asm/errno.h ) contain only 1 line:
#include
just
verify that you have repertory /usr/include/asm-generic with errno.h and others files headers,
more prudent that an blank file
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alas, mecej4's suggestion is wrong and would not work. /usr/include/asm already exists on Ubuntu 11.04.
This issue arises in part because /usr/include/asm was changed from a real directory on 10.10 to a symlink on 11.04. The symlink now points to an architecture-specific directory; on my 64-bit system, it points to x86_64-linux-gnu/asm.
But the bottom line is that any compiler that can resolve symbolic links should be able to find any file formerly in /usr/include/asm, whether asm is a directory or a symlink to another place. In fact, on 11.04, resolves just fine after several symlink redirections to the real file /usr/include/asm-generic/errno.h.
GCC finds the redirected file just fine. Can ICC really not find it?
This issue arises in part because /usr/include/asm was changed from a real directory on 10.10 to a symlink on 11.04. The symlink now points to an architecture-specific directory; on my 64-bit system, it points to x86_64-linux-gnu/asm.
But the bottom line is that any compiler that can resolve symbolic links should be able to find any file formerly in /usr/include/asm, whether asm is a directory or a symlink to another place. In fact, on 11.04,
GCC finds the redirected file just fine. Can ICC really not find it?
[cpp]#include#include int main() { printf("nECHRNG's number is %d.nn", ECHRNG); return 0; } [/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc ought to try the include search paths set up by the active g++ -print-search-dirs. If you have a different g++ on PATH, all bets are off.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Is strange ...
include or with ICC 12.0.2 (64 version) work perfectly Linux debian Squeeze 6
I have only GNU compiler 4.6.0 is added are not origin distribution
Probably bug in 12.0.3
Regards
Is strange ...
include
I have only GNU compiler 4.6.0 is added are not origin distribution
Probably bug in 12.0.3
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Web search revealed that the Ubuntu bug seems to have been noticed recently:
[Bug 778047] [NEW] /usr/include/linux/errno.h refers to non-existentasm/errno.h
You can find a suggested work-around there.
[Bug 778047] [NEW] /usr/include/linux/errno.h refers to non-existentasm/errno.h
You can find a suggested work-around there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like there might be an dependency problem according to that article that mecej4 posted. However, I wanted to clarify that Ubuntu 11.04 is not an officially supported operating system. For more information see the Release Notes at http://software.intel.com/en-us/articles/intel-c-composer-xe-2011-release-notes/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The link given by mecej4 also reports a problem with *intel* compiler, gcc works fine.
There is another strange thing, when I try to use -E flag, i.e. icc -E bug.cc the preprocessors works ok and the resuting file can be compiled with icc. Is it normal?
Thank you.
There is another strange thing, when I try to use -E flag, i.e. icc -E bug.cc the preprocessors works ok and the resuting file can be compiled with icc. Is it normal?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is an interesting finding. My (uneducated) guess is that there may be a problem with following symlinked directories or including a symlinked header file during the preprocessing phase. If the -E flag causes a different preprocessor to be used that does not share these disabilities, your findings would be explained.
Although Intel disclaims support for for Ubuntu, these clues should not take too much effort to follow up.
Although Intel disclaims support for for Ubuntu, these clues should not take too much effort to follow up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The short answer is: install the package gcc-multilib on Ubuntu 11.04. This will set up symbolic links that will restore /usr/include/linux/* to the same workable state it was in for 10.10.
Intel reps point out that (1) Ubuntu 11.04 is not a supported distro for the Intel compilers, and (2) the release notes do say that "If developing on an Intel 64 architecture system, some Linux distributions may require ... gcc-multilib" (among other packages).
References:
http://software.intel.com/en-us/articles/intel-c-composer-xe-2011-release-notes/
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/774215
Intel reps point out that (1) Ubuntu 11.04 is not a supported distro for the Intel compilers, and (2) the release notes do say that "If developing on an Intel 64 architecture system, some Linux distributions may require ... gcc-multilib" (among other packages).
References:
http://software.intel.com/en-us/articles/intel-c-composer-xe-2011-release-notes/
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/774215
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know that ICC is not supported on 11.04. I was asking for help and reporting a bug that should help in making ICC portable to 11.04. :)
Installing gcc-multilib did solve the problem but now I am hitting the gcc 4.5.0 bug as described in http://software.intel.com/en-us/forums/showthread.php?t=74691 which should be fixed by 12 but it not on my system.
Is the error I am now getting.
Installing gcc-multilib did solve the problem but now I am hitting the gcc 4.5.0 bug as described in http://software.intel.com/en-us/forums/showthread.php?t=74691 which should be fixed by 12 but it not on my system.
[bash]/usr/include/c++/4.5/iomanip(64): error: expected an expression { return { __mask }; } [/bash]
Is the error I am now getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you read to the end of the threads on this gcc 4.5 problem, you will see that icpc -std=c++0x is required for acceptance of the which uses c++0x syntax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@TimP: Well, that was an amazing fail for me... ;>
Thanks!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Yann,
Hope you got the solution beforehand. If not try to follow the instruction. I have lenovo z560, with ubuntu 11.04. & I had the same problem as you which i resolved it in the following way:
Since the problem is arising because of the invalid link given in /usr/include/linux/errno.h (i.e. #include , where this asm dir. is not located in /usr/include but in some wrong place, /usr/include/x86_64-linux-gnu, inside that errno.h is sitting; which again redirects to the /usr/include/asm-generic. So all you need to make a symbolic link of the main dir. holding errno.h, to the specified directory. Ok?) ;
You need to create a shortcut link to /usr/include by the following way:
sudo ln -s /usr/include/asm-generic /usr/include/asm
So, do it. and hopefully you are out of the trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm on Ubuntu 11.04 and icc 12.
All I had to do was make a symbolic link:
cd /usr/include
sudo ln -s ./asm-generic/ ./asm
Works great for me!
All I had to do was make a symbolic link:
cd /usr/include
sudo ln -s ./asm-generic/ ./asm
Works great for me!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page