HenrikBengtsson / CBI-software

A Scientific Software Stack for HPC (CentOS oriented)
https://wynton.ucsf.edu/hpc/software/software-repositories.html
5 stars 2 forks source link

Detect when RPATH is used #37

Closed HenrikBengtsson closed 9 months ago

HenrikBengtsson commented 2 years ago

Some software with with RPATH by default. Such software cannot be move:d to another location without rebuilding them. I think the following is a way to check for this:

readelf -d "${bin}" | grep -qF "RUNPATH" && echo >&2 "ERROR: rpath detected in ${bin}"

Would probably require scan each binary and library file separately.

HenrikBengtsson commented 2 years ago

Add find-rpath;

$ SOFTWARE_ROOT=/software/c4/cbi/software
$ find "${SOFTWARE_ROOT}" -type f ! -size 0 -exec ./find-rpath {} ";" > RUNPATH.txt
$ cat RUNPATH.txt 
Detected RUNPATH in /software/c4/cbi/software/sratoolkit-2.10.8/bin/blastn_vdb.2.10.1-2.10.8
Detected RUNPATH in /software/c4/cbi/software/sratoolkit-2.10.8/bin/tblastn_vdb.2.10.1-2.10.8
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blast_formatter
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastdb_aliastool
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastdbcheck
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastdbcmd
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastn
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastp
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/blastx
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/convert2blastmask
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/deltablast
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/dustmasker
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/makeblastdb
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/makembindex
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/makeprofiledb
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/psiblast
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/rpsblast
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/rpstblastn
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/segmasker
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/tblastn
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/tblastx
Detected RUNPATH in /software/c4/cbi/software/blast-2.10.1/bin/windowmasker
Detected RUNPATH in /software/c4/cbi/software/cellranger-4.0.0/external/anaconda/lib/python2.7/site-packages/bh_sne.so
Detected RUNPATH in /software/c4/cbi/software/cellranger-4.0.0/external/anaconda/lib/python2.7/site-packages/bh_sne_3d.so
Detected RUNPATH in /software/c4/cbi/software/cellranger-4.0.0/lib/python/cellranger/bisect.so
Detected RUNPATH in /software/c4/cbi/software/cellranger-4.0.0/lib/python/cellranger/report.so
...

Full file attached: RUNPATH_20220331.txt

HenrikBengtsson commented 10 months ago

Add this to make check