bio-arm / bio-arm.github.io

0 stars 1 forks source link

Provide `udunits2` #3

Closed martin-g closed 1 year ago

martin-g commented 1 year ago

openEuler does not provide an OS package for libudunits2-dev

This leads to build failures like https://bio-arm.github.io/openeuler-0526/report/granulator/kunpeng2-install.html

checking for ut_read_xml in -ludunits2... no
configure: error: in `/tmp/RtmplVfNN1/R.INSTALL20d4fb3f653121/units':
configure: error: 
--------------------------------------------------------------------------------
  Configuration failed because libudunits2.so was not found. Try installing:
    * deb: libudunits2-dev (Debian, Ubuntu, ...)
    * rpm: udunits2-devel (Fedora, EPEL, ...)
    * brew: udunits (OSX)
  If udunits2 is already installed in a non-standard location, use:
    --configure-args='--with-udunits2-lib=/usr/local/lib'
  if the library was not found, and/or:
    --configure-args='--with-udunits2-include=/usr/include/udunits2'
  if the header was not found, replacing paths with appropriate values.
  You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
--------------------------------------------------------------------------------
martin-g commented 1 year ago

Also

martin-g commented 1 year ago

I have fixed this issue by manually installing libudunits-2:

git clone https://github.com/Unidata/UDUNITS-2.git
cd UDUNITS-2
mkdir build && cd build
sudo dnf install -y expat-devel flex bison
cmake ..
make -j
cmake --install . --prefix /home/biocbuild/libudunits-2/
export UDUNITS2_INCLUDE="/home/biocbuild/libudunits-2/include"
export UDUNITS2_LIBS="/home/biocbuild/libudunits-2/lib"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$UDUNITS2_LIBS