getsentry-ldap-auth
getsentry-ldap-auth copied to clipboard
Can't build on CentOS 7 : RUN pip install git+https://github.com/Banno/getsentry-ldap-auth.git
Env : CentOS Linux release 7.4.1708 (Core)
With these installed :
- python-devel
- openldap-devell
- python-ldap.x86_64
How to reproduce:
git clone https://github.com/getsentry/onpremise.git
change requirements.txt like this :
# Add plugins here
sentry-ldap-auth
Hit error like this
......
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.0.0 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/local/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:8:0:
Modules/constants.h:7:18: fatal error: lber.h: No such file or directory
#include "lber.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-n_e8sG/python-ldap/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jDhsKa-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-n_e8sG/python-ldap/
The command '/bin/sh -c if [ -s requirements.txt ]; then pip install -r requirements.txt; fi' returned a non-zero code: 1
make: *** [build] Erreur 1
...........
Running into the same issue on Ubuntu 16.0.4 & macOS 10.13.2
@BenoitPoulet @craig-duffin in sentry-onpremise repo's Dockerfile,
- Change FROM sentry:8.22-onbuild to FROM sentry:8.22
- Add RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
- run make build
On CentOS run yum install openldap-devel
Thanks @aravind-zrx, it worked for me. But when I use version 9.1-onbuild, the following configuration worked for me:
Dockerfile
FROM sentry:9.1-onbuild
RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
RUN pip install sentry-ldap-auth
requirements.txt
# Add plugins here
# Nothing
Due to this issue I have to use the onbuild version, otherwise the config.yml file will not be executed.