Comments (3)
Ok, I think I've figured out what's up, the order of things in #34 is a bit off and I think should be fixed in #62.
Your sleuthing uncovering the check in conftest being optimized out was very helpful, thanks!
from slurm-drmaa.
I set this locally when running ./configure
with LDFLAGS=-Wl,-rpath=/path/to/dir/containing/libslurm.so ./configure ...
but if it's become standard practice to set a lib's rpath in the autoconf script I can look in to that - thanks for providing the examples.
from slurm-drmaa.
I'm trying to get a better understanding of what conditions this occurs under. For example, using a hand-built Slurm in my home directory on Ubuntu 21.04, with the autotools scripts generated on that platform, libtool correctly sets the rpath when compiling:
nate@pdp-11% ./configure --prefix=/tmp/slurm-drmaa --with-slurm-inc=/home/nate/work/slurm/20.11.8/include --with-slurm-lib=/home/nate/work/slurm/20.11.8/lib
...
nate@pdp-11% make
...
/bin/bash ../libtool --tag=CC --mode=link gcc -Wall -W -Wno-unused-parameter -Wno-format-zero-length -pedantic -std=c99 -g -O2 -pthread -L/home/nate/work/slurm/20.11.8/lib -version-info 1:8:0 -o libdrmaa.la -rpath /home/nate/work/slurm/20.11.8/lib libdrmaa_la-drmaa.lo libdrmaa_la-job.lo libdrmaa_la-session.lo libdrmaa_la-util.lo ../drmaa_utils/drmaa_utils/libdrmaa_utils.la -lslurm
libtool: link: gcc -shared -fPIC -DPIC .libs/libdrmaa_la-drmaa.o .libs/libdrmaa_la-job.o .libs/libdrmaa_la-session.o .libs/libdrmaa_la-util.o -Wl,--whole-archive ../drmaa_utils/drmaa_utils/.libs/libdrmaa_utils.a -Wl,--no-whole-archive -Wl,-rpath -Wl,/home/nate/work/slurm/20.11.8/lib -Wl,-rpath -Wl,/home/nate/work/slurm/20.11.8/lib -L/home/nate/work/slurm/20.11.8/lib /home/nate/work/slurm/20.11.8/lib/libslurm.so -g -O2 -pthread -pthread -Wl,-soname -Wl,libdrmaa.so.1 -o .libs/libdrmaa.so.1.0.8
And the resulting libdrmaa.so
indeed has a proper rpath:
nate@pdp-11% objdump -p /tmp/slurm-drmaa/lib/libdrmaa.so.1.0.8
Dynamic Section:
NEEDED libslurm.so.36
NEEDED libpthread.so.0
NEEDED libc.so.6
SONAME libdrmaa.so.1
RUNPATH /home/nate/work/slurm/20.11.8/lib
INIT 0x0000000000006000
FINI 0x000000000001dd34
INIT_ARRAY 0x00000000000268d0
INIT_ARRAYSZ 0x0000000000000008
FINI_ARRAY 0x00000000000268d8
FINI_ARRAYSZ 0x0000000000000008
GNU_HASH 0x00000000000002f0
STRTAB 0x0000000000002498
SYMTAB 0x0000000000000860
STRSZ 0x0000000000001382
SYMENT 0x0000000000000018
PLTGOT 0x0000000000027000
PLTRELSZ 0x00000000000014b8
PLTREL 0x0000000000000007
JMPREL 0x0000000000004408
RELA 0x0000000000003b38
RELASZ 0x00000000000008d0
RELAENT 0x0000000000000018
VERNEED 0x0000000000003a78
VERNEEDNUM 0x0000000000000002
VERSYM 0x000000000000381a
RELACOUNT 0x0000000000000035
nate@pdp-11% ldd /tmp/slurm-drmaa/lib/libdrmaa.so.1.0.8
linux-vdso.so.1 (0x00007ffd415eb000)
libslurm.so.36 => /home/nate/work/slurm/20.11.8/lib/libslurm.so.36 (0x00007f25ae090000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f25ae05d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f25ade71000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f25ade6a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f25add1c000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f25adcff000)
/lib64/ld-linux-x86-64.so.2 (0x00007f25ae27f000)
However, using the configure script generated by the same Ubuntu 21.04 autotools but called on CentOS 7 or 8, you can't even get past the configure stage because the test program isn't linked with an rpath:
configure:14117: gcc -o conftest -pedantic -std=c99 -g -O2 -pthread -D_REENTRANT -D_THREAD_SAFE -DNDEBUG -D_GNU_SOURCE -I/home/build/sl
urm/include -L/home/build/slurm/lib conftest.c -lslurm -lslurm >&5
configure:14117: $? = 0
configure:14117: ./conftest
./conftest: error while loading shared libraries: libslurm.so.36: cannot open shared object file: No such file or directory
And yet there is nothing setting the runtime linker path in the call, even when running the configure script on Ubuntu:
configure:14117: gcc -o conftest -pedantic -std=c99 -g -O2 -pthread -D_REENTRANT -D_THREAD_SAFE -DNDEBUG -D_GNU_SOURCE -I/home/nate/work/slurm/20.11.8/include -L/home/nate/work/slurm/20.11.8/lib conftest.c -lslurm -lslurm >&5
But Ubuntu's configtest somehow has the rpath compiled in. So I am trying to figure out where this difference comes from before we commit a solution.
from slurm-drmaa.
Related Issues (20)
- SLURM in Java HOT 1
- New native specification in User Slurm HOT 1
- Running CLI commands without options segfaults. HOT 2
- slurm-drmaa.spec missing configure options
- slurm 21.08.2 compatibility HOT 3
- Date format for maximum wall clock time
- 'Invalid Trackable RESource (TRES) specification' error HOT 3
- Compatibility with latest SLURM HOT 1
- recipe for installing SLURM and friends on Debian 11 HOT 1
- Galaxy apt debian repository access HOT 1
- Configless Slurm support
- slurm-drmaa for Ubuntu Jammy HOT 2
- Support for `--gpus` flag? HOT 1
- qos and nodelist options
- Support for Slurm 23.02? HOT 5
- drmaa.errors.Conflicting in job submission HOT 3
- dependency libslurm36 missing for debian bookworm HOT 4
- Galaxy Project Depot certificate expired HOT 3
- `--ntasks-per-node` is broken on 23.02
- New native specification for --uid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slurm-drmaa.