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

DelocationError: Already planning to copy library with same basename as: xxxx #148

Open
LukasAdamowicz opened this issue Mar 10, 2022 · 1 comment
Labels

Comments

@LukasAdamowicz
Copy link

Describe the bug
Trying to fix a wheel with delocate-wheel -w fixed_wheels -v *.whl, I get the following error message:

Fixing: scikit_digital_health-0.9.12-cp310-cp310-macosx_10_9_x86_64.whl
Traceback (most recent call last):
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/bin/delocate-wheel", line 8, in <module>
    sys.exit(main())
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/lib/python3.10/site-packages/delocate/cmd/delocate_wheel.py", line 128, in main
    copied = delocate_wheel(
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/lib/python3.10/site-packages/delocate/delocating.py", line 643, in delocate_wheel
    copied_libs = delocate_path(
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/lib/python3.10/site-packages/delocate/delocating.py", line 473, in delocate_path
    return delocate_tree_libs(lib_dict, lib_path, tree_path)
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/lib/python3.10/site-packages/delocate/delocating.py", line 104, in delocate_tree_libs
    libraries_to_copy, libraries_to_delocate = _analyze_tree_libs(
  File "/Users/lukasadamowicz/miniconda3/envs/skdh/lib/python3.10/site-packages/delocate/delocating.py", line 145, in _analyze_tree_libs
    raise DelocationError(
delocate.delocating.DelocationError: Already planning to copy library with same basename as: libgfortran.5.dylib

To Reproduce
delocate-wheel -w fixed_wheels -v scikit_digital_health-0.9.12-cp310-cp310-macosx_10_9_x86_64.whl

Expected behavior
Expected standard output listing the libraries copied into the fixed wheel.

Wheels used
Repository: LINK

wheel file: LINK

Platform (please complete the following information):

  • OS version: macOS 12.1
  • Delocate version: 0.10.2 (tried with both conda-forge version and pulling straight from main branch)

Additional context
Output from delocate-listdeps --depending *.whl:

/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libbz2.1.0.8.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libzip.5.4.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libcrypto.1.1.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libzip.5.4.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgcc_s.1.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgfortran.5.dylib
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libquadmath.0.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgfortran.5.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libopenblasp-r0.3.18.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgsl.25.dylib:
    skdh/utility/_extensions/moving_median.cpython-310-darwin.so
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libomp.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libopenblasp-r0.3.18.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libopenblasp-r0.3.18.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgsl.25.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libquadmath.0.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgfortran.5.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libz.1.2.11.dylib:
    /Users/lukasadamowicz/miniconda3/envs/skdh/lib/libzip.5.4.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libzip.5.4.dylib:
    skdh/io/_extensions/gt3x_convert.cpython-310-darwin.so
/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgcc_s.1.dylib:
    skdh/io/_extensions/read.cpython-310-darwin.so
    /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgfortran.5.dylib
    /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libquadmath.0.dylib
    skdh/features/lib/extensions/frequency.cpython-310-darwin.so
    skdh/features/lib/extensions/entropy.cpython-310-darwin.so
    skdh/features/lib/extensions/_utility.cpython-310-darwin.so
    skdh/features/lib/extensions/misc_features.cpython-310-darwin.so
    skdh/features/lib/extensions/smoothness.cpython-310-darwin.so
    skdh/features/lib/extensions/statistics.cpython-310-darwin.so
    skdh/utility/_extensions/moving_moments.cpython-310-darwin.so
/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgfortran.5.dylib:
    skdh/io/_extensions/read.cpython-310-darwin.so
    skdh/features/lib/extensions/frequency.cpython-310-darwin.so
    skdh/features/lib/extensions/entropy.cpython-310-darwin.so
    skdh/features/lib/extensions/_utility.cpython-310-darwin.so
    skdh/features/lib/extensions/misc_features.cpython-310-darwin.so
    skdh/features/lib/extensions/smoothness.cpython-310-darwin.so
    skdh/features/lib/extensions/statistics.cpython-310-darwin.so
    skdh/utility/_extensions/moving_moments.cpython-310-darwin.so
/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libquadmath.0.dylib:
    skdh/io/_extensions/read.cpython-310-darwin.so
    /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgfortran.5.dylib
    skdh/features/lib/extensions/frequency.cpython-310-darwin.so
    skdh/features/lib/extensions/entropy.cpython-310-darwin.so
    skdh/features/lib/extensions/_utility.cpython-310-darwin.so
    skdh/features/lib/extensions/misc_features.cpython-310-darwin.so
    skdh/features/lib/extensions/smoothness.cpython-310-darwin.so
    skdh/features/lib/extensions/statistics.cpython-310-darwin.so
    skdh/utility/_extensions/moving_moments.cpython-310-darwin.so
@LukasAdamowicz
Copy link
Author

I see why this happens, libgfortran.5.dylib gets referenced in two different places:

/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libgfortran.5.dylib
/Users/lukasadamowicz/miniconda3/envs/skdh/lib/libgfortran.5.dylib

Since it is not installed on the system but in a conda environment.

Is there a way to resolve this? Ideally it would be nice to be able to continue using conda to install these libraries.

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

No branches or pull requests

1 participant