LDMX-Software / pflib

Library and tool for interacting with polarfires.
https://ldmx-software.github.io/pflib/
4 stars 0 forks source link

uHal Initialization failing to find config files #2

Closed tomeichlersmith closed 2 years ago

tomeichlersmith commented 2 years ago

@jmmans just putting this here so we don't forget to do this. @GeoffreyMullier feel free to update with more info if you think of anything relevant.

This was discovered when attempting to use pflib at Lund on bianca. I am able to configure and build pflib along with linking pftool, but when I try to run pftool uMNio fails to discover the XML configuration files (even though they do exist).

eichl008@bianca:~/pflib/uhal> PFTOOLRC=~/pflib/pftoolrc LD_LIBRARY_PATH=/opt/cactus/lib ../build/pftool <ip-addr-omitted>
09-02-22 18:04:29.475203 [139721210299840] ERROR - No matching files for expression "/uMNio.xml" with parent path "/home/eichl008/pflib/uhal"
Exception!  No matching files for expression "/uMNio.xml" with parent path "/home/eichl008/pflib/uhal"

eichl008@bianca:~/pflib/uhal> ls
uMNio-core.xml  uMNio-daq.xml  uMNio-ioosc.xml  uMNio-laser.xml  uMNio-ldmx.xml  uMNio-qie.xml  uMNio-trig.xml  uMNio.xml

Details

Cmake Output

eichl008@bianca:~/pflib/build> cmake ..
-- The CXX compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Rogue (missing: Rogue_DIR)
-- Unable to find Rogue, will not compile rogue submodule of pflib.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eichl008/pflib/build

Build Output

eichl008@bianca:~/pflib/build> make
Scanning dependencies of target pflib
[  4%] Building CXX object CMakeFiles/pflib.dir/src/pflib/Bias.cxx.o
[  8%] Building CXX object CMakeFiles/pflib.dir/src/pflib/DAQ.cxx.o
[ 12%] Building CXX object CMakeFiles/pflib.dir/src/pflib/Elinks.cxx.o
[ 16%] Building CXX object CMakeFiles/pflib.dir/src/pflib/FastControl.cxx.o
[ 20%] Building CXX object CMakeFiles/pflib.dir/src/pflib/GPIO.cxx.o
[ 25%] Building CXX object CMakeFiles/pflib.dir/src/pflib/Hcal.cxx.o
[ 29%] Building CXX object CMakeFiles/pflib.dir/src/pflib/I2C.cxx.o
[ 33%] Building CXX object CMakeFiles/pflib.dir/src/pflib/ROC.cxx.o
[ 37%] Building CXX object CMakeFiles/pflib.dir/src/pflib/WishboneTarget.cxx.o
[ 41%] Building CXX object CMakeFiles/pflib.dir/src/pflib/Compile.cxx.o
[ 45%] Building CXX object CMakeFiles/pflib.dir/src/pflib/PolarfireTarget.cxx.o
[ 50%] Linking CXX shared library libpflib_pflib.so
[ 50%] Built target pflib
Scanning dependencies of target uhal
[ 54%] Building CXX object CMakeFiles/uhal.dir/src/pflib/uhal/uhalWishboneInterface.cxx.o
[ 58%] Linking CXX shared library libpflib_uhal.so
[ 58%] Built target uhal
Scanning dependencies of target pfdecompile
[ 62%] Building CXX object CMakeFiles/pfdecompile.dir/tool/pfdecompile.cxx.o
[ 66%] Linking CXX executable pfdecompile
[ 66%] Built target pfdecompile
Scanning dependencies of target pfcompile
[ 70%] Building CXX object CMakeFiles/pfcompile.dir/tool/pfcompile.cxx.o
[ 75%] Linking CXX executable pfcompile
[ 75%] Built target pfcompile
Scanning dependencies of target pfdecoder
[ 79%] Building CXX object CMakeFiles/pfdecoder.dir/tool/pfdecoder.cc.o
[ 83%] Linking CXX executable pfdecoder
[ 83%] Built target pfdecoder
Scanning dependencies of target pftool
[ 87%] Building CXX object CMakeFiles/pftool.dir/tool/pftool.cc.o
[ 91%] Building CXX object CMakeFiles/pftool.dir/tool/Menu.cc.o
[ 95%] Building CXX object CMakeFiles/pftool.dir/tool/Rcfile.cc.o
[100%] Linking CXX executable pftool
[100%] Built target pftool
tomeichlersmith commented 2 years ago

Resolved! Just an issue with absolute vs relative paths, changing how the path is calculated lets you use the absolute path (via the IPBUS_MAP_PATH environment variable) or the relative path by running in the uhal directory.

https://github.com/LDMX-Software/pflib/commit/87e5fb7bc6d1f1e1385258089b2ab5a21c0506a7