Linking error: libRootAuth.so

Hi,

I’m trying to compile ROOT 6.18.04 on a Ubuntu 18 machine, cmake 3.10.2 and python 3.6.8. I get the following linker error:

[ 94%] Built target rsa

[ 94%] Linking CXX shared library ../../lib/libRootAuth.so

../../lib/librsa.a(rsafun.cxx.o): In function `__static_initialization_and_destruction_0':

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_num_sput(rsa_NUMBER*, char*, int)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_decode(char*, int, rsa_NUMBER, rsa_NUMBER)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_encode(char*, int, rsa_NUMBER, rsa_NUMBER)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_genrsa(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER*, rsa_NUMBER*, rsa_NUMBER*)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_genprim(int, int)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_cmp(rsa_NUMBER*, rsa_NUMBER*)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_assign(rsa_NUMBER*, rsa_NUMBER*)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_num_fget(rsa_NUMBER*, _IO_FILE*)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_num_sget(rsa_NUMBER*, char*)'

/home/disipio/local/root-6.18.04/net/auth/src/rsafun.cxx:70: undefined reference to `rsa_num_fput(rsa_NUMBER*, _IO_FILE*)'

collect2: error: ld returned 1 exit status

net/auth/CMakeFiles/RootAuth.dir/build.make:227: recipe for target 'lib/libRootAuth.so' failed

make[2]: *** [lib/libRootAuth.so] Error 1

CMakeFiles/Makefile2:23146: recipe for target 'net/auth/CMakeFiles/RootAuth.dir/all' failed

make[1]: *** [net/auth/CMakeFiles/RootAuth.dir/all] Error 2

Makefile:151: recipe for target 'all' failed

make: *** [all] Error 2

The error message is not particularly helpful. How do I solve this? Should I install additional libraries?

Cheers,
Riccardo

ROOT Version: 6.18.04
Platform: Ubuntu 18
Compiler: cmake 3.10.2


@amadio is this a missing dependency problem?

No, these functions are defined in rsalib.cxx. It’s probably a problem with linking order with the particular compiler that’s being used.

Dear Riccardo,

My desktop machine is a Ubuntu18.04 one and I usually build without problems, at least with the native and the gcc-8 compilers coming from the system. Could you provide more details on how you configure ROOT and the compiler you use?

G Ganis

Hi,

I configured cmake like this:

mkdir root
cd root
cmake ../root-6.18.04/ -DPYTHON_EXECUTABLE=/usr/bin/python3

As for GCC compiler:

$> gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.