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

pip install xmlsec crashes on Debian #1

Closed
yaroslav-ilin opened this issue Dec 18, 2014 · 35 comments
Closed

pip install xmlsec crashes on Debian #1

yaroslav-ilin opened this issue Dec 18, 2014 · 35 comments

Comments

@yaroslav-ilin
Copy link

I’m on Debian 7.7

Linux *.com 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux

user@host:~$ dpkg --get-selections | grep libxml2
libxml2:amd64                   install
libxml2-dev:amd64               install
user@host:~$ dpkg --get-selections | grep libxmlsec1
libxmlsec1                  install
libxmlsec1-dev                  install
libxmlsec1-gcrypt               install
libxmlsec1-gnutls               install
libxmlsec1-nss                  install
libxmlsec1-openssl              install
user@host:~$ dpkg --get-selections | grep python-dev
python-dev                  install

Running pip install xmlsec fails to build with following message:

creating build/temp.linux-x86_64-2.7/src/xmlsec

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/usr/local/lib/python2.7/dist-packages/lxml -I/usr/local/lib/python2.7/dist-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1

gcc: error: src/xmlsec/constants.c: No such file or directory

gcc: fatal error: no input files

compilation terminated.

error: command 'gcc' failed with exit status 4

What am I doing wrong?

@mehcode
Copy link
Collaborator

mehcode commented Dec 18, 2014

I'm guessing that you don't have the neccessary requirements.

apt-get install libxml2-dev libxmlsec1-dev

I'm on ubuntu at the moment so I'll give it a try in a minute (from a fresh virtualenv).


Oh.. obviously you do have them.. weird. We'll I'm trying it now.


Are you using python 2 or 3 ?


It seems you're on 2.7.x; I'll install that and try.

@mehcode mehcode added bug and removed bug labels Dec 18, 2014
@yaroslav-ilin
Copy link
Author

Yeah, I’m on 2.7.3

$ python --version
Python 2.7.3

@mehcode
Copy link
Collaborator

mehcode commented Dec 18, 2014

It installs for me fine in both 3.4.2 and 2.7.9. I can check 2.7.3 but I don't think the patch version number is the problem.

Can you install pip install lxml just fine?

Do you have the pkg-config utility available? This library makes use of https://github.com/matze/pkgconfig

@mehcode
Copy link
Collaborator

mehcode commented Dec 18, 2014

Downloading/unpacking xmlsec
  Downloading xmlsec-0.2.0.tar.gz
  Running setup.py (path:/home/ryan/.pyenv/versions/scratch-2.7.3/build/xmlsec/setup.py) egg_info for package xmlsec
    /home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/setuptools-8.2-py2.7.egg/pkg_resources.py:2443: PEP440Warning: 'nose (dev)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
    no previously-included directories found matching 'doc/.build'

    Installed /tmp/easy_install-crJbGG/pkgconfig-1.1.0/.eggs/nose-1.3.4-py2.7.egg
    zip_safe flag not set; analyzing archive contents...

    Installed /home/ryan/.pyenv/versions/scratch-2.7.3/build/xmlsec/.eggs/pkgconfig-1.1.0-py2.7.egg
    Searching for setuptools-cython
    Reading https://pypi.python.org/simple/setuptools_cython/
    Best match: setuptools-cython 0.2.1
    Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
    Processing setuptools_cython-0.2.1.tar.gz
    Writing /tmp/easy_install-Bt6L_7/setuptools_cython-0.2.1/setup.cfg
    Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Bt6L_7/setuptools_cython-0.2.1/egg-dist-tmp-AQeBUd
    zip_safe flag not set; analyzing archive contents...

    Installed /home/ryan/.pyenv/versions/scratch-2.7.3/build/xmlsec/.eggs/setuptools_cython-0.2.1-py2.7.egg

