| July 2, 2009 1:00 AM PDT | |
Cause:
This error occurs only when the LANG environment variable is set to an invalid locale. The compiler makes a call to setlocale() and if it fails then it issues this error. For example:
$ export LANG=NULL
$ icc -c -V hello.cpp
Intel(R) C Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
Catastrophic error: could not set locale "" to allow processing of multibyte characters
compilation aborted for hello.cpp (code 4)
Resolution:
To work around this error set "LANG" to a valid locale like "LANG=C" or "LANG=en_US.UTF-8". Some systems may require that you set "LC_ALL=en_US" in addition to setting LANG.
$ export LANG=C
$ icc -c -V hello.cpp
Intel(R) C Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
$ export LANG=en_US.UTF-8
$ export |grep LANG
declare -x LANG="en_US.UTF-8"
$ icc -c -V hello.cpp
Intel(R) C Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.0 Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
$
This article applies to: Intel® C++ Compiler for Linux* Knowledge Base, Intel® C++ Compiler for Mac OS X* Knowledge Base, Intel® C++ Compiler for Windows* Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (7) 
| February 24, 2009 9:21 AM PST
Frank | I got the same error while compiling openmpi-1.3 with version 11.0.081 of the Intel Compiler Suite on Debian Lenny (2.6.26-1-amd64 #1 SMP x86_64 on Intel Xeon E5420). I have to set LANG to C instead of en_US.UTF-8 to get it working. Thanks Manuel! |
| May 6, 2009 3:28 AM PDT
nicola |
in my system do export LANG=en_US.UTF-8 export LC_ALL=en_US an then it works |
| July 3, 2009 1:38 PM PDT
Sebastien |
I try every combination possible of C/en_US for LANG and LC_ALL without success on Intel(R) C Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.1 Build 20090511 with ubuntu 8.10 and custom built 2.6.28.10 |
| July 3, 2009 1:51 PM PDT
Sebastien | for me I needed to set LC_ALL=en_US.UTF-8 for it to work because LC_ALL=en_US did not work |
| July 8, 2009 8:04 PM PDT
Akio Yasu (Intel)
|
I think this issue is more likely affected by LC_CTYPE rather than LANG setting. In my system Ubuntu 8.04, even if LANG=NULL, it worked under LC_CTYPE=C or en_US.UTF-8, whatever values shown by "locale -a". |
| December 7, 2009 5:03 AM PST
Igor |
Thank you very much! I received this problem when I passed to Ubuntu 9.10 from 9.04. Your article helped me to desolve it. I used LANG=C |
Trackbacks (0)
Leave a comment 
Jennifer Jiang (Intel)
| ||
Mark Sabahi (Intel)
|


Manuel