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

LIB_INSTALL_DIR set to a Relative Path #36

Closed
dMaggot opened this issue Feb 4, 2013 · 12 comments
Closed

LIB_INSTALL_DIR set to a Relative Path #36

dMaggot opened this issue Feb 4, 2013 · 12 comments

Comments

@dMaggot
Copy link

dMaggot commented Feb 4, 2013

Hi, I noticed that you set the LIB_INSTALL_DIR variable in line 123 of GammaRay-1.3.0/CMakeList.txt to a relative path. This triggers some security warnings in Gentoo when installing the package. Is this intended or can it be changed to /usr/lib${LIBSUFFIX}?

@steveire
Copy link

steveire commented Feb 4, 2013

Hi,

What is the security warning? Don't all KDE applications also install to paths relative to CMAKE_INSTALL_PREFIX? Is this problem unique to GammaRay?

Thanks,

Steve.

@krf
Copy link
Contributor

krf commented Feb 4, 2013

If CMAKE_INSTALL_PREFIX is set to "/usr" everything should be as you expect it.

@dMaggot
Copy link
Author

dMaggot commented Feb 4, 2013

Then it's probably a CMake bug, because if you set LIB_INSTALL_DIR to "lib" then that's what goes to the rpath, and not the complete "/usr/lib" path. The security warning is related to setting a relative path in the rpath.

@krf
Copy link
Contributor

krf commented Feb 4, 2013

Stephen, you're the CMake guy. Does it make sense to set LIB_INSTALL_DIR to an absolute path?

@dMaggot
Copy link
Author

dMaggot commented Feb 4, 2013

If it's a CMake bug, then your cue is here

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmComputeLinkInformation.cxx;h=08cdcb5b81362411fc42da1d094fe64a136f4613;hb=HEAD#l1813

probably worth to check if at that point you have a relative path or an absolute path and, if relative, then you want to append the CMAKE_INSTALL_PREFIX thing.

@steveire
Copy link

steveire commented Feb 4, 2013

Please file a bug report upstream with a minimal testcase: http://public.kitware.com/Bug/main_page.php

(Note: minimal means don't say 'build gammaray' :) )

@steveire steveire closed this as completed Feb 4, 2013
@dMaggot
Copy link
Author

dMaggot commented Feb 5, 2013

Here's the relevant conclusion of the discussion up at CMake

http://www.cmake.org/pipermail/cmake/2013-February/053467.html

@vkrause
Copy link
Contributor

vkrause commented Feb 6, 2013

FindKDE4Internal.cmake indeed messes with CMAKE_INSTALL_RPATH (which needs an absolute path). Rather than changing our in my understanding correct relative install dirs, shouldn't it be enough to fix CMAKE_INSTALL_RPATH after find_package(KDE4) (i.e prepend CMAKE_INSTALL_PREFIX if necessary), and possibly fix this for real inside FindKDE4Internal.cmake?

Hm, actually, I'm wondering if RPATHs aren't even harmful for us, since the probe will always be using the libs loaded by the host application, never pull them in on its own. So, maybe we should just disable RPATH handling again after loading the KDE4 stuff?

@steveire
Copy link

steveire commented Feb 6, 2013

Re-opening while we figure out what the real solution is.

@steveire steveire reopened this Feb 6, 2013
@krf
Copy link
Contributor

krf commented Oct 8, 2013

Did we figure out a solution for this?

@vkrause
Copy link
Contributor

vkrause commented Oct 13, 2013

A workaround has been committed to the 1.3 branch.

@krf
Copy link
Contributor

krf commented Oct 14, 2013

So I'm assuming this fixed. Closing.

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

No branches or pull requests

4 participants