star-bnl / star-sw

Core software for STAR experiment
26 stars 63 forks source link

/lib/libdl.so error when compiling a macro with spack 32-bit #679

Open genevb opened 3 weeks ago

genevb commented 3 weeks ago

In the spack-based STAR libraries, I get an error when instructing ACLiC to compile a macro in 32-bit (it appears to compile fine in 64-bit):

Example:

> cat a.C
void a() {
  int b = 3;
}
 > stardev
 > root -l -b
 *** Start at Date : Mon Apr  8 07:05:06 2024
 root [0] .L a.C++
 Info in <TUnixSystem::ACLiC>: creating shared library /home/tmp/genevb/SCGL/./a_C.so
/lib/libdl.so: error adding symbols: File in wrong format
 collect2: error: ld returned 1 exit status
 Error in <ACLiC>: Compilation failed!
 root [1] 

-Gene

genevb commented 3 weeks ago

/lib/libdl.so is soft-linked to /usr/lib/libdl-2.17.so, and as far as I can tell, that is 32-bit:

> file /usr/lib/libdl-2.17.so
/usr/lib/libdl-2.17.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=329591f5d1971df20d74c34d247b09287e832807, for GNU/Linux 2.6.32, not stripped

-Gene

genevb commented 3 weeks ago

Curiously, with root4star it's a different error than with root: libuuid.so

> root4star -b -l
 *** Start at Date : Mon Apr  8 07:49:00 2024
root [0] .L a.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/tmp/genevb/SCGL/./a_C.so
/lib/libuuid.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Error in <ACLiC>: Compilation failed!
root [1] .q
plexoos commented 3 weeks ago

Thanks for reporting Gene. It is not very clear to me what might have caused this. The recent updates were not supposed to change anything in the 32-bit environment.

genevb commented 3 weeks ago

I can't be 100% certain since I didn't document it, but I think this has been the situation since we started using Spack last year, not just recently.