Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Missing quotes in tbbvars.sh

Guido_K_
Beginner
794 Views

Hello,

I am encountering the following problem on tbbvars.sh script of Linux Composer XE

opt64/intel/tbb/bin/tbbvars.sh :

1     get_library_directory(){
2     gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e s/^\ //`

3     ...

13    }

The missing quotes around the substitute lead to an error when starting zsh (v5.0.2 from OPENsuse 12.3); bash has does not show the problem.

get_library_directory:1: no matches found: s/^ //

I suggest to use quotes and replace line 2 with

2     gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e "s/^\ //"`

ifort (IFORT) 14.0.2 20140120
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Linux 64bit

Kernel version 3.7.10-1.16-desktop

Guido K.

0 Kudos
3 Replies
Kevin_D_Intel
Employee
794 Views

Thank you for reporting this issue Guido. I forwarded this to the TBB Development team (see internal tracking id below) for investigation/consideration and will keep you updated regarding a fix in a future release.

(Internal tracking id: DPD200256963)

0 Kudos
Vincent_Lefevre
Beginner
794 Views

I installed Intel Cluster Studio XE 2015 yesterday, and found the same problem (I'm also using zsh, which regards ^ as a special character in some configuration). I'd suggest the following solution:

gcc_version_full=`gcc --version | grep "gcc"| egrep -o " [0-9]+\.[0-9]+\.[0-9]+.*" | sed -e "s/^ //"`

i.e. adding quotes for the sed expression as already suggested, but also removing the backslash (which should no longer be there due to the added quotes, though it is harmless I think).

0 Kudos
Kevin_D_Intel
Employee
794 Views

Yes, this defect is still unresolved. Thank you for the ping and revised suggested solution. I passed that on to the TBB Development team.

0 Kudos
Reply