Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Can't build on CentOS 7 : RUN pip install git+https://github.com/Banno/getsentry-ldap-auth.git #30

Open
BenoitPoulet opened this issue Apr 3, 2018 · 4 comments

Comments

@BenoitPoulet
Copy link

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
...........

@no-acl
Copy link

no-acl commented Apr 6, 2018

Running into the same issue on Ubuntu 16.0.4 & macOS 10.13.2

@aravind-zrx
Copy link

@BenoitPoulet @craig-duffin in sentry-onpremise repo's Dockerfile,

  1. Change FROM sentry:8.22-onbuild to FROM sentry:8.22
  2. Add RUN apt-get update && apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev
  3. run make build

@pramsky
Copy link

pramsky commented Oct 25, 2018

On CentOS run yum install openldap-devel

@suuzee
Copy link

suuzee commented Apr 17, 2019

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.

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

No branches or pull requests

5 participants