Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398437 - cmake-utils.eclass: forcing CMAKE_BUILD_WITH_INSTALL_RPATH = TRUE disallow running binaries in build tree
Summary: cmake-utils.eclass: forcing CMAKE_BUILD_WITH_INSTALL_RPATH = TRUE disallow ru...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 21:06 UTC by Christoph Junghans (RETIRED)
Modified: 2012-01-22 08:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2012-01-10 21:06:03 UTC
A package where this happens is sci-chemistry/votca-csg.

Error is:

dyld: Library not loaded...

Removing FORCE from CMAKE_BUILD_WITH_INSTALL_RPATH in cmake-utils.eclass and disabling it (via MYCMAKEARGS) solves the problem
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-11 03:36:04 UTC
I don't understand what you are proposing here... ?
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2012-01-11 04:19:48 UTC
(In reply to comment #1)
> I don't understand what you are proposing here... ?
Some package on MacOS need CMAKE_BUILD_WITH_INSTALL_RPATH, but it can not be disabled as it is forced TRUE.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-01-11 04:36:07 UTC
So you are suggesting changing an eclass or a specific package? Patch?
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2012-01-11 04:54:04 UTC
(In reply to comment #3)
> So you are suggesting changing an eclass or a specific package? Patch?

I would vote for changing the eclass, dropping FORCE on CMAKE_BUILD_WITH_INSTALL_RPATH line. In this CMAKE_BUILD_WITH_INSTALL_RPATH would still be enabled by default, but allows for disabling it for packages, which need rpath.

I didn't had an idea for a nice patch for votca-csg. Suggestions?
Comment 5 Fabian Groffen gentoo-dev 2012-01-11 07:32:34 UTC
kde team is maintainer, so let's see what they think (eclass comes straight from gx86 in Prefix)
Comment 6 Johannes Huber (RETIRED) gentoo-dev 2012-01-11 22:08:17 UTC
I will put this on our meeting agenda (2011/01/16).
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-01-11 22:31:03 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > So you are suggesting changing an eclass or a specific package? Patch?
> 
> I would vote for changing the eclass, dropping FORCE on
> CMAKE_BUILD_WITH_INSTALL_RPATH line. In this CMAKE_BUILD_WITH_INSTALL_RPATH
> would still be enabled by default, but allows for disabling it for packages,
> which need rpath.
> 
> I didn't had an idea for a nice patch for votca-csg. Suggestions?

Perhaps we should only set this if !prefix ?
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2012-01-11 23:46:22 UTC
(In reply to comment #7)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > So you are suggesting changing an eclass or a specific package? Patch?
> > 
> > I would vote for changing the eclass, dropping FORCE on
> > CMAKE_BUILD_WITH_INSTALL_RPATH line. In this CMAKE_BUILD_WITH_INSTALL_RPATH
> > would still be enabled by default, but allows for disabling it for packages,
> > which need rpath.
> > 
> > I didn't had an idea for a nice patch for votca-csg. Suggestions?
> 
> Perhaps we should only set this if !prefix ?
I am still a bit puzzled why it works in !prefix and on prefix amd64-linux.
On amd64-linux the binaries in the build tree have the builddir in the rpath. 
On x86-macos in contrast otool tells about paths pointing to the lib in the install dir.
Comment 9 Fabian Groffen gentoo-dev 2012-01-12 07:37:45 UTC
Beware that cmake is a horribly broken tool, it "thinks" ELF only, which is broken for e.g. the Mach-O world.
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2012-01-13 20:27:34 UTC
Guys, please... read the docs and the eclass before pointing thumbs down... :)

This variable is only FORCED on for prefix at the moment!!! So, someone of you must have requested it at some point in the murky past.

If you agree that you don't want that anymore, who of us will ever dare to object changing a prefix-specific setting...
Comment 11 Fabian Groffen gentoo-dev 2012-01-13 20:30:39 UTC
IIRC it's enabled for APPLE only, so not Prefix related.  I'm not quite convinced that we need rpath (it doesn't exist) on Apple yet.
Comment 12 Christoph Junghans (RETIRED) gentoo-dev 2012-01-13 21:01:13 UTC
(In reply to comment #11)
> IIRC it's enabled for APPLE only, so not Prefix related.  I'm not quite
> convinced that we need rpath (it doesn't exist) on Apple yet.

It seems to me on APPLE cmake translates the rpath options to path used by LC_LOAD_DYLIB (see otool -l).
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2012-01-21 23:31:52 UTC
You got your wish (we talked about this at the kde meeting), I just removed the FORCE.
Comment 14 Fabian Groffen gentoo-dev 2012-01-22 08:58:09 UTC
hmmm, ok, we'll see what the effects will be.  Thanks!