Requirement already satisfied (use --upgrade to upgrade): lxml>=3.0 in /home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages (from xmlsec)
Installing collected packages: xmlsec
  Running setup.py install for xmlsec
    cythoning src/xmlsec/constants.pyx to src/xmlsec/constants.c
    building 'xmlsec.constants' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/constants.so
    cythoning src/xmlsec/utils.pyx to src/xmlsec/utils.c
    building 'xmlsec.utils' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/utils.c -o build/temp.linux-x86_64-2.7/src/xmlsec/utils.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/utils.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/utils.so
    cythoning src/xmlsec/tree.pyx to src/xmlsec/tree.c
    building 'xmlsec.tree' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/tree.c -o build/temp.linux-x86_64-2.7/src/xmlsec/tree.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/tree.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/tree.so
    cythoning src/xmlsec/key.pyx to src/xmlsec/key.c
    building 'xmlsec.key' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/key.c -o build/temp.linux-x86_64-2.7/src/xmlsec/key.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/key.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/key.so
    cythoning src/xmlsec/ds.pyx to src/xmlsec/ds.c
    building 'xmlsec.ds' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/ds.c -o build/temp.linux-x86_64-2.7/src/xmlsec/ds.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/ds.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/ds.so
    cythoning src/xmlsec/template.pyx to src/xmlsec/template.c
    building 'xmlsec.template' extension
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_100=1 -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml -I/home/ryan/.pyenv/versions/scratch-2.7.3/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/home/ryan/.pyenv/versions/2.7.3/include/python2.7 -c src/xmlsec/template.c -o build/temp.linux-x86_64-2.7/src/xmlsec/template.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc -pthread -shared -L/home/ryan/.pyenv/versions/2.7.3/lib build/temp.linux-x86_64-2.7/src/xmlsec/template.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/template.so

Successfully installed xmlsec
Cleaning up...

@mehcode
Copy link
Collaborator

mehcode commented Dec 18, 2014

Can you paste the complete log for pip install xmlsec? I may be able to glean something.

@yaroslav-ilin
Copy link
Author

On a fresh VPS installed all apt-get dependencies just fine, Python version is same, pkg-config is available, had no troubles with pip install lxml.

And here is a full log of pip install xmlsec:

Downloading/unpacking xmlsec
  Downloading xmlsec-0.2.0.tar.gz
  Running setup.py egg_info for package xmlsec
    no previously-included directories found matching 'doc/.build'

    Installed /tmp/easy_install-qFMhy3/pkgconfig-1.1.0/nose-1.3.4-py2.7.egg
    zip_safe flag not set; analyzing archive contents...

    Installed /root/build/xmlsec/pkgconfig-1.1.0-py2.7.egg
    Searching for setuptools-cython
    Reading http://pypi.python.org/simple/setuptools_cython/
    Best match: setuptools-cython 0.2.1
    Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
    Processing setuptools_cython-0.2.1.tar.gz
    Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-N38FqT/setuptools_cython-0.2.1/egg-dist-tmp-I2UqBd
    zip_safe flag not set; analyzing archive contents...

    Installed /root/build/xmlsec/setuptools_cython-0.2.1-py2.7.egg
    Searching for Cython
    Reading http://pypi.python.org/simple/Cython/
    Best match: Cython 0.21.1
    Downloading https://pypi.python.org/packages/source/C/Cython/Cython-0.21.1.zip#md5=3e8ed7f5d49cb931105d3c99263be060
    Processing Cython-0.21.1.zip
    Running Cython-0.21.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DLRENX/Cython-0.21.1/egg-dist-tmp-lfA5T6
    warning: no files found matching '.gitrev'
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    Compiling module Cython.Plex.Actions ...

    Installed /root/build/xmlsec/Cython-0.21.1-py2.7-linux-x86_64.egg

Requirement already satisfied (use --upgrade to upgrade): lxml>=3.0 in /usr/local/lib/python2.7/dist-packages (from xmlsec)
Installing collected packages: xmlsec
  Running setup.py install for xmlsec
    building 'xmlsec.constants' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/usr/local/lib/python2.7/dist-packages/lxml -I/usr/local/lib/python2.7/dist-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1
    gcc: error: src/xmlsec/constants.c: No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    error: command 'gcc' failed with exit status 4
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/root/build/xmlsec/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-n6X5kG-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/xmlsec

copying src/xmlsec/__init__.py -> build/lib.linux-x86_64-2.7/xmlsec

copying src/xmlsec/meta.py -> build/lib.linux-x86_64-2.7/xmlsec

running build_ext

building 'xmlsec.constants' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

