Compilation fails with "unrecognized command-line option '-R'"

When compiling ROOT while installing MEGALIB I get

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

x86_64-conda-linux-gnu-c++: error: unrecognized command-line option ‘-R’

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

make[1]: *** [graf2d/asimage/CMakeFiles/ASImage.dir/all] Error 2

I can’t figure out where the -R is coming from…

Configure command: cmake -DCMAKE_INSTALL_PREFIX=… -DCMAKE_CXX_STANDARD=11 -Dgminimal=ON -Dopengl=ON -Dmathmore=ON -Dminuit2=ON -Dxft=ON -Dasimage=ON -Dexplicitlink=ON -Drpath=ON -Dsoversion=ON -DPYTHON_EXECUTABLE:FILEPATH=/home/QC_user2/python3.9/bin/python3 -Dpython3=ON -Dalien=OFF -Dbonjour=OFF -Dcastor=OFF -Ddavix=OFF -Dfortran=OFF -Dfitsio=OFF -Dchirp=OFF -Ddcache=OFF -Dgfal=OFF -Dglite=off -Dhdfs=OFF -Dkerb5=OFF -Dldap=OFF -Dmonalisa=OFF -Dodbc=OFF -Doracle=OFF -Dpch=OFF -Dpgsql=OFF -Dpythia6=OFF -Dpythia8=OFF -Drfio=OFF -Dsapdb=OFF -Dshadowpw=OFF -Dsqlite=OFF -Dsrp=OFF -Dssl=OFF -Dxrootd=OFF …/root_v6.24.08-source
– The C compiler identification is GNU 13.1.0
– The CXX compiler identification is GNU 13.1.0

Compiler Flags: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/anaconda3/envs/megalib/include -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread

Compiler GNU 13.1.0
Compiler flags:
C -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/anaconda3/envs/megalib/include -Wno-implicit-fallthrough -pipe -Wall -W -pthread -DNDEBUG
C++ -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/anaconda3/envs/megalib/include -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -DNDEBUG
Linker flags:
Executable -Wl,-O2 -Wl,–sort-common -Wl,–as-needed -Wl,-z,relro -Wl,-z,now -Wl,–disable-new-dtags -Wl,–gc-sections -Wl,–allow-shlib-undefined -Wl,-rpath,/usr/local/anaconda3/envs/megalib/lib -Wl,-rpath-link,/usr/local/anaconda3/envs/megalib/lib -L/usr/local/anaconda3/envs/megalib/lib -rdynamic
Module -Wl,-O2 -Wl,–sort-common -Wl,–as-needed -Wl,-z,relro -Wl,-z,now -Wl,–disable-new-dtags -Wl,–gc-sections -Wl,–allow-shlib-undefined -Wl,-rpath,/usr/local/anaconda3/envs/megalib/lib -Wl,-rpath-link,/usr/local/anaconda3/envs/megalib/lib -L/usr/local/anaconda3/envs/megalib/lib
Shared -Wl,-O2 -Wl,–sort-common -Wl,–as-needed -Wl,-z,relro -Wl,-z,now -Wl,–disable-new-dtags -Wl,–gc-sections -Wl,–allow-shlib-undefined -Wl,-rpath,/usr/local/anaconda3/envs/megalib/lib -Wl,-rpath-link,/usr/local/anaconda3/envs/megalib/lib -L/usr/local/anaconda3/envs/megalib/lib -Wl,–no-undefined -Wl,–hash-style=“both”

– Enabled support for: asimage builtin_clang builtin_cling builtin_llvm mathmore minuit2 opengl rpath shared soversion x11

_ROOT Version: 6.24.08
_Platform: CentOS6
_Compiler: x86_64-conda-linux-gnu-c++


Welcome to the ROOT Forum!
Can you try with the builtin libAfterImage? (i.e. using -Dbuiltin_afterimage=ON)

That worked, thank you!

1 Like

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