Cryptacular is broken

2024/10/5 1:23:43

this weekend our docker image broke because it cannot be build anymore. While looking into the stats, I saw this line:

crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory

In more detail:

  Running setup.py bdist_wheel for cryptacular: startedRunning setup.py bdist_wheel for cryptacular: finished with status 'error'Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sayd65k0/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp5734bf55pip-wheel- --python-tag cp36:running bdist_wheelrunning buildrunning build_pycreating buildcreating build/lib.linux-x86_64-3.6creating build/lib.linux-x86_64-3.6/cryptacularcopying cryptacular/__init__.py -> build/lib.linux-x86_64-3.6/cryptacularcreating build/lib.linux-x86_64-3.6/cryptacular/cryptcopying cryptacular/crypt/test_crypt.py -> build/lib.linux-x86_64-3.6/cryptacular/cryptcopying cryptacular/crypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/cryptcreating build/lib.linux-x86_64-3.6/cryptacular/bcryptcopying cryptacular/bcrypt/test_bcrypt.py -> build/lib.linux-x86_64-3.6/cryptacular/bcryptcopying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/bcryptcreating build/lib.linux-x86_64-3.6/cryptacular/corecopying cryptacular/core/test_core.py -> build/lib.linux-x86_64-3.6/cryptacular/corecopying cryptacular/core/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/corecreating build/lib.linux-x86_64-3.6/cryptacular/pbkdf2copying cryptacular/pbkdf2/test_pbkdf2.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2copying cryptacular/pbkdf2/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2running egg_infowriting cryptacular.egg-info/PKG-INFOwriting dependency_links to cryptacular.egg-info/dependency_links.txtwriting namespace_packages to cryptacular.egg-info/namespace_packages.txtwriting requirements to cryptacular.egg-info/requires.txtwriting top-level names to cryptacular.egg-info/top_level.txtreading manifest file 'cryptacular.egg-info/SOURCES.txt'reading manifest template 'MANIFEST.in'writing manifest file 'cryptacular.egg-info/SOURCES.txt'copying cryptacular/bcrypt/_bcrypt.c -> build/lib.linux-x86_64-3.6/cryptacular/bcryptrunning build_extbuilding 'cryptacular.bcrypt._bcrypt' extensioncreating build/temp.linux-x86_64-3.6creating build/temp.linux-x86_64-3.6/crypt_blowfish-1.2creating build/temp.linux-x86_64-3.6/cryptacularcreating build/temp.linux-x86_64-3.6/cryptacular/bcryptgcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_blowfish.ogcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_gensalt.ogcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/wrapper.ogcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-3.6/cryptacular/bcrypt/_bcrypt.oIn file included from /usr/local/include/python3.6m/Python.h:39:0,from cryptacular/bcrypt/_bcrypt.c:26:crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory#include <gnu-crypt.h>^compilation terminated.error: command 'gcc' failed with exit status 1----------------------------------------Failed building wheel for cryptacularRunning setup.py clean for cryptacular

Our implementation works with the package cryptacular which uses bcrypt. None of the packages were updated last week and I dont know where to start.

As additional information, the error occurs in this block of our Dockerfile

RUN apt-get install -y build-essential libfontconfig && \pip install -q -U pip && \pip install -q -r requirements.txt && \apt-get remove -y --purge build-essential && \apt-get autoremove -y && \apt-get clean -y

where the requirements.txt uses cryptacular==1.4.1

Edit: We are working with the python:3.6-slim image

Answer

I had the same issue running python 3.6.6. With this one liner I was able to install cryptacular from the latest commit.

pipenv install -e hg+https://bitbucket.org/dholth/cryptacular@cb96fb3#egg=cryptacular

You will need to have mercurial installed

apt-get update && apt-get install -y mercurial

More info on this thread

https://en.xdnf.cn/q/70542.html

Related Q&A

how to run test against the built image before pushing to containers registry?

From the gitlab documentation this is how to create a docker image using kaniko: build:stage: buildimage:name: gcr.io/kaniko-project/executor:debugentrypoint: [""]script:- mkdir -p /kaniko/.d…

Adding a colorbar to a pcolormesh with polar projection

I am trying to add a colorbar to a pcolormesh plot with polar projection. The code works fine if I dont specify a polar projection. With polar projection specified, a tiny plot results, and the colorba…

GridSearch for Multi-label classification in Scikit-learn

I am trying to do GridSearch for best hyper-parameters in every individual one of ten folds cross validation, it worked fine with my previous multi-class classification work, but not the case this time…

Visualize tree in bash, like the output of unix tree

Given input:apple: banana eggplant banana: cantaloupe durian eggplant: fig:I would like to concatenate it into the format:├─ apple │ ├─ banana │ │ ├─ cantaloupe │ │ └─ durian │ └…

pygame.error: Failed loading libmpg123.dll: Attempt to access invalid address

music = pygame.mixer.music.load(not.mp3) pygame.mixer.music.play(loops=-1)when executing the code I got this error: Traceback (most recent call last):File "C:\Users\Admin\AppData\Local\Programs\Py…

Plot Red Channel from 3D Numpy Array

Suppose that we have an RGB image that we have converted it to a Numpy array with the following code:import numpy as np from PIL import Imageimg = Image.open(Peppers.tif) arr = np.array(img) # 256x256x…

How to remove image noise using opencv - python?

I am working with skin images, in recognition of skin blemishes, and due to the presence of noises, mainly by the presence of hairs, this work becomes more complicated.I have an image example in which …

Django groups and permissions

I would like to create 2 groups (Professors, Students). And I would like to restrict students from creating and deleting Courses.views.py:def is_professor(function=None):def _is_professor(u):if user.gr…

How to (properly) use external credentials in an AWS Lambda function?

I have a (extremely basic but perfectly working) AWS lambda function written in Python that however has embedded credentials to connect to: 1) an external web service 2) a DynamoDB table. What the fu…

How to set environment variable TF_Keras = 1 for onnx conversion?

Recently updated to tensorflow 2.0 and am having trouble getting my .h5 models into .onnx . Used to be a very simple procedure but now I am having an issue. When I run the following code:# onnx testing…