Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
7568 Discussions

Intel Parallel Studio XE 2020 update 1 macOS, command line option with symlinks issue

yaf
New Contributor I
1,979 Views

I installed the Intel Parallel Studio XE 2020 Update 1 on my macOS (Catalina/10.15.5) and chose only the command line option and not the Xcode integration.

I hoped that I can manually use intel compilers when I need them and from a terminal session, by running `source <install_dir>/bin/compilervars.sh intel64`.

But, after installation, it automatically creates symlinks to /usr/local/bin, where all the compilers are on my PATH.

Is there a way to prevent this behavior except manually removing all the created symlinks?

0 Kudos
3 Replies
RahulV_intel
Moderator
1,949 Views

Hi,

 

Ideally, sourcing the compilers with script file (like you mentioned) should place the compilers in path and the global behavior is not expected.

 

I shall escalate this case to the concerned team. Thanks for reporting the issue.

 

--Rahul

 

Viet_H_Intel
Moderator
1,941 Views

Do you have another system with older macOS (e.g. Catalina/10.15.1) to try and see if the problem still persists?


yaf
New Contributor I
1,938 Views

| Do you have another system with older macOS (e.g. Catalina/10.15.1) to try and see if the problem still persists?

 

No, I do not.

Currently, I resolved the issue by modifying the intel linking script

 

compilers_and_libraries_2020.1.216/mac/link_install.sh

 

and removing all the created links in

 

/usr/local/bin

 

by

 

# remove all links
COMPXE_RMLINKS() {
    PRINT "COMPXE_RMLINKS()"
    if [ ${TARGET} == "mac" ]; then
        # remove links for binary and non-env script program files
        for THIS_FILE in $INTEL_PROGRAM_FILES_LIST; do
            if [ -e "$ROOT_DIR"/usr/local/bin/$THIS_FILE ]; then
                rm $RM_OPTIONS "$ROOT_DIR"/usr/local/bin/$THIS_FILE 2>/dev/null
            fi
            if [ -e "$ROOT_DIR"/usr/local/bin/$THIS_FILE-$VERSION ]; then
                rm $RM_OPTIONS "$ROOT_DIR"/usr/local/bin/$THIS_FILE-$VERSION 2>/dev/null
            fi
            if [ -e "$ROOT_DIR"/usr/local/bin/$THIS_FILE-$VERSION.$VERSION_UPDATE.$PACKAGE_NUM ]; then
                rm $RM_OPTIONS "$ROOT_DIR"/usr/local/bin/$THIS_FILE-$VERSION.$VERSION_UPDATE.$PACKAGE_NUM 2>/dev/null
            fi
        done
    fi
}

 

 

The other major problem/issue is reported before:

https://community.intel.com/t5/Intel-C-Compiler/catastrophic-error-Cannot-open-source-file-quot-stdi... 

The same thing is happening here. It is simply failing on `hello.c` test case.

#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}
>> icc hello.c
hello.c(1): catastrophic error: cannot open source file "stdio.h"
  #include <stdio.h>
                    ^

compilation aborted for hello.c (code 4)
Reply