daimh/sge

undefined reference to `xdrmem_create', 'xdr_double' in AlmaLinux 9.3

Closed this issue · 5 comments

Hello,
I am trying to install SGE on AlmaLinux 9.3.
Before installing SGE I've installed:
dnf install https://repo.almalinux.org/almalinux/9/CRB/x86_64/os/Packages/libtirpc-devel-1.3.3-2.el9.x86_64.rpm
dnf install cmake hwloc-devel libdb-devel motif-devel ncurses-devel openssl-devel pam-devel rsync systemd-devel wget
dnf group install "Development Tools"

As there are no many header files in /usr/include/rpc I've manually copied them from /usr/include/tirpc/rpc
to /usr/include/rpc as follows:
cp rpc.h /usr/include/rpc/
cp types.h /usr/include/rpc/
cp xdr.h /usr/include/rpc/
cp auth.h /usr/include/rpc/
cp clnt.h /usr/include/rpc/
cp rpc_msg.h /usr/include/rpc/
cp auth_unix.h /usr/include/rpc/
cp auth_des.h /usr/include/rpc/
cp svc.h /usr/include/rpc/
cp svc_auth.h /usr/include/rpc/

Then I've performed the following steps:

  1. git clone https://github.com/daimh/sge.git
  2. cd sge
  3. sh scripts/bootstrap.sh -no-java -no-jni -no-secure -spool-classic -no-remote -no-gui-inst
  4. ./aimk -no-java -no-jni -no-secure -spool-classic -no-remote -no-gui-inst
    Got such error:
    ...
    cc -DSGE_ARCH_STRING="lx-amd64" -O2 -Wstrict-prototypes -DLINUX -DLINUXAMD64 -DLINUXAMD64 -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DTARGET_64BIT -DSGE_PQS_API -DSPOOLING_classic -DHAVE_HWLOC=1 -DNO_JNI -DCOMPILE_DC -D__SGE_COMPILE_WITH_GETTEXT__ -D__SGE_NO_USERMAPPING__ -I../common -I../libs -I../libs/uti -I../libs/juti -I../libs/gdi -I../libs/japi -I../libs/sgeobj -I../libs/cull -I../libs/comm -I../libs/comm/lists -I../libs/sched -I../libs/evc -I../libs/evm -I../libs/mir -I../daemons/common -I../daemons/qmaster -I../daemons/execd -I../clients/common -I. -o test_sge_object -L. -Wl,--as-needed,-rpath,$ORIGIN/../../lib/lx-amd64 test_sge_object.o libsgeobj.a libsgeobjd.a libcull.a libcomm.a libcommlists.a libuti.a -luti -ldl -lm -lpthread
    /usr/bin/ld: libcull.a(pack.o): in function packdouble': pack.c:(.text+0x36c): undefined reference to xdrmem_create'
    /usr/bin/ld: pack.c:(.text+0x379): undefined reference to xdr_double' /usr/bin/ld: libcull.a(pack.o): in function unpackdouble':
    pack.c:(.text+0x7df): undefined reference to xdrmem_create' /usr/bin/ld: pack.c:(.text+0x7ea): undefined reference to xdr_double'
    collect2: error: ld returned 1 exit status
    make: *** [../libs/sgeobj/Makefile:364: test_sge_object] Error 1
    not done
    On AlmaLinux 9.3 in glibc-2.34-83.el9_3.7.x86_64 in /lib64/libc.so.6
    there are such modules:
    nm /lib64/libc.so.6 | grep xdrmem_create
    000000000018e8d0 t __GI_xdrmem_create
    000000000018e8d0 T xdrmem_create@GLIBC_2.2.5

nm /lib64/libc.so.6 | grep xdr_double
0000000000183280 t __GI_xdr_double
0000000000183280 T xdr_double@GLIBC_2.2.5

But xdrmem_create, xdr_double are absent.
I guess it is that may be the reason ?

I wonder how you manged to test SGE on AlmaLinux 9.3 ?
Could you help me how to workaround my problem ?

Can you please try the 'cmake' method?

My weekly automated tests are based on cmake. After a basic Linux OS is prepared, the same script on all Linux distros will call the commands in the file below to compile and install SGE.
https://github.com/daimh/sge/blob/master/tests/include/00-sge-install.sh

I just tested the legacy aimk installation worked under Alma 9.3 too. After 'git clone', please 'dnf install csh', and then run 'make'. To get the exact 'aimk' commands, checkout 'compile.sh', which is generated with 'make'.

Please update when you get a chance, Thanks!

Some Grid Engine supports the same spooling as before.

The ruby requirement is from your rpm spec file. Neither cmake nor the legacy aimk needs ruby.

If your RPM spec file works, feel free to send me a pull request. I will try to add it to the automated weekly test to benefit RHEL users.