cms-gem-daq-project / xhal

XHAL interface library
0 stars 10 forks source link

Bug Report: checkout procedure for release v3.1.0 misses libarary #60

Closed bdorney closed 6 years ago

bdorney commented 6 years ago

Brief summary of issue

Release checkout procedure leaves a binary missing.

Types of issue

Expected Behavior

All binaries should be present when checking out a release.

Current Behavior

Missing the librpcman.so library.

Steps to Reproduce (for bugs)

  1. git clone https://github.com/cms-gem-daq-project/xhal.git
  2. cd xhal
  3. git checkout tags/3.1.0
  4. source setup.sh
  5. python .github/get_binaries.py -t 3.1.0 -l .github/uploads.cfg
  6. reg_interface.py

Step 6 produces the following error:

$ reg_interface.py 
Traceback (most recent call last):
  File "/home/testbeam/DAQ/xhal/python/reg_interface/reg_interface.py", line 4, in <module>
    from rw_reg import *
  File "/home/testbeam/DAQ/xhal/python/reg_interface/rw_reg.py", line 18, in <module>
    lib = CDLL(os.getenv("XHAL_ROOT")+"/lib/x86_64/librpcman.so")
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/testbeam/DAQ/xhal/lib/x86_64/librpcman.so: cannot open shared object file: No such file or directory

Indeed the library is not present:

$ ls  /home/testbeam/DAQ/xhal/lib/x86_64/librpcman.so
ls: cannot access /home/testbeam/DAQ/xhal/lib/x86_64/librpcman.so: No such file or directory

Seems it is not present on the release page:

https://github.com/cms-gem-daq-project/xhal/releases/tag/3.1.0

Possible Solution (for bugs)

Add library to the release page or instructions to the Quick Start Guide for how to obtain this library.

Context (for feature requests)

Expect all binaries to be present when checking out a release.

Your Environment

bdorney commented 6 years ago

After adding librpcman.so by hand I tried again to launch reg_interface.py:

[testbeam@ctp7-pc xhal]$ reg_interface.py 
Traceback (most recent call last):
  File "/home/testbeam/DAQ/xhal/python/reg_interface/reg_interface.py", line 4, in <module>
    from rw_reg import *
  File "/home/testbeam/DAQ/xhal/python/reg_interface/rw_reg.py", line 18, in <module>
    lib = CDLL(os.getenv("XHAL_ROOT")+"/lib/x86_64/librpcman.so")
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: liblog4cplus-1.2.so.5: cannot open shared object file: No such file or directory

Again calling get_binaries.py:

[testbeam@ctp7-pc xhal]$ python .github/get_binaries.py -t 3.1.0 -l .github/uploads.cfg
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/ipbus
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/libxhal.so
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/librwreg.so
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/libxhal_ctp7.so
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/libxerces-c.so
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/liblmdb.so
downloading https://github.com/cms-gem-daq-project/xhal/releases/download/3.1.0/liblog4cplus.so
[testbeam@ctp7-pc xhal]$ reg_interface.py 
Traceback (most recent call last):
  File "/home/testbeam/DAQ/xhal/python/reg_interface/reg_interface.py", line 4, in <module>
    from rw_reg import *
  File "/home/testbeam/DAQ/xhal/python/reg_interface/rw_reg.py", line 18, in <module>
    lib = CDLL(os.getenv("XHAL_ROOT")+"/lib/x86_64/librpcman.so")
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: liblog4cplus-1.2.so.5: cannot open shared object file: No such file or directory

Seems to be a mismatch in the name of liblog4cplus.so vs liblog4cplus-1.2.so? However trying to make a symlink of liblog4cplus-1.2.so pointing to liblog4cplus.so fails.

So something is fishy here.

mexanick commented 6 years ago

this is related to the PC setup. The liblog4cplus is a part of xdaq, so you must have a path to xdaq libs in your $LD_LIBRARY_PATH

bdorney commented 6 years ago

this is related to the PC setup. The liblog4cplus is a part of xdaq, so you must have a path to xdaq libs in your $LD_LIBRARY_PATH

Okay I'll xcheck that, may be xdaq is not installed in this machine so that's definitely one issue. However what about the issue of the missing:

xhal/lib/x86_64/librpcman.so

This binary was not present at time of git clone nor was it fetched by get_binaries.py

mexanick commented 6 years ago

yeah, I'm working on this. I didn't yet commit the fix because there's another problem with the linker (libwiscrpcsvc depends on the libprotobuf and has to be centrally installed as an RPM package, so I need @jsturdy input on that). I'll post updates asap

mexanick commented 6 years ago

Uploads list, system requirements and documentation has been updated. Please see https://github.com/cms-gem-daq-project/xhal/wiki/Quick-start-guide https://github.com/cms-gem-daq-project/xhal/releases/tag/3.1.0