Louis commented on issue #2128 at GitLab.org / charts / GitLab Chart

Louis
2020-06-08T10:49:10Z

@WarheadsSE @twk3

The crcmod pip module is a little stupid : it doesn't fail/output a warning if gcc is not present. So in the case of https://gitlab.com/gitlab-org/build/CNG/-/blob/master/gitlab-task-runner/Dockerfile pip successfully install the crcmod python module, but doesn't compile the actual C module.

Proof :

root@gitlab-task-runner-57868b7766-qqtgd:/# pip3 freeze
argcomplete==1.11.1
boto==2.49.0
cffi==1.14.0
crcmod==1.7
cryptography==2.9.2
fasteners==0.15
gcs-oauth2-boto-plugin==2.5
google-apitools==0.5.31
google-reauth==0.1.0
gsutil==4.43
httplib2==0.18.1
importlib-metadata==1.6.0
mock==2.0.0
monotonic==1.5
oauth2client==4.1.3
pbr==5.4.5
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
pyOpenSSL==19.1.0
python-dateutil==2.8.1
python-magic==0.4.18
pyu2f==0.1.4
retry-decorator==1.1.1
rsa==4.0
s3cmd==2.1.0
six==1.15.0
SocksiPy-branch==1.1
zipp==3.1.0
root@gitlab-task-runner-57868b7766-qqtgd:/# gsutil version -l
gsutil version: 4.43
checksum: PACKAGED_GSUTIL_INSTALLS_DO_NOT_HAVE_CHECKSUMS (!= e7f1e5de4827aa8914a8c19ab7dc45ce)
boto version: 2.49.0
python version: 3.7.3 (default, Apr 8 2020, 22:41:08) [GCC 6.3.0 20170516]
OS: Linux 4.14.138+
multiprocessing available: True
using cloud sdk: False
pass cloud sdk credentials to gsutil: False
config path(s): No config found
gsutil path: /usr/local/bin/gsutil
compiled crcmod: False
installed via package manager: True
editable install: False

root@gitlab-task-runner-57868b7766-qqtgd:/# dpkg -l | grep gcc
ii gcc-6-base:amd64 6.3.0-18+deb9u1 amd64 GCC, the GNU Compiler Collection (base package)
ii libgcc-6-dev:amd64 6.3.0-18+deb9u1 amd64 GCC support library (development files)
ii libgcc1:amd64 1:6.3.0-18+deb9u1 amd64 GCC support library
root@gitlab-task-runner-57868b7766-qqtgd:/# gcc
bash: gcc: command not found

root@gitlab-task-runner-57868b7766-qqtgd:/# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils cpp cpp-6 gcc-6 libcc1-0 libisl15 libmpc3 libmpfr4
Suggested packages:
binutils-doc cpp-doc gcc-6-locales gcc-multilib make manpages-dev autoconf automake libtool flex bison gdb gcc-doc gcc-6-multilib gcc-6-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg
libmpx2-dbg libquadmath0-dbg
The following NEW packages will be installed:
binutils cpp cpp-6 gcc gcc-6 libcc1-0 libisl15 libmpc3 libmpfr4
0 upgraded, 9 newly installed, 0 to remove and 3 not upgraded.
Need to get 18.5 MB of archives.
After this operation, 75.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

root@gitlab-task-runner-57868b7766-qqtgd:/# dpkg -l | grep gcc
ii gcc 4:6.3.0-4 amd64 GNU C compiler
ii gcc-6 6.3.0-18+deb9u1 amd64 GNU C compiler
ii gcc-6-base:amd64 6.3.0-18+deb9u1 amd64 GCC, the GNU Compiler Collection (base package)
ii libgcc-6-dev:amd64 6.3.0-18+deb9u1 amd64 GCC support library (development files)
ii libgcc1:amd64 1:6.3.0-18+deb9u1 amd64 GCC support library

root@gitlab-task-runner-57868b7766-qqtgd:/# pip3 uninstall crcmod
Uninstalling crcmod-1.7:
Would remove:
/usr/local/lib/python3.7/site-packages/crcmod-1.7-py3.7.egg-info
/usr/local/lib/python3.7/site-packages/crcmod/*
Proceed (y/n)? y
Successfully uninstalled crcmod-1.7

root@gitlab-task-runner-57868b7766-qqtgd:/# pip3 install crcmod
Collecting crcmod
Using cached https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz
Installing collected packages: crcmod
Running setup.py install for crcmod ... done
Successfully installed crcmod-1.7
You are using pip version 19.0.3, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

root@gitlab-task-runner-57868b7766-qqtgd:/# gsutil version -l
gsutil version: 4.43
checksum: PACKAGED_GSUTIL_INSTALLS_DO_NOT_HAVE_CHECKSUMS (!= e7f1e5de4827aa8914a8c19ab7dc45ce)
boto version: 2.49.0
python version: 3.7.3 (default, Apr 8 2020, 22:41:08) [GCC 6.3.0 20170516]
OS: Linux 4.14.138+
multiprocessing available: True
using cloud sdk: False
pass cloud sdk credentials to gsutil: False
config path(s): No config found
gsutil path: /usr/local/bin/gsutil
compiled crcmod: True
installed via package manager: True
editable install: False