creating build/temp.linux-x86_64-2.7/src/xmlsec

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/usr/local/lib/python2.7/dist-packages/lxml -I/usr/local/lib/python2.7/dist-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1

gcc: error: src/xmlsec/constants.c: No such file or directory

gcc: fatal error: no input files

compilation terminated.

error: command 'gcc' failed with exit status 4

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/root/build/xmlsec/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-n6X5kG-record/install-record.txt failed with error code 1 in /root/build/xmlsec
Storing complete log in /root/.pip/pip.log

@russian-developer
Copy link

nilfalse, +1

@russian-developer
Copy link

solved.
you install setuptools from apt-get / yum / etc ? You use very very very old version.
update your setuptool (e.g pip install setuptool --upgrade )

@mehcode
Copy link
Collaborator

mehcode commented Dec 27, 2014

@unk2k That makes sense. Thank you for commenting.

@nilfalse ^

@yaroslav-ilin
Copy link
Author

Thank you guys for reply, that helped.

Unfortunately I already solved my task another way (not using python-xmlsec).

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

I also experience this issue on Ubuntu 13.10, using a fresh virtualenv and python 2.7

Installed /tmp/easy_install-gPYx1N/xmlsec-0.2.0/setuptools_cython-0.2.1-py2.7.egg
Searching for Cython
Reading http://pypi.python.org/simple/Cython/
Best match: cython 0.22
Downloading https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz#md5=1ae25add4ef7b63ee9b4af697300d6b6
Processing cython-0.22.tar.gz
Running Cython-0.22/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gPYx1N/xmlsec-0.2.0/temp/easy_install-sCF8HY/Cython-0.22/egg-dist-tmp-dGqj4r
Unable to find pgen, not compiling formal grammar.
Compiling module Cython.Plex.Scanners ...
Compiling module Cython.Plex.Actions ...
Compiling module Cython.Compiler.Lexicon ...
Compiling module Cython.Compiler.Scanning ...
Compiling module Cython.Compiler.Parsing ...
Compiling module Cython.Compiler.Visitor ...
Compiling module Cython.Compiler.FlowControl ...
Compiling module Cython.Compiler.Code ...
Compiling module Cython.Tempita._tempita ...
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'

Installed /tmp/easy_install-gPYx1N/xmlsec-0.2.0/Cython-0.22-py2.7-linux-x86_64.egg
x86_64-linux-gnu-gcc: error: src/xmlsec/constants.c: No existe el archivo o el directorio
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

@pitbulk
Can you try to upgrade setuptools in your fresh virtualenv?

pip install setuptools --upgrade

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

setuptools --upgrade
Requirement already up-to-date: setuptools in ./venv/lib/python2.7/site-packages
Cleaning up...

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

Strange. I'll look into it and see if I can reproduce it.
Sorry that it isn't installing for you.

First glance, Unable to find pgen, not compiling formal grammar. looks like it could lead to something.

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

Not your fault :), xml and cryptography handler libraries used to have installation problems.
I developed a python-saml library that uses dm.xmlsec.binding that works fine in ubuntu but have issues on centOS

So I'm interested in this fork of my library that uses your python-xmlsec library

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

Not my day, also have issues on CentOS release 6.6, with python 2.6.6, installing xmlsec-0.2.0:

Call .resolve and .require separately.   writer = ep.load(installer=installer)  src/xmlsec/constants.c:264

src/xmlsec.h:1:27: error: xmlsec/crypto.h: Not exists
src/xmlsec.h:2:28: error: xmlsec/xmltree.h: Not exists
src/xmlsec.h:3:28: error: xmlsec/xmldsig.h: Not exists
src/xmlsec.h:4:27: error: xmlsec/xmlenc.h: Not exists
src/xmlsec.h:5:30: error: xmlsec/templates.h: Not exists
src/xmlsec.h:6:27: error: xmlsec/errors.h: Not exists

and several errors at src/xmlsec/constants.c:

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

Just a heads up.. python 2.6.x has very little chance of working. This library was originally 3.x only but I back-ported it after a request.

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

Also.. have you seen: https://github.com/mehcode/python-saml

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

