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

Take DESTDIR into account when creating library symlinks #592

Merged
merged 1 commit into from Nov 6, 2019

Conversation

antonio-rojas
Copy link
Contributor

Currently cmake tries to create the symlinks directly on the root filesystem, which fails if installing to a specific DESTDIR

Copy link
Contributor

@meshula meshula left a comment

Choose a reason for hiding this comment

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

Question on intent in the Conversation thread.

@meshula
Copy link
Contributor

meshula commented Oct 21, 2019

According to the kitware (https://gitlab.kitware.com/cmake/cmake/issues/17340), on *nix, variables with the key FULL in them are always rooted in /usr/local. Is the intent of this change that if the user has set DESTDIR to say/ foo, then the symlinks become /foo/usr/local? Generally it seems that kitware suggests CMAKE_INSTALL_PREFIX for this purpose, then CMAKE_INSTALL_FULL_DIR would resolve as you need? Or am I misunderstanding this diff?

@antonio-rojas
Copy link
Contributor Author

Is the intent of this change that if the user has set DESTDIR to say/ foo, then the symlinks become /foo/usr/local?

No. The symlinks are relative, and this doesn't change that. The intent is that in case you are make-installing to a specific DESTDIR (ie. for creating a distro package) the symlink is created inside the filesystem of such DESTDIR, and not in the build machine's filesystem.

@meshula
Copy link
Contributor

meshula commented Oct 22, 2019

Ok, thanks for the explanation, it helps me understand what's going on. I'll leave it for someone more knowledgeable about distro packaging to review.

@cary-ilm cary-ilm added the Needs Discussion To be discussed in the technical steering committee label Oct 24, 2019
@cary-ilm
Copy link
Member

This doesn't seem quite right. @kdt3rd is going to investigate, there seems to be something wrong with how the pkg-config is generated that's causing downstream problems.

@kdt3rd
Copy link
Contributor

kdt3rd commented Nov 6, 2019

These changes look good. I always forget that cmake_install_prefix isn't overwritten by destdir but instead prepended in front for chroot-like behavior. Thanks for the fix!

@kdt3rd kdt3rd merged commit 4e54bde into AcademySoftwareFoundation:master Nov 6, 2019
@cary-ilm cary-ilm added this to the v2.4.1 milestone Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion To be discussed in the technical steering committee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants