tue-robotics / wire

BSD 2-Clause "Simplified" License
21 stars 15 forks source link

Use Armadillo system lib #16

Closed MatthijsBurgh closed 2 years ago

MatthijsBurgh commented 4 years ago

Merge together with tue-robotics/tue-env-targets#165

MatthijsBurgh commented 4 years ago

Probably, make sure libarmadillo-dev is installed.

jelfring commented 4 years ago

I have installed libarmadillo-dev, as well as libopenblas-dev liblapack-dev libarpack2-dev. Seems to be a linking problem.

MatthijsBurgh commented 4 years ago

I have tested it on my computer with ubuntu 18.04. And I have tested it both in 16.04 and 18.04 in CI. What system are you running? Maybe try catkin clean armadillo_matrix?

MatthijsBurgh commented 4 years ago

This is what we execute in CI in 16.04 and 18.04. 16.04:

sudo apt-get install --assume-yes -q  ros-kinetic-roscpp libarmadillo-dev ros-kinetic-std-msgs

Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gfortran gfortran-5 hdf5-helpers libaec-dev libaec0 libapr1 libapr1-dev
  libaprutil1 libaprutil1-dev libarmadillo6 libarpack2 libarpack2-dev
  libblas-common libblas-dev libblas3 libgfortran-5-dev libgfortran3
  libhdf5-10 libhdf5-cpp-11 libhdf5-dev libjpeg-dev libjpeg-turbo8-dev
  libjpeg8-dev liblapack-dev liblapack3 libldap2-dev liblog4cxx-dev
  liblog4cxx10-dev liblog4cxx10v5 libsctp-dev libsctp1 libsuperlu-dev
  libsuperlu4 libsz2 ros-kinetic-rosconsole ros-kinetic-rosgraph-msgs
  ros-kinetic-xmlrpcpp uuid-dev zlib1g-dev
Suggested packages:
  gfortran-multilib gfortran-doc gfortran-5-multilib gfortran-5-doc
  libgfortran3-dbg libitpp-dev liblapack-doc-man liblapack-doc libhdf5-doc
  liblog4cxx-doc zip lksctp-tools libsuperlu-doc
The following NEW packages will be installed:
  gfortran gfortran-5 hdf5-helpers libaec-dev libaec0 libapr1 libapr1-dev
  libaprutil1 libaprutil1-dev libarmadillo-dev libarmadillo6 libarpack2
  libarpack2-dev libblas-common libblas-dev libblas3 libgfortran-5-dev
  libgfortran3 libhdf5-10 libhdf5-cpp-11 libhdf5-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblapack3 libldap2-dev
  liblog4cxx-dev liblog4cxx10-dev liblog4cxx10v5 libsctp-dev libsctp1
  libsuperlu-dev libsuperlu4 libsz2 ros-kinetic-rosconsole ros-kinetic-roscpp
  ros-kinetic-rosgraph-msgs ros-kinetic-std-msgs ros-kinetic-xmlrpcpp uuid-dev
  zlib1g-dev
0 upgraded, 42 newly installed, 0 to remove and 17 not upgraded.

18.04:

sudo apt-get install --assume-yes -q  libarmadillo-dev ros-melodic-roscpp ros-melodic-std-msgs

Building dependency tree...
Reading state information...
The following additional packages will be installed:
  hdf5-helpers libaec-dev libaec0 libapr1 libapr1-dev libaprutil1
  libaprutil1-dev libarmadillo8 libarpack2 libarpack2-dev libblas-dev libblas3
  libgfortran4 libhdf5-100 libhdf5-cpp-100 libhdf5-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblapack3 libldap2-dev
  liblog4cxx-dev liblog4cxx10v5 libsctp-dev libsctp1 libsuperlu-dev
  libsuperlu5 libsz2 ros-melodic-rosconsole ros-melodic-rosgraph-msgs
  ros-melodic-xmlrpcpp uuid-dev
Suggested packages:
  libitpp-dev liblapack-doc libhdf5-doc liblog4cxx-doc zip lksctp-tools
  libsuperlu-doc
The following NEW packages will be installed:
  hdf5-helpers libaec-dev libaec0 libapr1 libapr1-dev libaprutil1
  libaprutil1-dev libarmadillo-dev libarmadillo8 libarpack2 libarpack2-dev
  libblas-dev libblas3 libgfortran4 libhdf5-100 libhdf5-cpp-100 libhdf5-dev
  libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev liblapack-dev liblapack3
  libldap2-dev liblog4cxx-dev liblog4cxx10v5 libsctp-dev libsctp1
  libsuperlu-dev libsuperlu5 libsz2 ros-melodic-rosconsole ros-melodic-roscpp
  ros-melodic-rosgraph-msgs ros-melodic-std-msgs ros-melodic-xmlrpcpp uuid-dev
0 upgraded, 36 newly installed, 0 to remove and 2 not upgraded.
jelfring commented 4 years ago

I don't know what is different on my system (Ubuntu 18.04 and ROS Melodic and I executed your command to make sure I have all dependencies installed), but I keep getting linking errors:

/home/elfringj/repos/tmp/devel/lib/libproblib.so: undefined reference to `wrapper_dgesv_'
/home/elfringj/repos/tmp/devel/lib/libproblib.so: undefined reference to `wrapper_ddot_'
/home/elfringj/repos/tmp/devel/lib/libproblib.so: undefined reference to `wrapper_dgetrf_'
MatthijsBurgh commented 4 years ago

I was getting these errors, when I updated armadillo_matrix to the newest armadillo release. Switching to the system lib and replacing the CMake variable by armadillo for the linking fixed the issue for me. So weird this situation.

MatthijsBurgh commented 3 years ago

@jelfring Can you check if adding the arguments mentioned here, https://stackoverflow.com/a/9008747, solves the issue for you?

joselfring-tomtom commented 3 years ago

@jelfring Can you check if adding the arguments mentioned here, https://stackoverflow.com/a/9008747, solves the issue for you?

I guess lapack and/or blas are not enabled? Linking these in problib doesn't seem to solve the issue for me anyway.

I am using: ARMA version: 8.400.0 (Entropy Bandit), which I checked this way: https://stackoverflow.com/questions/37838455/command-to-find-which-version-of-armadillo-is-installed