-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RPATH to tests to point to private libraries. #200
Conversation
56bf5ba
to
d5ce71d
Compare
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib") | ||
# Adding RPATH to public tests to point to private libraries. | ||
set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../../../lib/${PROJECT_NAME}/lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pfultz2 I found that the tests are installed at /opt/rocm/libexec/installed-tests/migraphx/bin
, so I modified the relative path to $ORIGIN/../../../../lib
from $ORIGIN/../../../lib
(backtracking 4 directory levels instead of 3). I am not sure why we were stepping out of 3 directories only, before my change.
Below is the output of ldd for test_verify
(stepping out of 4 l:
ldd /opt/rocm/libexec/installed-tests/migraphx/bin/test_verify
linux-vdso.so.1 (0x00007ffe90ddf000)
libmigraphx_ref.so.2010000 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/migraphx/lib/libmigraphx_ref.so.2010000 (0x00007f72b14bc000)
libmigraphx_cpu.so.2010000 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/migraphx/lib/libmigraphx_cpu.so.2010000 (0x00007f72b0cff000)
libdnnl.so.1 => /usr/local/lib/libdnnl.so.1 (0x00007f72aeb42000)
libomp.so => /opt/rocm-6.0.2/lib/llvm/lib/libomp.so (0x00007f72aea4f000)
libmigraphx_gpu.so.2010000 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/migraphx/lib/libmigraphx_gpu.so.2010000 (0x00007f72a5a88000)
librocblas.so.4 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/librocblas.so.4 (0x00007f7273941000)
libMIOpen.so.1 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/libMIOpen.so.1 (0x00007f723c58d000)
libamdhip64.so.6 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/libamdhip64.so.6 (0x00007f723aade000)
libmigraphx.so.2010000 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/migraphx/lib/libmigraphx.so.2010000 (0x00007f72382a7000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7238072000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7237f8b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7237f6b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7237d42000)
/lib64/ld-linux-x86-64.so.2 (0x00007f72b178a000)
libmigraphx_device.so.2010000 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/migraphx/lib/../lib/libmigraphx_device.so.2010000 (0x00007f7236a7a000)
libamd_comgr.so.2 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/libamd_comgr.so.2 (0x00007f722e16c000)
libroctx64.so.4 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/libroctx64.so.4 (0x00007f722e167000)
libhsa-runtime64.so.1 => /opt/rocm/libexec/installed-tests/migraphx/bin/../../../../lib/libhsa-runtime64.so.1 (0x00007f722dea3000)
libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f722de96000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f722de7a000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f722de46000)
libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007f722de28000)
libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f722de12000)
libdrm_amdgpu.so.1 => /lib/x86_64-linux-gnu/libdrm_amdgpu.so.1 (0x00007f722de06000)
Do you think my change for relative path is correct or am I missing something here?
|
@cgmb @lawruble13 This PR is needed to fix an issue that breaks MIGraphX. Since Paul is away on parental leave, can you please help to merge in the changes? |
* Add RPATH to tests to point to private libraries. * Fix relative path to lib --------- Co-authored-by: Lauren Wrubleski <Lauren.Wrubleski@amd.com>
* Add flag to move libraries under project name (#188) Co-authored-by: Paul Fultz II <pfultz2@yahoo.com> * Turn ROCM_SYMLINK_LIBS OFF by default (#199) * Update RPATH to binaries for PRIVATE lib changes (#197) * Update RPATHs * Remove debug messages and re-indent comments * Use CMP0095 NEW policy for paths and update BIN_INSTALL_DIR paths for private binaries * Remove setting CMP0095 to NEW * Add RPATH to tests to point to private libraries. (#200) * Add RPATH to tests to point to private libraries. * Fix relative path to lib --------- Co-authored-by: Lauren Wrubleski <Lauren.Wrubleski@amd.com> --------- Co-authored-by: Paul Fultz II <pfultz2@yahoo.com> Co-authored-by: Lauren Wrubleski <Lauren.Wrubleski@amd.com>
No description provided.