Skip to content
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

Fixed dangling symlinks in builds #656

Merged
merged 2 commits into from
Jun 1, 2021
Merged

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented May 26, 2021

In some cases, the assumed output for a build, lib*.so, is actually a symlink which points to lib*.#.#.#.so. This results in issues like

ERROR: /home/user/.cache/bazel/_bazel_user/3821989c4a000f3a0c8be3e30c90c4f7/external/libjpeg_turbo/BUILD.bazel:23:6: output 'external/libjpeg_turbo/libjpeg_turbo/lib/libjpeg.so' is a dangling symbolic link

To fix this, any explicitly requested output should be resolved to it's full file.

@UebelAndre UebelAndre force-pushed the symlink branch 5 times, most recently from 0419eca to 283e592 Compare May 26, 2021 17:01
@UebelAndre UebelAndre requested a review from jsharpe May 26, 2021 17:18
@UebelAndre UebelAndre marked this pull request as ready for review May 26, 2021 17:18
@UebelAndre UebelAndre requested a review from oquenchil as a code owner May 26, 2021 17:18
@UebelAndre UebelAndre force-pushed the symlink branch 4 times, most recently from d4d487d to 7b834e0 Compare June 1, 2021 18:14
Copy link
Member

@jsharpe jsharpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 as this fixes the dangling symlinks for the specified outputs but we still have #449 to think about how to handle properly - its not ideal that we end up with copies of shared libraries which should be symlinks. ldconfig complains about the fact that the .so library isn't a symlink.

I've not checked but do we also have broken symlinks in the gen_dir output too?

@UebelAndre
Copy link
Collaborator Author

+1 as this fixes the dangling symlinks for the specified outputs but we still have #449 to think about how to handle properly - its not ideal that we end up with copies of shared libraries which should be symlinks. ldconfig complains about the fact that the .so library isn't a symlink.

I've not checked but do we also have broken symlinks in the gen_dir output too?

Yeah, this would have been an existing issue from before #575

This change restores previous behavior but is still incorrect but incorrect for functionality that didn't work or was undefined previously.

@UebelAndre UebelAndre merged commit 76198ed into bazel-contrib:main Jun 1, 2021
@UebelAndre UebelAndre deleted the symlink branch June 1, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants