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

LD_LIBRARY_PATH= and LD_LIBRARY_PATH=. do not work #383

Open
abitrolly opened this issue Jun 21, 2022 · 2 comments
Open

LD_LIBRARY_PATH= and LD_LIBRARY_PATH=. do not work #383

abitrolly opened this issue Jun 21, 2022 · 2 comments

Comments

@abitrolly
Copy link

abitrolly commented Jun 21, 2022

I am trying to setup cibuildwheel that fails at the repair step given these two files.

# ls -la *.so.2 *whl
-rwxr-xr-x. 1 root root 1965280 Jun 21 11:29 libopendht.so.2
-rw-r--r--. 1 root root 1507129 Jun 20 10:19 opendht-2.4.5-cp36-cp36m-linux_x86_64.whl

Fails with traceback.

  INFO:auditwheel.main_repair:Repairing opendht-2.4.5-cp36-cp36m-linux_x86_64.whl
  Traceback (most recent call last):
    File "/usr/local/bin/auditwheel", line 8, in <module>
      sys.exit(main())
    File "/opt/_internal/pipx/venvs/auditwheel/lib/python3.9/site-packages/auditwheel/main.py", line 59, in main
      rval = args.func(args, p)
    File "/opt/_internal/pipx/venvs/auditwheel/lib/python3.9/site-packages/auditwheel/main_repair.py", line 161, in execute
      out_wheel = repair_wheel(
    File "/opt/_internal/pipx/venvs/auditwheel/lib/python3.9/site-packages/auditwheel/repair.py", line 74, in repair_wheel
      raise ValueError(
  ValueError: Cannot repair wheel, because required library "libopendht.so.2" could not be located

I prepended LD_LIBRARY_PATH=. to the command as instructed in #85, and still got the same message. The command became this.

LD_LIBRARY_PATH=. auditwheel repair -w /tmp/cibuildwheel/repaired_wheel /tmp/cibuildwheel/built_wheel/opendht-2.4.5-cp36-cp36m-linux_x86_64.whl

I tried LD_LIBRARY_PATH= but it didn't work too.
https://github.com/abitrolly/opendht/runs/6981236904?check_suite_focus=true
Found it strange given this piece of code.

if ldpath == "":
# The ldso treats "" paths as $PWD.
ldpath = os.getcwd()

LD_LIBRARY_PATH=$PWD works fine.
https://github.com/abitrolly/opendht/runs/6987495549?check_suite_focus=true

@aganders3
Copy link
Contributor

I see why this is confusing but this happens because the CWD is changed to a tmp dir with only the contents of the input wheel when entering this InWheelCtx context manager in repair.py.

I'm not sure whether this should be changed to use the LD_LIBRARY_PATH entries with respect to the original CWD, or if it should just be documented that LD_LIBRARY_PATH entries need to be absolute paths.

@abitrolly
Copy link
Author

@aganders3 the best way is to merge #374 with the explicit --add-path option.

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

2 participants