diff --git a/opencl/packaging/rocm-opencl.postinst b/opencl/packaging/rocm-opencl.postinst index 241dcd8403..1026cfadac 100644 --- a/opencl/packaging/rocm-opencl.postinst +++ b/opencl/packaging/rocm-opencl.postinst @@ -3,7 +3,9 @@ set -e do_ldconfig() { - echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig + if [ -e "/opt/rocm/opencl" ] ; then + echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig + fi mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd) } diff --git a/opencl/packaging/rocm-opencl.rpm_post b/opencl/packaging/rocm-opencl.rpm_post index a1b3ae955d..3ef90e8d0c 100644 --- a/opencl/packaging/rocm-opencl.rpm_post +++ b/opencl/packaging/rocm-opencl.rpm_post @@ -1,2 +1,4 @@ -echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig +if [ -e "/opt/rocm/opencl" ] ; then + echo /opt/rocm/opencl/lib > /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig +fi mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd)