Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#5270 closed defect (fixed)
Relative PREFIX problem
Reported by: | Nigel | Owned by: | Nigel |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | unknown |
Severity: | medium | Keywords: | build |
Cc: | Ticket locked: | no |
Description
Generating relocatable packages or tarballs should be possible like this:
cd mythtv ./configure --prefix=.. make install INSTALL_ROOT=/tmp cd ../mythplugins ./configure --prefix=.. make install INSTALL_ROOT=/tmp
but the configure in plugins will not be able to find mythconfig.mak. That is easily fixed with a copy or move of /tmp/include/mythtv, but then the linker will fail to find libmythtv-*.
Plugins doesn't currently use PREFIX in the code (i.e. at runtime), so it should be possible to modify its configure to allow something. My current thought is to use an absolute path its configure, which replaces the one in its copy of mythconfig.mak
Attachments (6)
Change History (17)
comment:1 Changed 16 years ago by
Keywords: | build added |
---|---|
Owner: | changed from Isaac Richards to Nigel |
Status: | new → assigned |
comment:2 Changed 16 years ago by
comment:3 Changed 16 years ago by
I was wrong, using a relative PREFIX like this isn't possible - qmake won't allow it. Any relative install path always has the current directory prefixed, which means the install rules will sprinkle stuff all over the source tree.
To do what I was aiming for (have the executable open themes, filters and plugins relative to its current directory), we will need a new value passed in to MythContext, and probably in configure. (e.g. RUNTIMEPREFIX)
comment:4 Changed 16 years ago by
Changed 16 years ago by
Attachment: | runprefix.patch added |
---|
Add a configure arg for a separate runtime prefix
comment:5 Changed 16 years ago by
OK. With that patch, people shouldn't need to use INSTALL_ROOT for sandbox building (although it doesn't remove that var yet). We should be able to do:
./configure --prefix=/tmp --runtime-prefix=.. make install cd /tmp tar -czvf mythtv.tar.gz bin include lib share
to generate a new mythtv tarball that it totally relocatable!
Changed 16 years ago by
Attachment: | runprefix.2.patch added |
---|
Always get filters and plugins from PREFIX/lib, re-enable OS X runtime asset location
Changed 16 years ago by
Attachment: | runprefix.4.patch added |
---|
Patch 3 had wrong path for plugins/filters, this also updates doco and win packager, moves LIBDIR down to the only dir that needs it (could also move PREFIX?)
Changed 16 years ago by
Attachment: | runprefix.5.patch added |
---|
Patch 4 was missing libmyth makefile fixes
comment:6 Changed 16 years ago by
LIBDIR is also used to install filters/*, so patch 4 was a little too agressive. Moved those common make variables back to settings.pro. I also tried to use -rpath ${RUNPREFIX} to ensure that the binaries would use the libraries they were built/installed with (instead of relying on LD_LIBRARY_PATH), but got caught up in trying to pass them from g++ down to ld, and gave up. This would also be a little annoying for developers who wanted to swap between library versions by using LD_LIBRARY_PATH. [BR] Will commit this in a few hours if I don't find any testbuild problems (and no-one complains - assuming that anyone is reading)
comment:7 Changed 16 years ago by
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [17459]) Allow relative PREFIX by implementing new --runtime-prefix configure param. Also deprecates LIBDIR (runtime plugins/filters are relative to $prefix/lib), and INSTALL_ROOT (--prefix should work). Closes #5270, #4984. Added some theme dir debug to help sort "The frontend can't find any themes..."
(In [17303]) Update trunk SVNrel to 17189 (17131 had too many missing fixes). Revert parts of [17138]. Move INSTALL_ROOT from qt*env.sh files (it really has nothing to do with Qt - it is a mythtv install trick). prefix=/ causes errors:
While that looks like a MinGW error, I have changed it to something that almost works for mythtv. Note that mythplugins build will not work yet. See #5270