I’m trying to compile ROOT (root.cern.ch) through the OBS, and I keep getting the following error:
g++ -m64 -D_ALL_SOURCE -D_REENTRANT -D_GNU_SOURCE -fPIC -rdynamic -Wall -Wno-deprecated -D__linux__ -O2 ../../obj/XrdFrmAdminMain.o ../../obj/XrdFrmAdmin.o ../../obj/XrdFrmAdminAudit.o ../../obj/XrdFrmAdminFiles.o ../../obj/XrdFrmAdminFind.o ../../obj/XrdFrmAdminQuery.o ../../obj/XrdFrmAdminUnlink.o ../../obj/XrdXrootdMonitor.o ../../obj/XrdScheduler.o -lnsl -lpthread -lrt -ldl -lc -L../../lib -lXrdFrm -lXrdCms -lXrdOss -lXrdNet -lXrdOuc -lXrdSys -o ../../bin/frm_admin
../../lib/libXrdOss.a(XrdOssAio.o): In function `XrdOssFile::Fsync(XrdSfsAio*)':
XrdOssAio.cc:(.text+0x86): undefined reference to `aio_fsync64'
../../lib/libXrdOss.a(XrdOssAio.o): In function `XrdOssAioWait(void*)':
XrdOssAio.cc:(.text+0x284): undefined reference to `aio_error64'
XrdOssAio.cc:(.text+0x296): undefined reference to `aio_return64'
../../lib/libXrdOss.a(XrdOssAio.o): In function `XrdOssFile::Write(XrdSfsAio*)':
XrdOssAio.cc:(.text+0x618): undefined reference to `aio_write64'
../../lib/libXrdOss.a(XrdOssAio.o): In function `XrdOssFile::Read(XrdSfsAio*)':
XrdOssAio.cc:(.text+0x808): undefined reference to `aio_read64'
../../lib/libXrdSys.a(XrdSysPlugin.o): In function `XrdSysPlugin::getPlugin(char const*, int)':
XrdSysPlugin.cc:(.text+0x65): undefined reference to `dlsym'
XrdSysPlugin.cc:(.text+0xba): undefined reference to `dlerror'
XrdSysPlugin.cc:(.text+0xea): undefined reference to `dlopen'
XrdSysPlugin.cc:(.text+0xff): undefined reference to `dlerror'
../../lib/libXrdSys.a(XrdSysPlugin.o): In function `XrdSysPlugin::~XrdSysPlugin()':
XrdSysPlugin.cc:(.text+0x13a): undefined reference to `dlclose'
../../lib/libXrdSys.a(XrdSysPlugin.o): In function `XrdSysPlugin::~XrdSysPlugin()':
XrdSysPlugin.cc:(.text+0x15a): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[5]: *** ../../bin/frm_admin] Error 1
make[4]: *** [Linuxall] Error 2
make[3]: *** [all] Error 2
make[2]: *** [XrdFrm] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/root-5.26/net/xrootd/src/xrootd'
*** Error condition reported by make (rc = 2):
make: *** [net/xrootd/src/xrootd/LastBuild.d] Error 1
rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx
error: Bad exit status from /var/tmp/rpm-tmp.YucWJz (%build)
As far as I can tell from Googling, this error usually comes from not including -ldl when compiling. I’ve done this, and I still get the error, which makes me think that I’ve not properly required the package that would include this. Is that right? My spec file contains:
Yes, this is for 11.2. Thanks for that, I’ve looked up what SUSE_ASNEEDED does (for anyone else who doesn’t know - when using –as-needed, the order in which the libraries appear in the command line is relevant: any library X must precede all libraries Y that offer symbols that X uses) and it seems like that might help. Rebuilding now - I’ll let you know how that goes.
WARNING: '/usr/lib/rpm/brp-desktop.data/suse-screensavers.menu' does not exist
WARNING: '/usr/lib/rpm/brp-desktop.data/preferences-gnome.menu' does not exist
WARNING: '/usr/lib/rpm/brp-desktop.data/applications-kmenuedit.menu' does not exist
ERROR: No sufficient Category definition: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root.desktop
WARNING: Empty Icon in /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root.desktop
ERROR: No sufficient Category definition: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root-system-bin.desktop
WARNING: file extension in Icon line: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root-system-bin.desktop
ERROR: Icon file not installed: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root-system-bin.desktop (root-system-bin.png)
WARNING: file extension in Icon line: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root-system-bin.desktop
ERROR: Icon file not installed: /usr/src/packages/BUILDROOT/root-5.26-55.1.x86_64//usr/share/applications/root-system-bin.desktop (root-system-bin.png)
Errors in installed desktop file detected. Please mail stbinner@suse.de, if you think this is wrong.
error: Bad exit status from /var/tmp/rpm-tmp.pGSmpw (%install)