Yes, I saw it time ago, but at OneLogin we try to port the php-saml to all languages using similar settings and similar API.

P.S The ubuntu installation was using python 2.7, I will upgrade the python version of the centOS.

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

I installed python2.7 on the centOS 6.6 and experienced the same issue that I described with the python 2.6. Also the "Unable to find pgen, not compiling formal grammar" and errors on src/xmlsec.h

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

@pitbulk Okay. On a completely fresh install of Ubuntu 13.10 with a fresh VM (and a fresh virtualenv), everything works fine.

ryan@test:~/Workspace$ virtualenv env
New python executable in env/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
ryan@test:~/Workspace$ . source^C
ryan@test:~/Workspace$ source env/bin/activate
(env)ryan@test:~/Workspace$ pip install xmlsec
Downloading/unpacking xmlsec
  Downloading xmlsec-0.2.0.tar.gz
  Running setup.py egg_info for package xmlsec
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    Installed /home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg
    Searching for pkgconfig
    Reading https://pypi.python.org/simple/pkgconfig/
    Best match: pkgconfig 1.1.0
    Downloading https://pypi.python.org/packages/source/p/pkgconfig/pkgconfig-1.1.0.tar.gz#md5=15998b487c15c5954feb79443b5a937a
    Processing pkgconfig-1.1.0.tar.gz
    Writing /tmp/easy_install-jHsXFY/pkgconfig-1.1.0/setup.cfg
    Running pkgconfig-1.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jHsXFY/pkgconfig-1.1.0/egg-dist-tmp-itsSTl
    Searching for nose>=1.0
    Reading https://pypi.python.org/simple/nose/
    Best match: nose 1.3.4
    Downloading https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz#md5=6ed7169887580ddc9a8e16048d38274d
    Processing nose-1.3.4.tar.gz
    Writing /tmp/easy_install-jHsXFY/pkgconfig-1.1.0/temp/easy_install-QGOlAX/nose-1.3.4/setup.cfg
    Running nose-1.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jHsXFY/pkgconfig-1.1.0/temp/easy_install-QGOlAX/nose-1.3.4/egg-dist-tmp-tOv1Vi
    no previously-included directories found matching 'doc/.build'

    Installed /tmp/easy_install-jHsXFY/pkgconfig-1.1.0/nose-1.3.4-py2.7.egg
    zip_safe flag not set; analyzing archive contents...

    Installed /home/ryan/Workspace/env/build/xmlsec/pkgconfig-1.1.0-py2.7.egg
    Searching for setuptools-cython
    Reading https://pypi.python.org/simple/setuptools_cython/
    Best match: setuptools-cython 0.2.1
    Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
    Processing setuptools_cython-0.2.1.tar.gz
    Writing /tmp/easy_install-QZHLHz/setuptools_cython-0.2.1/setup.cfg
    Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QZHLHz/setuptools_cython-0.2.1/egg-dist-tmp-uVuUaX
    zip_safe flag not set; analyzing archive contents...

    Installed /home/ryan/Workspace/env/build/xmlsec/setuptools_cython-0.2.1-py2.7.egg
    Searching for Cython
    Reading https://pypi.python.org/simple/Cython/
    Best match: cython 0.22
    Downloading https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz#md5=1ae25add4ef7b63ee9b4af697300d6b6
    Processing cython-0.22.tar.gz
    Writing /tmp/easy_install-pCh8_H/Cython-0.22/setup.cfg
    Running Cython-0.22/setup.py -q bdist_egg --dist-dir /tmp/easy_install-pCh8_H/Cython-0.22/egg-dist-tmp-EhwJG9
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    Unable to find pgen, not compiling formal grammar.
    Compiling module Cython.Plex.Scanners ...
    Compiling module Cython.Plex.Actions ...
    Compiling module Cython.Compiler.Lexicon ...
    Compiling module Cython.Compiler.Scanning ...
    Compiling module Cython.Compiler.Parsing ...
    Compiling module Cython.Compiler.Visitor ...
    Compiling module Cython.Compiler.FlowControl ...
    Compiling module Cython.Compiler.Code ...
    Compiling module Cython.Tempita._tempita ...

    Installed /home/ryan/Workspace/env/build/xmlsec/Cython-0.22-py2.7-linux-x86_64.egg

Downloading/unpacking lxml>=3.0 (from xmlsec)
  Downloading lxml-3.4.2.tar.gz (3.5MB): 3.5MB downloaded
  Running setup.py egg_info for package lxml
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    warning: no previously-included files found matching '*.py'
Installing collected packages: xmlsec, lxml
  Running setup.py install for xmlsec
    cythoning src/xmlsec/constants.pyx to src/xmlsec/constants.c
    building 'xmlsec.constants' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/constants.so
    cythoning src/xmlsec/utils.pyx to src/xmlsec/utils.c
    building 'xmlsec.utils' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/utils.c -o build/temp.linux-x86_64-2.7/src/xmlsec/utils.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/utils.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/utils.so
    cythoning src/xmlsec/tree.pyx to src/xmlsec/tree.c
    building 'xmlsec.tree' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/tree.c -o build/temp.linux-x86_64-2.7/src/xmlsec/tree.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/tree.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/tree.so
    cythoning src/xmlsec/key.pyx to src/xmlsec/key.c
    building 'xmlsec.key' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/key.c -o build/temp.linux-x86_64-2.7/src/xmlsec/key.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/key.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/key.so
    cythoning src/xmlsec/ds.pyx to src/xmlsec/ds.c
    building 'xmlsec.ds' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/ds.c -o build/temp.linux-x86_64-2.7/src/xmlsec/ds.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/ds.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/ds.so
    cythoning src/xmlsec/template.pyx to src/xmlsec/template.c
    building 'xmlsec.template' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/ryan/Workspace/env/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/template.c -o build/temp.linux-x86_64-2.7/src/xmlsec/template.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/xmlsec/template.o -lxmlsec1 -lssl -lxslt -lxml2 -lcrypto -lxmlsec1-openssl -o build/lib.linux-x86_64-2.7/xmlsec/template.so

  Running setup.py install for lxml
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28
    building 'lxml.etree' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/ryan/Workspace/env/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
    building 'lxml.objectify' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/ryan/Workspace/env/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.objectify.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -w
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/objectify.so

Successfully installed xmlsec lxml
Cleaning up...
(env)ryan@test:~/Workspace$ python --version
Python 2.7.5+
(env)ryan@test:~/Workspace$ pip --version
pip 1.4.1 from /home/ryan/Workspace/env/lib/python2.7/site-packages (python 2.7)

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

My output with a fresh virtualenv:

pip install xmlsec
Downloading/unpacking xmlsec
  Downloading xmlsec-0.2.0.tar.gz
  Running setup.py egg_info for package xmlsec
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    Installed /home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg
    Searching for pkgconfig
    Reading http://pypi.python.org/simple/pkgconfig/
    Best match: pkgconfig 1.1.0
    Downloading https://pypi.python.org/packages/source/p/pkgconfig/pkgconfig-1.1.0.tar.gz#md5=15998b487c15c5954feb79443b5a937a
    Processing pkgconfig-1.1.0.tar.gz
    Running pkgconfig-1.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wYY1fF/pkgconfig-1.1.0/egg-dist-tmp-yyKYFu
    Searching for nose>=1.0
    Reading http://pypi.python.org/simple/nose/
    Best match: nose 1.3.4
    Downloading https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz#md5=6ed7169887580ddc9a8e16048d38274d
    Processing nose-1.3.4.tar.gz
    Running nose-1.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wYY1fF/pkgconfig-1.1.0/temp/easy_install-w2RTqw/nose-1.3.4/egg-dist-tmp-MC9m8Y
    no previously-included directories found matching 'doc/.build'

    Installed /tmp/easy_install-wYY1fF/pkgconfig-1.1.0/nose-1.3.4-py2.7.egg
    zip_safe flag not set; analyzing archive contents...

    Installed /home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/pkgconfig-1.1.0-py2.7.egg
    Searching for setuptools-cython
    Reading http://pypi.python.org/simple/setuptools_cython/
    Best match: setuptools-cython 0.2.1
    Downloading https://pypi.python.org/packages/source/s/setuptools_cython/setuptools_cython-0.2.1.tar.gz#md5=c29fc5bf2894e69cbd98e3800cef4707
    Processing setuptools_cython-0.2.1.tar.gz
    Running setuptools_cython-0.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ycGy3b/setuptools_cython-0.2.1/egg-dist-tmp-YBImp0
    zip_safe flag not set; analyzing archive contents...

    Installed /home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/setuptools_cython-0.2.1-py2.7.egg
    Searching for Cython
    Reading http://pypi.python.org/simple/Cython/
    Best match: cython 0.22
    Downloading https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz#md5=1ae25add4ef7b63ee9b4af697300d6b6
    Processing cython-0.22.tar.gz
    Running Cython-0.22/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZcuDdK/Cython-0.22/egg-dist-tmp-luj_Aj
    warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
    warning: no files found matching '*.pxd' under directory 'Cython/Utility'
    Unable to find pgen, not compiling formal grammar.
    Compiling module Cython.Plex.Scanners ...
    Compiling module Cython.Plex.Actions ...
    Compiling module Cython.Compiler.Lexicon ...
    Compiling module Cython.Compiler.Scanning ...
    Compiling module Cython.Compiler.Parsing ...
    Compiling module Cython.Compiler.Visitor ...
    Compiling module Cython.Compiler.FlowControl ...
    Compiling module Cython.Compiler.Code ...
    Compiling module Cython.Tempita._tempita ...

    Installed /home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/Cython-0.22-py2.7-linux-x86_64.egg

Downloading/unpacking lxml>=3.0 (from xmlsec)
  Downloading lxml-3.4.2.tar.gz (3.5MB): 3.5MB downloaded
  Running setup.py egg_info for package lxml
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.2.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    warning: no previously-included files found matching '*.py'
Installing collected packages: xmlsec, lxml
  Running setup.py install for xmlsec
    building 'xmlsec.constants' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1
    x86_64-linux-gnu-gcc: error: src/xmlsec/constants.c: No existe el archivo o el directorio
    x86_64-linux-gnu-gcc: fatal error: no input files
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
    Complete output from command /home/pitbulk/proyectos/python3-saml/venv/bin/python -c "import setuptools;__file__='/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HSgw7v-record/install-record.txt --single-version-externally-managed --install-headers /home/pitbulk/proyectos/python3-saml/venv/include/site/python2.7:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/xmlsec

copying src/xmlsec/__init__.py -> build/lib.linux-x86_64-2.7/xmlsec

copying src/xmlsec/meta.py -> build/lib.linux-x86_64-2.7/xmlsec

running build_ext

building 'xmlsec.constants' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

creating build/temp.linux-x86_64-2.7/src/xmlsec

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml -I/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/lxml-3.4.2-py2.7-linux-x86_64.egg/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1

x86_64-linux-gnu-gcc: error: src/xmlsec/constants.c: No existe el archivo o el directorio

x86_64-linux-gnu-gcc: fatal error: no input files

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

----------------------------------------
Command /home/pitbulk/proyectos/python3-saml/venv/bin/python -c "import setuptools;__file__='/home/pitbulk/proyectos/python3-saml/venv/build/xmlsec/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HSgw7v-record/install-record.txt --single-version-externally-managed --install-headers /home/pitbulk/proyectos/python3-saml/venv/include/site/python2.7 failed with error code 1 in /home/pitbulk/proyectos/python3-saml/venv/build/xmlsec

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

@pitbulk Can I see python --version and pip --version. Maybe its your pip version? Also try pip install cython before you pip install xmlsec.

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

python --version
Python 2.7.5+
pip --version
pip 1.3.1 from /home/pitbulk/proyectos/python3-saml/venv/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg (python 2.7)

Successfully installed cython, but keep failing

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

Can you try upgrading pip? I'm using 1.4.x.

pip install --upgrade pip

And then try pip install xmlsec again.

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

