Intel® oneAPI Data Analytics Library
Community support for building compute-intensive applications that run fast on Intel® architecture.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
204 Discussions

Bug in if installation path contains "/bin"


I am running the Professional Edition for Fortran and C++ of Intel Parallel Studio XE 2016. This bug occurs in versions 16.0.0 and 16.0.1 at least.

When I discovered this bug, I was trying to source bin/ in order to set my LD_LIBRARY_PATH properly. After running this, my LD_LIBRARY_PATH contained a couple of suspicious entries:

daalvars.csh /soft/spack/opt/spack/linux-x86_64aries/intel-16.0.1/compilers_and_libraries_2016.1.150/linux/daal/bin/lib/intel64_lin
daalvars.csh /soft/spack/opt/spack/linux-x86_64aries/intel-16.0.1/compilers_and_libraries_2016.1.150/linux/daal/bin/../compiler/lib/intel64_lin

The installation directory I used was:


As you can see, something stripped the "/bin" out of the middle of my path. I tracked this bug down to another script that is sourced by If you look inside daal/bin/, you'll see the following line:

local daal=${daal_bin/\/bin/}

This line is designed to strip the "/bin" from the end of a path. However, my path contains the word "/binaries". This bash replacement actually strips out the first occurrence of the word "/bin". In order to fix this bug, I changed the line to the following:

local daal=${daal_bin%\/bin}

The second problem with is actually on the line above. The script added a "daalvars.csh " to my path. To be fair, this is actually my fault. In my .bashrc, I created a function:

function cd {
    command -p cd "$@" && ls

This function automatically runs "ls" every time I change directories. The problem with the script is that it runs "cd" to determine the directory:

local daal_bin=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

The easiest fix for me was to change the line into:

local daal_bin=$(command -p cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

I know, it's definitely my fault for creating a "cd" function that obscures the system "cd". If you don't want to patch this then I totally understand. It's mainly the "/bin" stripping that I consider to be a bug.

I attached a patch that I created for this bug. In order to use it, download the path, place it in the daal/bin directory, and run:

patch -p1 < daalvars_patch.txt

I couldn't figure out where to submit a bug report for this problem, so if you would like me to submit an official bug report just let me know.

0 Kudos
3 Replies

I just noticed that the same problem with "cd" is occurring for me in pkg_bin/ with MANPATH. If you want to resolve this issue, simply add "command -p " before each call to "cd". I've added a patch to accomplish this.


Hi Adam,
I'll transfer this to the DAAL forum at:  for faster resolution to this issue, thanks.



Hi Adam,

Thanks for reporting the problem. We'll investigate and fix, if necessary, in our future releases.