Coder Social home page Coder Social logo

Comments (7)

kellerb avatar kellerb commented on July 1, 2024 1

Looks like CPACK_RPM_PACKAGE_RELOCATABLE should do it.

from irods_client_icommands.

carrgilson avatar carrgilson commented on July 1, 2024

Would there also be a way to do this with the irods-externals and irods-runtime dependencies of the package too?

from irods_client_icommands.

kellerb avatar kellerb commented on July 1, 2024

FYI, for the purposes of dynamic (run-time) linking, the icommands currently locate the shared libraries contained in the irods-externals package by hardcoding the shared libraries' locations into the icommands' rpath.

If the libraries were moved to another location that is also not included in the list of directories normally checked by the dynamic linker (e.g. moved to somewhere besides /lib, /usr/lib, or the other directories ldconfig has recorded), then there would need to be additional changes made at the OS level to link the icommands against the libraries, e.g. setting LD_LIBRARY_PATH or having ldconfig add the new directories to its list of directories searched (e.g. by creating an entry in /etc/ld.so.conf.d/).

Can you give a brief explanation of how the relocatable packages will be used / what need they are filling? We would like to make using these packages as easy as possible.

from irods_client_icommands.

carrgilson avatar carrgilson commented on July 1, 2024

I want to have the ability to house the commands and all dependent libraries within a single directory structure which will likely be a common network location mounted across an array of machines in an HPC cluster.

If a user needs to use the icommands, they run a command which adds the appropriate path to the applicable environment variables.

The requirement exists so that work-flows can be designed to be independent of the operating system and any OS-bundled software libraries.

from irods_client_icommands.

eburgueno avatar eburgueno commented on July 1, 2024

We have exactly the same use case at the cluster that I manage. Maybe you could statically link the libraries and provide that as a separate, relocatable RPM?

from irods_client_icommands.

kellerb avatar kellerb commented on July 1, 2024

I have successfully run the icommands on a centos 7 machine with all irods packages installed to the new root directory of /new/root/dir/for/irods/packages.

Install relocated irods-externals dependencies:

sudo rpm --import https://packages.irods.org/irods-signing-key.asc

wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-libarchive3.1.2-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-libarchive3.1.2-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-avro1.7.7-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-avro1.7.7-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-boost1.60.0-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-boost1.60.0-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-clang-runtime3.8-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-clang-runtime3.8-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-jansson2.7-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-jansson2.7-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
wget https://packages.irods.org/yum/pool/centos7/x86_64/irods-externals-zeromq4-14.1.3-0-1.0-1.x86_64.rpm
sudo rpm -i irods-externals-zeromq4-14.1.3-0-1.0-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages

Install normal irods dependencies:

sudo yum install python-psutil python-requests python-jsonschema

Build, and then install irods and the icommands (post relocatable RPMs commit)

sudo rpm -i irods-devel-4.2.1-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
sudo rpm -i irods-runtime-4.2.1-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages
sudo rpm -i irods-icommands-4.2.1-1.x86_64.rpm --relocate /=/new/root/dir/for/irods/packages

Add relocated icommands to the PATH:

export PATH=$PATH:/new/root/dir/for/irods/packages/usr/bin

Running the icommands requires telling them where to find the shared objects, which I did by setting the LD_LIBRARY_PATH and IRODS_PLUGIN_HOME environment variables:

env LD_LIBRARY_PATH=/new/root/dir/for/irods/packages/opt/irods-externals/avro1.7.7-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/boost1.60.0-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/clang-runtime3.8-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/libarchive3.1.2-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/zeromq4-14.1.3-0/lib:/new/root/dir/for/irods/packages/usr/lib IRODS_PLUGIN_HOME=/new/root/dir/for/irods/packages/usr/lib/irods/plugins/network iinit
env LD_LIBRARY_PATH=/new/root/dir/for/irods/packages/opt/irods-externals/avro1.7.7-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/boost1.60.0-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/clang-runtime3.8-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/libarchive3.1.2-0/lib:/new/root/dir/for/irods/packages/opt/irods-externals/zeromq4-14.1.3-0/lib:/new/root/dir/for/irods/packages/usr/lib IRODS_PLUGIN_HOME=/new/root/dir/for/irods/packages/usr/lib/irods/plugins/network ils

Please let us know if this doesn't work, or if this is not a solution for your use case.

from irods_client_icommands.

trel avatar trel commented on July 1, 2024

closing - please open a new issue if this is not behaving as expected.

from irods_client_icommands.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.