Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update apt install prerequisite #172

Merged
merged 1 commit into from
Jan 6, 2020
Merged

update apt install prerequisite #172

merged 1 commit into from
Jan 6, 2020

Conversation

tothi
Copy link
Contributor

@tothi tothi commented Jan 5, 2020

Signed-off-by: tothi tothi@users.noreply.github.com

Signed-off-by: tothi <tothi@users.noreply.github.com>
Res260
Res260 previously approved these changes Jan 6, 2020
@Res260 Res260 dismissed their stale review January 6, 2020 02:44

approved by mistake

@Res260
Copy link
Collaborator

Res260 commented Jan 6, 2020

@tothi What was the issue without python3-dev?

@tothi
Copy link
Contributor Author

tothi commented Jan 6, 2020

one of the requirements failed to install/build during pip3 install -U -e .. (as i remember, it was dbus-python). tested it on a fresh ubuntu 18.04 lxc install.

@obilodeau
Copy link
Collaborator

It's weird because our ubuntu 18.04 docker images build cleanly without it. I checked the logs and python3-dev was pulled in because of another dependency:

---> 775349758637
Step 2/7 : RUN apt-get update && apt-get install -y python3 python3-pip libdbus-1-dev libdbus-glib-1-dev libgl1-mesa-glx notify-osd dbus-x11 && rm -rf /var/lib/apt/lists/*
[...]
The following additional packages will be installed:
adwaita-icon-theme at-spi2-core binutils binutils-common
binutils-x86-64-linux-gnu build-essential ca-certificates cpp cpp-7 dbus
dconf-gsettings-backend dconf-service dh-python dirmngr dpkg-dev fakeroot
file fontconfig fontconfig-config fonts-dejavu-core g++ g++-7 gcc gcc-7
gcc-7-base gir1.2-glib-2.0 glib-networking glib-networking-common
glib-networking-services gnupg gnupg-l10n gnupg-utils gpg gpg-agent
gpg-wks-client gpg-wks-server gpgconf gpgsm gsettings-desktop-schemas
gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme krb5-locales
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libapparmor1 libasan4 libasn1-8-heimdal libassuan0 libatk-bridge2.0-0
libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libavahi-client3
libavahi-common-data libavahi-common3 libbinutils libbsd0 libc-dev-bin
libc6-dev libcairo-gobject2 libcairo2 libcc1-0 libcilkrts5 libcolord2
libcroco3 libcups2 libdatrie1 libdbus-1-3 libdbus-glib-1-2 libdconf1
libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2
libdrm-radeon1 libdrm2 libedit2 libelf1 libepoxy0 libexpat1 libexpat1-dev
libfakeroot libfile-fcntllock-perl libfontconfig1 libfreetype6 libgcc-7-dev
libgdbm-compat4 libgdbm5 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin
libgdk-pixbuf2.0-common libgirepository-1.0-1 libgl1 libgl1-mesa-dri
libglapi-mesa libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev
libglib2.0-dev-bin libglvnd0 libglx-mesa0 libglx0 libgomp1 libgraphite2-3
libgssapi-krb5-2 libgssapi3-heimdal libgtk-3-0 libgtk-3-bin libgtk-3-common
libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
libhx509-5-heimdal libicu60 libisl19 libitm1 libjbig0 libjpeg-turbo8
libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libk5crypto3
libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8
liblcms2-2 libldap-2.4-2 libldap-common libllvm8 liblocale-gettext-perl
liblsan0 libmagic-mgc libmagic1 libmpc3 libmpdec2 libmpfr6 libmpx2 libnpth0
libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0
libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libperl5.26 libpixman-1-0
libpng16-16 libproxy1v5 libpython3-dev libpython3-stdlib libpython3.6
libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libquadmath0
libreadline7 librest-0.7-0 libroken18-heimdal librsvg2-2 librsvg2-common
libsasl2-2 libsasl2-modules libsasl2-modules-db libsensors4
libsoup-gnome2.4-1 libsoup2.4-1 libsqlite3-0 libssl1.1
libstartup-notification0 libstdc++-7-dev libthai-data libthai0 libtiff5
libtsan0 libubsan0 libwayland-client0 libwayland-cursor0 libwayland-egl1
libwind0-heimdal libwnck-3-0 libwnck-3-common libx11-6 libx11-data
libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb1 libxcomposite1
libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1
libxkbcommon0 libxml2 libxrandr2 libxrender1 libxres1 libxshmfence1 libxtst6
libxxf86vm1 linux-libc-dev make manpages manpages-dev mime-support
multiarch-support netbase notify-osd-icons openssl patch perl
perl-modules-5.26 pinentry-curses pkg-config python-pip-whl
python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography
python3-dbus python3-dev python3-distutils python3-gi python3-idna
python3-keyring python3-keyrings.alt python3-lib2to3 python3-minimal
python3-pkg-resources python3-secretstorage python3-setuptools python3-six
python3-wheel python3-xdg python3.6 python3.6-dev python3.6-minimal
readline-common shared-mime-info ubuntu-mono ucf x11-common xdg-user-dirs
xkb-data xz-utils zlib1g-dev

Is it possible that in your install you used --no-install-recommends? I'm going to modify our docker image to use that, this will make it slimmer too so it's a good thing to do anyway.

@obilodeau
Copy link
Collaborator

Was able to reproduce by getting an error when building dbus-python if I installed using --no-install-recommends:

    configure: error: in `/tmp/pip-build-fnr3pxii/dbus-python/build/temp.linux-x86_64-3.6':
    configure: error:
      Could not link test program to Python. Maybe the main Python library has been
      installed in some non-standard library path. If so, pass it to configure,
      via the LIBS environment variable.
      Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
      ============================================================================
       ERROR!
       You probably have to install the development version of the Python package
       for your distribution.  The exact name of this package varies among them.
      ============================================================================

@obilodeau obilodeau merged commit 78a84b4 into GoSecure:master Jan 6, 2020
@tothi
Copy link
Contributor Author

tothi commented Jan 7, 2020

the issue was not about --no-install-recommends (i havent used it). recommends was enabled by default on the ubuntu 18.04 lxc template.

the docker image pulled python3-pip and the git method apt install line misses it. that's the important difference, because python3-pip is the only package here which "recommends" the python3-dev. that was the cause of the issue. (btw, as i think, python3-pip is not needed from package because python3 -m venv bootstraps it.)

anyway, applying --no-install-recommends is surely a good idea for the docker image. ;)
fyi: https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends

@obilodeau
Copy link
Collaborator

Thanks for taking the time to give this clarification! I wasn't sure about your root cause and I didn't see that python3-pip was not there... Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants