-
Notifications
You must be signed in to change notification settings - Fork 13.7k
preserve .so symlinks for docker container builds #17214
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
preserve .so symlinks for docker container builds #17214
Conversation
|
I've tested it locally - it works perfect. Thank you. @slaren, can you please review this PR? Thank you. |
|
@taronaeo Can you take a look at the s390x Dockerfile? |
| # Create a lib directory to store all .so files | ||
| RUN mkdir -p /app/lib && \ | ||
| find build -name "*.so" -exec cp {} /app/lib \; | ||
| find build -name "*.so*" -exec cp -P {} /app/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.
This is not great because it is creating multiple copies of the same shared libraries. At least the backends aren't duplicated, so it is not a huge problem, but we should switch to using cmake --install.
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.
@slaren The -P flag should preserve symlinks so they're not actually duplicated. That's one of the main reasons I didn't modify the s390x dockerfile because I'd need to alter the structure in order to get the symlinks functional.

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.
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.
Are you performing the builds on WSL in a windows directory? I know that that can screw with symlinks. I'm doing my builds in Ubuntu.
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.
It's WSL but it's not on a windows directory.
|
Will look into the s390x docker this weekend :) |

Previous PR #17091 broke the Dockerfiles because everything was previously linking against the unversioned so files. With the versioning added, links are now against the major version symlink for the so files, and copying only the unversion so files is no longer adequate.
This should fix: #17190, #17176, #17193
This PR preserves those symlinks and includes them in the container.
I have not included a fix for the s390x dockerfile in this PR for two reasons:
For that reason I think it's favorable to open a separate PR for strictly the s390x builds.