xmlsec / python-xmlsec

Python bindings for the XML Security Library.
MIT License
94 stars 97 forks source link

Cannot install package xmlsec on RHEL7.6 #107

Closed ragnarokatz closed 5 years ago

ragnarokatz commented 5 years ago

Hello,

I'm trying to install the python package python3-saml, which depends on python libraries xmlsec and pkgconfig.

system information:

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 7.6 (Maipo)
Release:        7.6
Codename:       Maipo

error I'm getting when I do pip install xmlsec:

Building wheel for xmlsec (setup.py) ... error
  ERROR: Complete output from command /apps/conda/envs/python3-saml/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-h8tggu_7/xmlsec/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/pip-wheel-jzjpfpzv --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-h8tggu_7/xmlsec/setup.py", line 60, in <module>
      'Topic :: Text Processing :: Markup :: XML'
    File "/apps/conda/envs/python3-saml/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/apps/conda/envs/python3-saml/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 192, in run
      self.run_command('build')
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/apps/conda/envs/python3-saml/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-h8tggu_7/xmlsec/setup.py", line 11, in run
      self.patch_options()
    File "/tmp/pip-install-h8tggu_7/xmlsec/setup.py", line 16, in patch_options
      ext.define_macros.extend(xmlsec_setupinfo.define_macros())
    File "/tmp/pip-install-h8tggu_7/xmlsec/xmlsec_setupinfo.py", line 48, in define_macros
      macros.extend(xmlsec_config()['define_macros'])
    File "/tmp/pip-install-h8tggu_7/xmlsec/xmlsec_setupinfo.py", line 111, in xmlsec_config
      __XMLSEC_CONFIG = load_xmlsec1_config()
    File "/tmp/pip-install-h8tggu_7/xmlsec/xmlsec_setupinfo.py", line 164, in load_xmlsec1_config
      config = pkgconfig.parse('xmlsec1')
    File "/apps/conda/envs/python3-saml/lib/python3.6/site-packages/pkgconfig/pkgconfig.py", line 248, in parse
      _raise_if_not_exists(package)
    File "/apps/conda/envs/python3-saml/lib/python3.6/site-packages/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
      raise PackageNotFoundError(package)
  pkgconfig.pkgconfig.PackageNotFoundError: xmlsec1 not found

I already did yum install pkg-config xmlsec1-openssl xmlsec1 libxml2 libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel.

However, package xmlsec1 does not come with a .pc file under /usr/lib64/pkgconfig/ folder. I tried manually creating one, but then it points me to a bunch of other missing dependencies that also do not have .pc files created.

Version hosted on pypi for xmlsec is 1.3.3. I also tried downloading python-xmlsec-1.3.6.zip manually and building wheel file from source. Also does not work, I'm getting the same error xmlsec1 not found

Any ideas?

distortedsignal commented 5 years ago

Hey @ragnarokatz, have any insight on this? I see you closed your own issue - how did you get past this?

ragnarokatz commented 5 years ago

Hey,

I think I missed a package in the long list:

yum install pkg-config xmlsec1-openssl xmlsec1 libxml2 libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel

I just ran this again and made sure every single one of them was installed. Then it worked.

On Mon, May 6, 2019 at 5:38 PM Tom Kelley notifications@github.com wrote:

Hey @ragnarokatz https://github.com/ragnarokatz, have any insight on this? I see you closed your own issue - how did you get past this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mehcode/python-xmlsec/issues/107#issuecomment-489793167, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAWS2VQFTQXWBT2K37OVIDPUCQOVANCNFSM4HI2VKSA .

distortedsignal commented 5 years ago

Thanks.

I feel like I was in a DenverCoder9 scenario - I'll try this out!

anoasis commented 5 years ago

I also had encountered the same issue while installing your xmlsec package in my RHEL7 docker container. My solution was the proper PKG_CONFIG_PATH config on top of the manual libs(xmlsec1+libxml2) installation.

crankd commented 3 years ago

Adding -y to yum install fixed it for me.

yum clean all && yum install -y pkg-config xmlsec1-openssl xmlsec1 libxml2 libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
todaynowork commented 3 years ago

I also had encountered the same issue while installing your xmlsec package in my RHEL7 docker container. My solution was the proper PKG_CONFIG_PATH config on top of the manual libs(xmlsec1+libxml2) installation.

Hello @anoasis, can you share your solution in detail? Thanks.