| March 17, 2010 9:00 AM PDT | |
Problem :
When building xorg-x11-drv-keyboard-1.3.2 application using icc compiler on Linux or Moblin system, an error is reported during compilation. It complains that "struct kbd_repeat" has no field "rate". To produce the bug, set the icc build environment and go to xf86-input-keyboard source folder:
export CC=icc
./configure
make
The gcc build works fine.
Environment :
xorg-x11-drv-keyboard-1.3.2
icc 11.x for linux
gcc 4.x
Linux or Moblin system
Root Cause :
The icc build error is due to the incorrect check during xorg-x11-drv-keyboard confguration. In the application source folder, open file "configure", around line 11926, you will find the code like below:
int main()
{
int main()
{
....;
return 0;
}
;
return 0;
}
The above code can be compiled successfully with gcc while icc will report error.
Resolution :
You can workaround the issue by disable the outer 'main' function. Change the code like below:
// int main()
// {
int main()
{
....;
return 0;
}
// ;
// return 0;
// }
Then you can run 'configure' again and rebuild the application with icc. The build should run successfully.
When building xorg-x11-drv-keyboard-1.3.2 application using icc compiler on Linux or Moblin system, an error is reported during compilation. It complains that "struct kbd_repeat" has no field "rate". To produce the bug, set the icc build environment and go to xf86-input-keyboard source folder:
export CC=icc
./configure
make
The gcc build works fine.
Environment :
xorg-x11-drv-keyboard-1.3.2
icc 11.x for linux
gcc 4.x
Linux or Moblin system
Root Cause :
The icc build error is due to the incorrect check during xorg-x11-drv-keyboard confguration. In the application source folder, open file "configure", around line 11926, you will find the code like below:
int main()
{
int main()
{
....;
return 0;
}
;
return 0;
}
The above code can be compiled successfully with gcc while icc will report error.
Resolution :
You can workaround the issue by disable the outer 'main' function. Change the code like below:
// int main()
// {
int main()
{
....;
return 0;
}
// ;
// return 0;
// }
Then you can run 'configure' again and rebuild the application with icc. The build should run successfully.
Do you need more help?
This article applies to: Intel® C++ Compiler for Linux* Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (0) 
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Yang Wang (Intel)
|

