On Tue, Feb 07, 2017 at 11:42:06AM -0700, Jason Gunthorpe wrote: > On Tue, Feb 07, 2017 at 08:35:38PM +0200, Leon Romanovsky wrote: > > I made it (rdma_shared_provider function), but have a very hard time > > to properly create ".." symlink, because during the build (in place too) > > the output is placed in build/lib in flat structure and symlinks need to > > be without "..". But during installation phase, these symlinks should > > be changed to ".." and it doesn't work for me in automatic way :( > > For symlinks build/ and installed are two different flows, they don't intermix > > Compile the library to build/lib/libibverbs-dv-mlx5.so.1.0.13 > and setup a symlink build/lib/libmlx5-rdmav2.so -> libibverbs-dv-mlx5.so.1.0.13 Just as a note, I'm calling it libmlx5 and not libibverbs-dv-mlx5. > > For install, use realpath like this: > > execute_process(COMMAND "realpath --relative-to ${VERBS_PROVIDER_DIR} ${CMAKE_INSTALL_LIBDIR}/libmlx5.so.1.0.13" OUTPUT_VARIBALE LINK_PATH) It doesn't work for me :( -- verbs_provder_dir = /usr/lib64/libibverbs -- install_libdir = /usr/lib64 -- link_path = lrwxrwxrwx 1 root root 18 Feb 7 21:43 /lib64/libibverbs/libmlx5-rdmav2.so -> /libmlx5.so.1.0.13 lrwxrwxrwx 1 root root 10 Feb 7 21:43 /lib64/libmlx5-rdmav2.so -> libmlx5.so lrwxrwxrwx 1 root root 12 Feb 7 21:43 /lib64/libmlx5.so -> libmlx5.so.1 lrwxrwxrwx 1 root root 17 Feb 7 21:43 /lib64/libmlx5.so.1 -> libmlx5.so.1.0.13 -rwxr-xr-x 1 root root 666637 Feb 7 21:43 /lib64/libmlx5.so.1.0.13 lrwxrwxrwx 1 root root 18 Feb 7 21:43 /usr/lib64/libibverbs/libmlx5-rdmav2.so -> /libmlx5.so.1.0.13 lrwxrwxrwx 1 root root 10 Feb 7 21:43 /usr/lib64/libmlx5-rdmav2.so -> libmlx5.so lrwxrwxrwx 1 root root 12 Feb 7 21:43 /usr/lib64/libmlx5.so -> libmlx5.so.1 lrwxrwxrwx 1 root root 17 Feb 7 21:43 /usr/lib64/libmlx5.so.1 -> libmlx5.so.1.0.13 -rwxr-xr-x 1 root root 666637 Feb 7 21:43 /usr/lib64/libmlx5.so.1.0.13 > rdma_install_symlink("${LINK_PATH}/libibverbs-dv-mlx5.so.1.0.13" "${VERBS_PROVIDER_DIR}/libmlx5-rdmav2.so") > > The rdma_install_symlink helper takes care of the install step. > > Jason
Attachment:
signature.asc
Description: PGP signature