I m trying to deploy some simple binary with pkg_tar such that user which can't access to the source code can use the tool out of the box(deployment tar).
I also want to reserve the dirtree and find the attribute include_runfiles useful.
However, I find a weird behavior of the tar rule:
Shared lib are duplicated in the tar:
* One in the dir tree as we declare them by BUILD file.
* Another is located in _solib_darwin_arm64 for MacOS (_solib_k8 for Linux).
In the project workspace, the one in _solib_darwin_arm64 is actually a symlink to the one in dir tree. However, in package tar both are duplicated files.
It introduces linking error when I run the binary. (The binary link the .so lib with relative path, e.g. @loader_path/../../../to_root/_solib_darwin_arm64/_U_S_encoded_path_to_shared_lib)
This behavior makes no sense to me.
Could anyone help? many thanks.