Skip to content

Instantly share code, notes, and snippets.

@ivanstepanovftw
Last active March 1, 2023 12:11
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanstepanovftw/93cffb185086d3ca8ccbd112956863d2 to your computer and use it in GitHub Desktop.
Save ivanstepanovftw/93cffb185086d3ca8ccbd112956863d2 to your computer and use it in GitHub Desktop.
Patch if Intel's shitty installer cant find libraries, but they are presents

If you cannot install Intel VTune Amplifier on Manjaro/Arch Linux (or other non-supported OS), because this shit cannot find installed libraries via ldconfig -p, you can use this script.
Unpack vtune_amplifier_2019_update3.tar.gz, then go to vtune_amplifier_2019_update3, then copy and paste following:

shopt -s globstar

for i in **/sysreq.cab; do
    echo "processing ${i}"
    perl -pi -e 's/(\W*)RESULT=255(.*)/\1RESULT=1  \2/' "${i}"  # COMPARE_VERSIONS() never returns 255
    perl -pi -e 's/(\W*)LI_(.+)=unsupp(.*)/\1LI_\2=ok    \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=not_detected(.*)/\1LI_\2=ok          \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=not_found(.*)/\1LI_\2=found    \3/' "${i}"
done

for i in **/amplifier.cab; do
    echo "processing ${i}"
    perl -pi -e 's/(\W*)LI_(.+)=unsupp_cpu(.*)/\1LI_\2=ok        \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=non_intel_cpu(.*)/\1LI_\2=ok           \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=cpu_check_fail(.*)/\1LI_\2=ok            \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=nok(.*)/\1LI_\2=ok \3/' "${i}"
    perl -pi -e 's/(\W*)    LI_(.+)=virtual(.*)/\1LI_\2=non_virtual\3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=not_found(.*)/\1LI_\2=found    \3/' "${i}"
    perl -pi -e 's/(\W*)LI_(.+)=unsupp(.*)/\1LI_\2=ok    \3/' "${i}"
done

It will patch CLI and GUI install scripts. Nothing more. Find and replace.
Also: prerequirements' warning Unsupported OS can be ignored.
Parallel Studio XE may be patched same way (unchecked).

@ivanstepanovftw
Copy link
Author

@asumagic
Copy link

Thanks, it did the trick. No idea how I would have solved this otherwise.
They still didn't fix this in update 5.

@ivanstepanovftw
Copy link
Author

@asumagic

They still didn't fix this in update 5.

And never will... I had reported issue, their answer was: we do not support your OS.
Also you can try rpmextract, but I am not sure if it will work, because some of their bash scripts have template variables like prefix directory.
AFAIK they wanted OneAPI for their products in 2020, I am not sure it turns positive way.

@pseyfert
Copy link

It seems to have worked for me with 2020 update 1. I needed only

perl -pi -e 's/(\W*)LI_(.+)=not_found(.*)/\1LI_\2=found    \3/' "${i}"

for both sysreq.cab and amplifier.cab. The crucial change is that the above version replaces not_found to ok in sysreq.cab, but found is needed instead.

@ivanstepanovftw
Copy link
Author

Fixed this, thanks pseyfert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment