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

install destination paths do not correspond to iRODS paths #32

Open
d-w-moore opened this issue Mar 6, 2021 · 3 comments
Open

install destination paths do not correspond to iRODS paths #32

d-w-moore opened this issue Mar 6, 2021 · 3 comments
Labels

Comments

@d-w-moore
Copy link
Contributor

d-w-moore commented Mar 6, 2021

@SwooshyCueb :
Using: cmake 3.11.4-0 ; ubuntu 18.04 ; building the repo on branch 4-2-stable
But results were same on Centos 7, and on master branch.

Building and installing from source , neither of these two alternatives of installing CMake-built TARGETs and FILES from this repo end up placing the targets/files into the customary irods paths (/usr/lib/irods and /var/lib/irods)
(a) direct: make install
(b) package: make package, followed by installing the generated .deb or .rpm package

This is because non-empty extra path segments are being prepended to the desired destination path, making for example /usr/lib/irods into /usr/usr/lib/irods

Currently, building an unmodified tip of 4-2-stable of this repo against iRODS 4.2.8 results in these (undesired) path segments being prepended to /usr/lib/irods and /var/lib/irods in each target/file:

(a) direct: /usr/local
(b) package: /usr

But if we place the line

set(CMAKE_INSTALL_PREFIX "/" CACHE STRING "Install root path. Change from \"/\" for run-in-place installations." FORCE)

directly after the project line in CMakeLists.txt to try and enull those prepended paths, we get:

(a) direct: (empty = successful install) , ie the "/" CMAKE_INSTALL PATH worked!
(b) package: /usr

So, effectively. only the (a) direct install method is being corrected by setting the CMAKE_INSTALL_PREFIX cache variable to "/" , whereas the package install logic is following some other, yet unknown cue.)

@trel trel added the bug label Mar 6, 2021
@d-w-moore
Copy link
Contributor Author

d-w-moore commented Mar 6, 2021

In 4.2.8.0 we actually did set the CPACK_PACKAGING_INSTALL_PREFIX to / which causes non-absolute install paths to be placed at the root filesystem. However in 4-2-stable we no longer set this cache variable, and so non-absolute install paths such as IRODS_HOME_DIRECTORY (= var/lib/irods) are receiving the unwanted "/usr" from the default cpack generator

@d-w-moore
Copy link
Contributor Author

@SwooshyCueb I see this was done as part of the move to using GnuInstallDirs ... not sure how one would implement a compromise between the two approaches. Thoughts?

@SwooshyCueb
Copy link
Member

SwooshyCueb commented Mar 8, 2021

The movie to using GNUInstallDirs isn't entirely backwards compatible. If you want to build against 4.2.8 and not stable-4-2, I think you will have to pass some definitions to CMake on the command line.
I think you will need -DCMAKE_INSTALL_PREFIX=/ and potentially also -DCMAKE_INSTALL_LIBDIR=usr/lib.

If building the HEAD of 4-2-stable in our plugin repositories against the previous release is something we want to support, we can re-introduce the manual set of CMAKE_INSTALL_PREFIX for 4-2-stable in the plugin repositories, but I would recommend against doing this for master. Either way, it should not be placed before the call to find_pacakge(IRODS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants