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

source compilervars.sh returns error

arnaud_g_1
Beginner
1,043 Views

Plateform : Linux Fedora 22

Intel compilers_and_libraries_2016.0.109

Building R-3.2.2 from source with ICC

% source /opt/intel/bin/compilervars.sh intel64
get_library_directory:1: no matches found: s/^ //

 

R build fine when ignoring this error, but I wonder if I should indeed take care of it.

Thank you for help.

0 Kudos
1 Solution
Shenghong_G_Intel
1,043 Views

@Amaud, @Kittur,

I think this issue is related to the shell you are using. In my memory, we have similiar issues reported for zsh long ago.

It should be same with this thread: https://software.intel.com/en-us/forums/topic/515823

You may switch to "bash" or workaround by changing the script mentioned in above thread.

Hope it helps.

Thanks,

Shenghong

View solution in original post

0 Kudos
11 Replies
Kittur_G_Intel
Employee
1,043 Views

 @Amaud,  there's no such error coming from our compiler and verified this within our dev group as well. So, you should make sure that the entire package was installed. Check the scripts themselves to make sure they check out? The error is not any kind of function or procedure in our scripts and I suspect that it probably is a supplemental problem about not finding the needed tools to run teh script on that system. 
What you can try:
1) Log on to the another system, install the package completely and try to see if it can reproduce?
2) Or uninstall and reinstall on the existing system fully and try? It looks like some tools may not be on the system for the scripts to execute correctly may be? Try the same on another system as well.

Let me know what you find, thx.

_Kittur 

 

0 Kudos
Shenghong_G_Intel
1,044 Views

@Amaud, @Kittur,

I think this issue is related to the shell you are using. In my memory, we have similiar issues reported for zsh long ago.

It should be same with this thread: https://software.intel.com/en-us/forums/topic/515823

You may switch to "bash" or workaround by changing the script mentioned in above thread.

Hope it helps.

Thanks,

Shenghong

0 Kudos
arnaud_g_1
Beginner
1,043 Views
% echo $SHELL
/bin/zsh

Thank you.

0 Kudos
Kittur_G_Intel
Employee
1,043 Views

@Amaud @Shenghong
Thanks, this is interesting in  that there is an issue filed against this some 2 years ago but hasn't been addressed. Amaud, the reason I guess is that very rarely (if at all) I've come across anyone using zsh at all on our platforms supported (linux* and variants etc). That said, I have filed an issue against the product (the previously submitted one was against the libraries per-se) and I'll keep you updated accordingly. You can either switch to bash or use the workaround as pointed to in the previously mentioned link.  Thanks for bringing this to our attention.

_Kittur

0 Kudos
Kittur_G_Intel
Employee
1,043 Views

@Amaud: 
As workaround I would suggest you to unset extendedglob before running compilervars.sh: 
% unsetopt extendedglob 

_Kittur

0 Kudos
arnaud_g_1
Beginner
1,043 Views

Kittur Ganesh (Intel) wrote:

@Amaud: 
As workaround I would suggest you to unset extendedglob before running compilervars.sh: 
% unsetopt extendedglob 

_Kittur

Thank you. I will add this my build script

 

0 Kudos
Kittur_G_Intel
Employee
1,043 Views

Also, will update you as soon as the release with a fix for this issue is out. Appreciate your patience till then.

_Kittur 

0 Kudos
arnaud_g_1
Beginner
1,043 Views

I added unsetopt extendedglob in my build script, right before sourcing  compilervars.sh. I am left with an error:

+ unsetopt extendedglob
/var/tmp/rpm-tmp.KhVgXY: line 37: unsetopt: command not found

and the build stops

0 Kudos
Kittur_G_Intel
Employee
1,043 Views

@Arnaud:

Hi tried and it works fine. Here's a test I did on my system:

%cat foo.zsh
#!/bin/zsh
gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e s/^\ //`

Now invoking zsh
%zsh
% source ./foo.zsh
foo.zsh:2: no matches found: s/^ //

Now invoke unsetopt command from the shell
%unsetopt extendedglob

Now sourcing the script works fine
% source ./foo.zsh
%

Try to follow the above on your terminal and it should work. You are supposed to unsetopt before you execute the script in the zshell per-se. Hope that helps.  

BTW, the developer will be putting a fix for this issue and should be in the next update release and I'll keep you updated. Appreciate your patience till then.
_Kittur

0 Kudos
arnaud_g_1
Beginner
1,043 Views

I uses this hack and ot works. 

The only remaining issue is I am writing a rpm spec file (rpm build script) and have unsetopt extendedglob is not recognized as a valid option. For now I run the command manually in my shell, but I would be happy to include it in my build script until your next release.

0 Kudos
Kittur_G_Intel
Employee
1,043 Views

I tried the below and it worked for me:

%setopt extendedglob
%cat foo.zsh
#!/bin/zsh
gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e s/^\ //`

%source ./foo.zsh
./foo.zsh:2: no matches found: s/^ //

Now I added unsetopt command in the script file foo.zsh
%cat foo.zsh
#!/bin/zsh
unsetopt extendedglob
gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e s/^\ //`

% source ./foo.zsh
%

Works for me as above.  Also, you can add the command in the .zshrc as well.

_kittur

0 Kudos
Reply