Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

An error of ICC "export: 27: Illegal option -n"

xforcex
Beginner
798 Views
Hi guys,

Recently, I tried to setup our own SCC platform. But there is a problem when I use 'icc'. It complained 'export: 27: Illegal option -n'? Does anyone know how to tackle this problem then?

Here is a screenshot below:


I'm looking forward to any answer. Thanks for taking time to reply.

Best,
Yubei
0 Kudos
7 Replies
Feilong_H_Intel
Employee
798 Views
Hi Yubei,

Your screenshot is not uploaded properly. Its location points to your hard drive file:///C:/Users/XforceX/Desktop/1.png, which nobody else can see it. You need to upload it by clicking the "Add files" botton right above this edit box, and then insert it in this post by clicking the "Insert/edit image" button.

Thanks,
Feilong
0 Kudos
xforcex
Beginner
798 Views
Hi Feilong,

Thanks for your instructions. I've updated the screenshot. It's nothing too special.
I also tried to pinpoint the problem and found something interesting in /opt/intel_cc_80/bin/icc, showed below:

export -n IA32ROOT; unset IA32ROOT;//I don't know why we use the option '-n' here, this lead to the complaint: 'export 27: Illegal option -n';

When I removed '-n' and tried again, another error happened:
'exec: 34: -a: not found'
I think it was caused by the sentences below:

if [ $# != 0 ]

then

exec -a "/opt/intel_cc_80//bin/icc" /opt/intel_cc_80//bin/iccbin "$@";

else

exec -a "/opt/intel_cc_80//bin/icc" /opt/intel_cc_80//bin/iccbin;

fi

So could you come up with some solutions then?

Best,
Yubei

0 Kudos
TimP
Honored Contributor III
798 Views
If you can give a reason for wanting it, you could file a feature request for the command "icc" with no files specified to give a response more like gcc.
As it is, I can't see what problem you would like to solve.
I've sometimes wished that "icc -v" would give a response more like "gcc -v" including showing which tool versions are active. I can't assume this is related to your "problem."
0 Kudos
xforcex
Beginner
798 Views
Hi Feilong,

I think I somehow worked it out.
I just removed the option '-n', and I also removed' -a "/opt/intel_cc_80//bin/icc" '.
There are still some strange things. I found I can use [-a name] option for exec command, but it did not seem to work to use this option onmy presenthost with SCC which is running a Ubuntu 10.04.
Anyway, I can successfully use icc to compile my application now. Thanks you again.

Best,
Yubei
0 Kudos
xforcex
Beginner
798 Views
Hi TimP,

Yep, you are right. I tried this way but failed. I re-wrote and corrected the shell 'icc'. It seems to work well now. Anyway, thanks for your help.

Best,
Yubei
0 Kudos
TimP
Honored Contributor III
798 Views
The current icc should have full support for installation on Ubuntu 10.04. Instructions are posted at the top of this forum which should help if you install icc 11.1. In either case, compiler paths etc. have changed a lot since icc 8.0, so you would need to change your scripts and environment variables accordingly. I wouldn't care to attempt installation of icc 8.0 on a new linux version.
0 Kudos
xforcex
Beginner
798 Views
Hi TimP,

In fact, theiccfor SCC platform is the version 8.1.038. There is not newer version for SCC I think, or at least there is not a new version like icc 11.1 for SCC.

Best,
Yubei
0 Kudos
Reply