From 4236f963d168c3559e4c6f6a7a4542e8851385f6 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 23 Nov 2018 15:45:53 +0000 Subject: [PATCH 1/4] doc: Run install script as root Signed-off-by: Quentin Perret --- doc/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/overview.rst b/doc/overview.rst index eba8cb2df..1b99a5078 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -16,7 +16,7 @@ and then issue these commands:: # A few packages need to be installed, like python3 or kernelshark. Python # modules will be installed in a venv at the next step, without touching # any system-wide install location. - ./install_base_ubuntu.sh + sudo ./install_base_ubuntu.sh # On the first run, it will take care of creating a Python venv and populating it source init_env -- GitLab From b92f5340f078ef347f8d2b314c2b10b8deee7976 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 23 Nov 2018 15:52:04 +0000 Subject: [PATCH 2/4] install: Satisfy dependencies for pycairo lisa-install fails to install pycairo without libcairo2-dev on ubuntu 18.04. Make sure to install it during the first setup. Signed-off-by: Quentin Perret --- install_base_ubuntu.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install_base_ubuntu.sh b/install_base_ubuntu.sh index 1a9a9eae8..84e82b7e4 100755 --- a/install_base_ubuntu.sh +++ b/install_base_ubuntu.sh @@ -65,7 +65,8 @@ apt-get update # venv is not installed by default on Ubuntu, even though it is part of the # Python standard library apt-get -y install build-essential git wget expect kernelshark \ - python3 python3-pip python3-venv python3-tk gobject-introspection + python3 python3-pip python3-venv python3-tk gobject-introspection \ + libcairo2-dev if [ "$install_android_sdk" == y ]; then install_sdk -- GitLab From 5e9b51332b7f6840c681a2f0d53d8d54fc1a19db Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 23 Nov 2018 15:55:05 +0000 Subject: [PATCH 3/4] install: Satisfy dependencies for pygobject lisa-install fails to install pygobject without libgirepository1.0-dev on ubuntu 18.04. Make sure to install it during the first setup. Signed-off-by: Quentin Perret --- install_base_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_base_ubuntu.sh b/install_base_ubuntu.sh index 84e82b7e4..0e5c7c5ba 100755 --- a/install_base_ubuntu.sh +++ b/install_base_ubuntu.sh @@ -66,7 +66,7 @@ apt-get update # Python standard library apt-get -y install build-essential git wget expect kernelshark \ python3 python3-pip python3-venv python3-tk gobject-introspection \ - libcairo2-dev + libcairo2-dev libgirepository1.0-dev if [ "$install_android_sdk" == y ]; then install_sdk -- GitLab From 0f5a388fb42a84dbd962d2558f420bb07f465b9d Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 23 Nov 2018 16:42:58 +0000 Subject: [PATCH 4/4] install: Fix GTK dependencies Travis complains about missing GTK dependencies: WARNING: autodoc: failed to import module 'trace' from module 'lisa'; the following exception was raised: Traceback (most recent call last): File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module __import__(modname) File "/home/travis/build/ARM-software/lisa/lisa/trace.py", line 25, in import trappy File "/home/travis/build/ARM-software/lisa/external/trappy/trappy/__init__.py", line 28, in from trappy.plotter.LinePlot import LinePlot File "/home/travis/build/ARM-software/lisa/external/trappy/trappy/plotter/__init__.py", line 23, in from . import LinePlot File "/home/travis/build/ARM-software/lisa/external/trappy/trappy/plotter/LinePlot.py", line 25, in from trappy.plotter.StaticPlot import StaticPlot File "/home/travis/build/ARM-software/lisa/external/trappy/trappy/plotter/StaticPlot.py", line 23, in import matplotlib.pyplot as plt File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 2374, in switch_backend(rcParams["backend"]) File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/__init__.py", line 892, in __getitem__ plt.switch_backend(rcsetup._auto_backend_sentinel) File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 196, in switch_backend switch_backend(candidate) File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 207, in switch_backend backend_mod = importlib.import_module(backend_name) File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/backends/backend_gtk3agg.py", line 6, in from . import backend_agg, backend_cairo, backend_gtk3 File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/backends/backend_gtk3.py", line 14, in from ._gtk3_compat import GLib, GObject, Gtk, Gdk File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/matplotlib/backends/_gtk3_compat.py", line 43, in gi.require_version("Gtk", "3.0") File "/home/travis/build/ARM-software/lisa/.lisa-venv3/lib/python3.5/site-packages/gi/__init__.py", line 129, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gtk not available Make it shut up by adding a new package to the dependency list in install_base_ubuntu.sh. It is not obvious at all this is a good idea, but we don't really have an alternative solution yet. And we should be able to revert easily if need be. Signed-off-by: Quentin Perret --- install_base_ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_base_ubuntu.sh b/install_base_ubuntu.sh index 0e5c7c5ba..06ee507a0 100755 --- a/install_base_ubuntu.sh +++ b/install_base_ubuntu.sh @@ -66,7 +66,7 @@ apt-get update # Python standard library apt-get -y install build-essential git wget expect kernelshark \ python3 python3-pip python3-venv python3-tk gobject-introspection \ - libcairo2-dev libgirepository1.0-dev + libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 if [ "$install_android_sdk" == y ]; then install_sdk -- GitLab