Open civerachb-cpr opened 2 years ago
Did you try to find out which package is required through which other package, for example with the answers from this stackoverflow question?
See the attached output. The sheer number of dependencies is a little overwhelming. A few stand-out packages that make me scratch my head are things like abiword
and the various aspell-*
dictionaries.
I think what's happening is that apt is installing recommended packages by default, and something in the dependencies has changed between 18.04 and 20.04 to cause a lot of unnecessary packages to be brought in because of that.
Installing the package with
sudo apt-get install ros-noetic-pcl-ros --no-install-recommends
appears to mitigate the problem somewhat:
$ sudo apt-get install ros-noetic-pcl-ros --no-install-recommends
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cython3 hdf5-helpers libaec-dev libarmadillo-dev libarpack2-dev libblas-dev libcfitsio-dev libcharls-dev libclang1-10 libcurl4-gnutls-dev libdap-dev libdapserver7v5 libdouble-conversion3 libegl-dev libegl-mesa0 libegl1
libepsilon-dev libflann-dev libflann1.9 libfontconfig1-dev libfreetype-dev libfreetype6-dev libfreexl-dev libfyba-dev libgbm1 libgdal-dev libgeos-dev libgeotiff-dev libgif-dev libgl-dev libgl1-mesa-dev libgl2ps-dev
libgles-dev libgles1 libgles2 libglew-dev libglew2.1 libglu1-mesa libglu1-mesa-dev libglvnd-dev libglx-dev libhdf4-alt-dev libhdf5-cpp-103 libhdf5-dev libhdf5-mpi-dev libhdf5-openmpi-dev libhyphen0 libice-dev libinput-bin
libinput10 libjson-c-dev libjsoncpp-dev libkml-dev libkmlconvenience1 libkmlregionator1 libkmlxsd1 liblapack-dev libllvm10 libminizip-dev libmtdev1 libnetcdf-cxx-legacy-dev libnetcdf-dev libogdi-dev libogg-dev libopengl-dev
libopengl0 libopenjp2-7-dev libopenni-dev libopenni0 libopenni2-0 libopenni2-dev libpcl-apps1.10 libpcl-common1.10 libpcl-dev libpcl-features1.10 libpcl-filters1.10 libpcl-io1.10 libpcl-kdtree1.10 libpcl-keypoints1.10
libpcl-ml1.10 libpcl-octree1.10 libpcl-outofcore1.10 libpcl-people1.10 libpcl-recognition1.10 libpcl-registration1.10 libpcl-sample-consensus1.10 libpcl-search1.10 libpcl-segmentation1.10 libpcl-stereo1.10 libpcl-surface1.10
libpcl-tracking1.10 libpcl-visualization1.10 libpcre2-16-0 libpoppler-dev libpoppler-private-dev libpq-dev libproj-dev libpthread-stubs0-dev libqhull-dev libqhull-r7 libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5designer5
libqt5designercomponents5 libqt5gui5 libqt5help5 libqt5network5 libqt5opengl5 libqt5opengl5-dev libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickparticles5 libqt5quickshapes5 libqt5quicktest5
libqt5quickwidgets5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5webkit5-dev libqt5widgets5 libqt5x11extras5 libqt5xml5 libsm-dev libspatialite-dev libsuperlu-dev libtheora-dev
libtk8.6 liburiparser-dev libvtk7-dev libvtk7-java libvtk7-jni libvtk7-qt-dev libvtk7.1p libvtk7.1p-qt libvulkan-dev libwacom-common libwacom2 libwayland-server0 libwebp-dev libwoff1 libx11-dev libxau-dev libxcb-icccm4
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-shape0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev libxdmcp-dev libxerces-c-dev libxext-dev libxft-dev libxft2 libxkbcommon-x11-0 libxml2-dev
libxrender-dev libxss-dev libxt-dev libzstd-dev python3-autobahn python3-cbor python3-lz4 python3-mpi4py python3-pyqrcode python3-snappy python3-trie python3-txaio python3-u-msgpack python3-ubjson python3-vtk7 python3-wsaccel
qdoc-qt5 qhelpgenerator-qt5 qt5-assistant qt5-qmake qt5-qmake-bin qt5-qmltooling-plugins qtattributionsscanner-qt5 qtbase5-dev qtbase5-dev-tools qtchooser qtdeclarative5-dev qtdeclarative5-dev-tools qttools5-dev
qttools5-dev-tools qttools5-private-dev ros-noetic-pcl-conversions ros-noetic-pcl-msgs ros-noetic-tf2-eigen tcl tcl-dev tcl-vtk7 tcl8.6-dev tk tk-dev tk8.6 tk8.6-dev unixodbc-dev vtk7 x11proto-core-dev x11proto-dev
x11proto-scrnsaver-dev x11proto-xext-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
cython-doc libitpp-dev liblapack-doc libcurl4-doc libgnutls28-dev libidn11-dev libkrb5-dev librtmp-dev libssh2-1-dev freetype2-doc libgdal-doc libgeotiff-epsg glew-utils libhdf5-doc libice-doc netcdf-bin netcdf-doc openni-doc
openni2-doc libpcl-doc postgresql-doc-12 qt5-image-formats-plugins qtwayland5 libsm-doc libsuperlu-doc vtk7-doc vtk7-examples java-virtual-machine libx11-doc libxcb-doc libxerces-c-doc libxext-doc libxt-doc python-trie-doc
python-txaio-doc mayavi2 qt5-doc firebird-dev tcl-doc tcl8.6-doc tk-doc tk8.6-doc
Recommended packages:
libcfitsio-doc libopenni-sensor-pointclouds0 | libopenni-sensor-primesense0 qttranslations5-l10n libqt5svg5 qt5-gtk-platformtheme geoclue-2.0 libwacom-bin python3-png xterm | x-terminal-emulator
The following NEW packages will be installed:
cython3 hdf5-helpers libaec-dev libarmadillo-dev libarpack2-dev libblas-dev libcfitsio-dev libcharls-dev libclang1-10 libcurl4-gnutls-dev libdap-dev libdapserver7v5 libdouble-conversion3 libegl-dev libegl-mesa0 libegl1
libepsilon-dev libflann-dev libflann1.9 libfontconfig1-dev libfreetype-dev libfreetype6-dev libfreexl-dev libfyba-dev libgbm1 libgdal-dev libgeos-dev libgeotiff-dev libgif-dev libgl-dev libgl1-mesa-dev libgl2ps-dev
libgles-dev libgles1 libgles2 libglew-dev libglew2.1 libglu1-mesa libglu1-mesa-dev libglvnd-dev libglx-dev libhdf4-alt-dev libhdf5-cpp-103 libhdf5-dev libhdf5-mpi-dev libhdf5-openmpi-dev libhyphen0 libice-dev libinput-bin
libinput10 libjson-c-dev libjsoncpp-dev libkml-dev libkmlconvenience1 libkmlregionator1 libkmlxsd1 liblapack-dev libllvm10 libminizip-dev libmtdev1 libnetcdf-cxx-legacy-dev libnetcdf-dev libogdi-dev libogg-dev libopengl-dev
libopengl0 libopenjp2-7-dev libopenni-dev libopenni0 libopenni2-0 libopenni2-dev libpcl-apps1.10 libpcl-common1.10 libpcl-dev libpcl-features1.10 libpcl-filters1.10 libpcl-io1.10 libpcl-kdtree1.10 libpcl-keypoints1.10
libpcl-ml1.10 libpcl-octree1.10 libpcl-outofcore1.10 libpcl-people1.10 libpcl-recognition1.10 libpcl-registration1.10 libpcl-sample-consensus1.10 libpcl-search1.10 libpcl-segmentation1.10 libpcl-stereo1.10 libpcl-surface1.10
libpcl-tracking1.10 libpcl-visualization1.10 libpcre2-16-0 libpoppler-dev libpoppler-private-dev libpq-dev libproj-dev libpthread-stubs0-dev libqhull-dev libqhull-r7 libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5designer5
libqt5designercomponents5 libqt5gui5 libqt5help5 libqt5network5 libqt5opengl5 libqt5opengl5-dev libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickparticles5 libqt5quickshapes5 libqt5quicktest5
libqt5quickwidgets5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5webkit5-dev libqt5widgets5 libqt5x11extras5 libqt5xml5 libsm-dev libspatialite-dev libsuperlu-dev libtheora-dev
libtk8.6 liburiparser-dev libvtk7-dev libvtk7-java libvtk7-jni libvtk7-qt-dev libvtk7.1p libvtk7.1p-qt libvulkan-dev libwacom-common libwacom2 libwayland-server0 libwebp-dev libwoff1 libx11-dev libxau-dev libxcb-icccm4
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-shape0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb1-dev libxdmcp-dev libxerces-c-dev libxext-dev libxft-dev libxft2 libxkbcommon-x11-0 libxml2-dev
libxrender-dev libxss-dev libxt-dev libzstd-dev python3-autobahn python3-cbor python3-lz4 python3-mpi4py python3-pyqrcode python3-snappy python3-trie python3-txaio python3-u-msgpack python3-ubjson python3-vtk7 python3-wsaccel
qdoc-qt5 qhelpgenerator-qt5 qt5-assistant qt5-qmake qt5-qmake-bin qt5-qmltooling-plugins qtattributionsscanner-qt5 qtbase5-dev qtbase5-dev-tools qtchooser qtdeclarative5-dev qtdeclarative5-dev-tools qttools5-dev
qttools5-dev-tools qttools5-private-dev ros-noetic-pcl-conversions ros-noetic-pcl-msgs ros-noetic-pcl-ros ros-noetic-tf2-eigen tcl tcl-dev tcl-vtk7 tcl8.6-dev tk tk-dev tk8.6 tk8.6-dev unixodbc-dev vtk7 x11proto-core-dev
x11proto-dev x11proto-scrnsaver-dev x11proto-xext-dev xorg-sgml-doctools xtrans-dev
At the very least using the --no-install-recommends
flag saves ~200MB of dependencies from being brought in.
+1, why would you need full gdm3
to be installed with this package?
I have researched this problem.
apt-rdepends -f Depends,Recommends -s Depends,Recommends ros-noetic-pcl-ros
Using this command, we can locate what brings gnome-shell (and hence gdm3).
The key part is ... "libnotify4" which has gnome-shell as Recommended dependency (ps. defaultly apt installs Recommended dependency)
https://packages.ubuntu.com/focal/libnotify4 From Ubuntu's package description, we can find that, gnome-shell has been added to libnotify4's Recommended dependency in focal (Ubuntu20.04), resulting that, when you install libnotify4 in some way, gnome-shell is also installed.
Also notice that in jammy (Ubuntu22.04), gnome-shell in dependency has dropped from Recommended to Suggested. I think the package manager may have been aware of the problem and fixed it then.
My suggestion is that, when using Ubuntu server (20.04<=version<22.04),
always manually install the problematic libnotify4 in early setting
sudo apt install libnotify4 --no-install-recommends
This prevents unintentionally installing gnome-shell as dependency afterward.
ps. not sure if there is other libs besides libnotify4 has the same property. If this happens again, just use the same method to locate the problematic lib.
Install notify-osd
with apt before installing ros-noetic-pcl-ros
:
sudo apt-get install notify-osd
sudo apt-get install ros-noetic-pcl-ros
Thanks to @mhosmar-cpr and David G from the VTK team for digging into this more. After determining that the issue didn't appear to be with the PCL packages themselves, our next suspect was VTK, which is included as a dependency. We opened a ticket on their GitLab page, and one of the developers there was able to dig into the issue more and identified the culprit as an altered dependency of ffmpeg
:
I dug just a bit deeper, and found that the focal vs. xenial change occurred within ffmpeg. The libavutil56 package requires libopencl1, whereas the older libavutil55 package did not. -source
This dependency change introduces a dependency on then notification-daemon
virtual package. If this dependency is not already satisfied, apt
installs the default packages to resolve it, which is where the Ubuntu Desktop, GDM, and other graphical dependencies are pulled in from. Installing notify-osd
first will provide notification-daemon
, thereby resolving the dependency without pulling in gdm3
et al.
This works even if apt is configured to install recommended packages. (Note that on a command-line only system pcl_ros
still pulls in a LOT of other dependencies, but you should at least be able to avoid having GDM suddenly present on your previously headless system.)
notification-daemon
EDIT
Solution found. See: https://github.com/ros-perception/perception_pcl/issues/355#issuecomment-1122792416
Original issue report
When building or installing this package on Ubuntu 20.04 with a command-line only installation, the following additional dependencies get installed:
Specifically in our case, the
ubuntu-session
,network-manager
, and packages relating to Gnome3 are actively hindering the performance of our robots. For example, it appears that the default power-management settings that get brought in via a dependency include automatic power-off/sleep after a fixed duration without keyboard or mouse interaction within approximately 20 minutes, causing the robot to shut down unless additional steps are taken to reconfigure the unwanted desktop session.Packages like
cheese
andaspell
are unnecessary additions that eat up disk space, but aren't otherwise harmful. But I'm confused about why they're required as dependencies for a point-cloud processing package.Has anyone else used
pcl_ros
in a command-line-only Ubuntu environment and seen this issue? And if you have, do you have a work-around to prevent the desktop packages and their dependencies from being installed?