Installed pip 6.0.8 , and keep failing :(

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_OPENSSL_098=1 -DXMLSEC_NO_GOST=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_SIZE_T= -DXMLSEC_CRYPTO=openssl -I/home/pitbulk/proyectos/python3-saml/venv/local/lib/python2.7/site-packages/lxml -I/home/pitbulk/proyectos/python3-saml/venv/local/lib/python2.7/site-packages/lxml/includes -Isrc -I/usr/include/xmlsec1 -I/usr/include/libxml2 -I/usr/include/python2.7 -c src/xmlsec/constants.c -o build/temp.linux-x86_64-2.7/src/xmlsec/constants.o -DXMLSEC_CRYPTO_OPENSSL=1

    x86_64-linux-gnu-gcc: error: src/xmlsec/constants.c: 

@mehcode
Copy link
Collaborator

mehcode commented Mar 5, 2015

@pitbulk Any chance you could try using https://github.com/yyuu/pyenv ? Maybe something is corrupted in your python's builds directory that is causing the failure.

I'm curious what is different about your setup. I literally just instead a clean Ubuntu 13.10 and it works flawlessly.

@pitbulk
Copy link

pitbulk commented Mar 5, 2015

@mehcode, I had an ubuntu 13.10 in a virtual machine with python 2.7.5+ (same than my other machine) and is also experience the same issue.

but after execute a apt-get update
and reinstall:
apt-get install xmlsec1 openssl python-lxml libxmlsec1 libxmlsec1-dev

worked!

I will try to do the same now in my main machine

@rodrigorodriguescosta
Copy link

Also, I need to install xmlsec using Python3.4 with virtualenv and got this error

inside virtualenv : pip install xmlsec

Installing collected packages: xmlsec
  Running setup.py install for xmlsec
    Complete output from command /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ytwv388u/xmlsec/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c65qt8cf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/site/python3.4/xmlsec:
    running install
    running build
    running build_py
    running build_ext
    skipping 'src/xmlsec/constants.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/utils.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/tree.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/key.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/ds.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/enc.c' Cython extension (up-to-date)
    building 'xmlsec.enc' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_098=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T= -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -Isrc -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/lib/python3.4/site-packages/lxml/includes -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/lib/python3.4/site-packages/lxml -I/usr/include/libxml2 -I/usr/include/xmlsec1 -I/usr/include/python3.4m -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/python3.4m -c src/xmlsec/enc.c -o build/temp.linux-x86_64-3.4/src/xmlsec/enc.o -DXMLSEC_CRYPTO_OPENSSL=1
    src/xmlsec/enc.c: In function ‘__pyx_import_star_set’:
    src/xmlsec/enc.c:3384:37: error: lvalue required as left operand of assignment
         XMLSEC_ENC_RETURN_REPLACED_NODE = __Pyx_PyInt_As_unsigned_int(o); if ((XMLSEC_ENC_RETURN_REPLACED_NODE == (unsigned int)-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L2_error;};
                                         ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ytwv388u/xmlsec/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c65qt8cf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/site/python3.4/xmlsec" failed with error code 1 in /tmp/pip-build-ytwv388u/xmlsecInstalling collected packages: xmlsec
  Running setup.py install for xmlsec
    Complete output from command /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ytwv388u/xmlsec/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c65qt8cf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/site/python3.4/xmlsec:
    running install
    running build
    running build_py
    running build_ext
    skipping 'src/xmlsec/constants.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/utils.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/tree.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/key.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/ds.c' Cython extension (up-to-date)
    skipping 'src/xmlsec/enc.c' Cython extension (up-to-date)
    building 'xmlsec.enc' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=openssl -DXMLSEC_OPENSSL_098=1 -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T= -DXMLSEC_NO_XKMS=1 -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING=1 -Isrc -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/lib/python3.4/site-packages/lxml/includes -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/lib/python3.4/site-packages/lxml -I/usr/include/libxml2 -I/usr/include/xmlsec1 -I/usr/include/python3.4m -I/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/python3.4m -c src/xmlsec/enc.c -o build/temp.linux-x86_64-3.4/src/xmlsec/enc.o -DXMLSEC_CRYPTO_OPENSSL=1
    src/xmlsec/enc.c: In function ‘__pyx_import_star_set’:
    src/xmlsec/enc.c:3384:37: error: lvalue required as left operand of assignment
         XMLSEC_ENC_RETURN_REPLACED_NODE = __Pyx_PyInt_As_unsigned_int(o); if ((XMLSEC_ENC_RETURN_REPLACED_NODE == (unsigned int)-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L2_error;};
                                         ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/rodrigo/dev/projetos/sigeflex_api/virtualenv/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ytwv388u/xmlsec/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-c65qt8cf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/rodrigo/dev/projetos/sigeflex_api/virtualenv/include/site/python3.4/xmlsec" failed with error code 1 in /tmp/pip-build-ytwv388u/xmlsec
pip freeze

amqp==1.4.6
anyjson==0.3.3
billiard==3.3.0.20
celery==3.1.18
cffi==1.2.1
colorama==0.3.3
cryptography==1.0.2
Django==1.8.3
django-appconf==1.0.1
django-celery-email==1.1.2
django-cors-headers==1.1.0
django-fab-deploy==0.7.5
django-rest-swagger==0.3.3
djangorestframework==3.2.3
ecdsa==0.13
idna==2.0
Jinja2==2.8
kombu==3.0.26
libxml2-python==2.9.2
lxml==3.4.4
Markdown==2.1.0
MarkupSafe==0.23
mirakuru==0.5.0
paramiko==1.15.2
path.py==7.6
port-for==0.3.1
psycopg2==2.6.1
py==1.4.30
pyaml==15.6.3
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
pymlconf==0.3.17
pyOpenSSL==0.15.1
pytest==2.7.1
pytest-django==2.8.0
pytest-marks==0.4
pytz==2015.4
PyYAML==3.11
requests==2.7.0
six==1.9.0
transaction==1.4.4
uWSGI==2.0.11.1
virtualenv==13.1.0
wheel==0.24.0
zope.interface==4.1.2

All these packages are already installed apt-get install xmlsec1 openssl python-lxml libxmlsec1 libxmlsec1-dev

@rskumar
Copy link

rskumar commented Nov 5, 2015

I tried everything stated above as working.. still getting different errors with different approach on Ubuntu

@dmvieira
Copy link

dmvieira commented Jul 21, 2016

I think you need:

  • python-dev
  • libxml2-dev
  • zlib1g-dev
  • libxslt1-dev
  • More memory (512MB or higher) because lxml needs compiling

Working here

@JonnathanCalderon
Copy link

Im on windows 7 Ultimate 64bits with Python3.6.

pip install zeep[xmlsec]

C:\Users\Trump>pip install zeep[xmlsec]
Requirement already satisfied: zeep[xmlsec] in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages
Requirement already satisfied: defusedxml>=0.4.1 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: six>=1.9.0 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: requests>=2.7.0 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: lxml>=3.0.0 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: requests-toolbelt>=0.7.1 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: cached-property>=1.3.0 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: appdirs>=1.4.0 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: pytz in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Requirement already satisfied: isodate>=0.5.4 in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from zeep[xmlsec])
Collecting xmlsec>=0.6.1; extra == "xmlsec" (from zeep[xmlsec])
Using cached xmlsec-1.0.7.tar.gz
Requirement already satisfied: pkgconfig in c:\users\trump\appdata\local\programs\python\python36-32\lib\site-packages (from xmlsec>=0.6.1; extra == "xmlsec"->zeep[xmlsec])
Installing collected packages: xmlsec
Running setup.py install for xmlsec ... error
Complete output from command c:\users\trump\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Trump\AppData\Loc
al\Temp\pip-build-figqizul\xmlsec\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" ins
tall --record C:\Users\Trump\AppData\Local\Temp\pip-1zuzxov1-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
error: pkg-config is not installed

----------------------------------------

Command "c:\users\trump\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Trump\AppData\Local\Temp\pip-build-figq
izul\xmlsec\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Trump\AppData\Local\Temp\pip-1zuzxov1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Trump\AppData\Local\Temp\pip-

@bgaifullin
Copy link
Collaborator

Hi @JonnathanCalderon, thank you for contribution. Seems like you issue related to #16
Could you please try to install pkg-config by following this instructions:
http://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows

@JonnathanCalderon
Copy link

Greetings, thanks for your quickly response and please apologize my English. I had followed that two steps, about installing the pkg-config-lite and downloading the binaries but neither worked.

@bgaifullin
Copy link
Collaborator

@JonnathanCalderon I moved discussion here #35, because it is more relevant to your issue, this this one.

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

No branches or pull requests

9 participants