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

CCTools: Tarball doesn't work if libssl is not on host machine #3414

Closed
tphung3 opened this issue Jul 20, 2023 · 5 comments
Closed

CCTools: Tarball doesn't work if libssl is not on host machine #3414

tphung3 opened this issue Jul 20, 2023 · 5 comments

Comments

@tphung3
Copy link
Contributor

tphung3 commented Jul 20, 2023

I can't import taskvine or workqueue after downloading and untaring a tarball from our group's webpage or on github releases as my machine doesn't have libssl installed.

$ PYTHONPATH=/tmp/cctools/lib/python3.9/site-packages python
Python 3.11.4 (main, Jun  7 2023, 00:00:00) [GCC 12.3.1 20230508 (Red Hat 12.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ndcctools
>>> import work_queue
Traceback (most recent call last):
  File "/tmp/cctools/lib/python3.9/site-packages/ndcctools/cwork_queue.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1233, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/cctools/lib/python3.9/site-packages/work_queue.py", line 1, in <module>
    import ndcctools.work_queue
  File "/tmp/cctools/lib/python3.9/site-packages/ndcctools/work_queue.py", line 16, in <module>
    from .cwork_queue import *
  File "/tmp/cctools/lib/python3.9/site-packages/ndcctools/cwork_queue.py", line 17, in <module>
    _cwork_queue = swig_import_helper()
                   ^^^^^^^^^^^^^^^^^^^^
  File "/tmp/cctools/lib/python3.9/site-packages/ndcctools/cwork_queue.py", line 16, in swig_import_helper
    return importlib.import_module('_cwork_queue')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_cwork_queue'
@dthain
Copy link
Member

dthain commented Jul 20, 2023

So this is why we strongly encourage installation via Conda, otherwise it's unclear what dependencies one needs installed in order to run it.

  • Which binary tarball are you using?
  • What platform are you running on?
  • And what libssl is actually available on that platform?

Since we are installing a specific ssl via conda in order to build the software, we may need to distribute that libssl (and perhaps other libs) in the installation tarball.

@tphung3
Copy link
Contributor Author

tphung3 commented Jul 20, 2023

This issue comes up in Parsl testing on my machine (Parsl testing on CI is fine, probably because VMs come with libssl.so.1.1). So in Parsl testing, doing make test will download, extract the tarball, and point PYTHONPATH to a specific location in the extracted directory.

Parsl doesn't use conda to manage dependencies so we have to result to using prebuilt binaries.

@btovar
Copy link
Member

btovar commented Jul 21, 2023

@tphung3 We don't expect those tarballs to work outside the distributions they were built for. We added ubuntu because that's what the parsl CI was using. Is this still the case?

@dthain
Copy link
Member

dthain commented Jul 31, 2023

To summarize: cctools requires a specific version of openssl to be installed.

  • If using a tarball installation, then we expect that to be provided by the underlying platform.
  • If using conda installation, then we expect conda to deliver it.

So, if the specific problem is that the tarball doesn't work in the parsl testing environment, then there are several possible fixes:
1 - Add a suitable libopenssl to the parsl testing environment.
2 - Build our tarballs on a different platform in GitHub that better corresponds to the parsl environment.
3 - Install cctools via conda in the testing environment, so that our dependencies are correctly brought along.

@tphung3 what do you think?

@tphung3
Copy link
Contributor Author

tphung3 commented Jul 31, 2023

This problem comes up only when I use it on my machine (fedora) with the tarball, and I think we don't want to promise too much other than centos, ubuntu20.04, and macos so I'll just add a libopenssl to my conda env.

@tphung3 tphung3 closed this as completed Jul 31, 2023
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

3 participants